GUI

SlashDB Puts 2014 to REST

SlashDB Puts 2014 to REST

We are saying our goodbyes to 2014 with the final update to version 0.7 of SlashDB. Amazing new features await in 0.8, so stay tuned, but in the meantime, here’s…

What’s New

SlashDB ver. 0.7.39

Final revision of the 0.7 version contains over 20 improvements and fixes including:

  • Improved conformance to REST/HTTP standard by adding support for Accept header
  • Bundled support for IBM DB2
  • Improvements to database configuration GUI
  • Improved warning and error messages in admin’s GUI
  • Improved handling of date/time types for update
  • Fixed certain minor GUI issues (i.e. database dropdown, login box, sorting)
  • Fixed incorrect handling of boolean fields and empty values in CSV data upload
  • Fixed certain issues with XML representation of the NUMBER data type
  • Stronger user-resource authorization

R Stands for Representation

The “R” in REST stands for representation of a resource. While the vast majority of APIs can only output a JSON format, SlashDB from the very first version emphasized the need to provide alternative representations. We are pragmatic programmers, so the requested representation could be conveniently specified as a “file extension” in the URL:

http://demo.slashdb.com/db/Chinook/Playlist.xml
http://demo.slashdb.com/db/Chinook/Playlist.json
http://demo.slashdb.com/db/Chinook/Playlist.csv
http://demo.slashdb.com/db/Chinook/Playlist.html

The problem with this approach is that it commingles resource identification with representation. One could argue that the above are four distinct resources because each uniform resource locator (URL) is different.

The solution to this is already designed into the HTTP protocol as the “Accept” header. From this version onwards SlashDB fully supports it (but we will keep the old way forever). And so, the Playlist resource identifier becomes:

http://demo.slashdb.com/db/Chinook/Playlist/

By default an HTML representation will be returned, so to select an alternative representation, send the desired content type with your request. Here’s how to do that with a popular command line tool curl:

curl -H "Accept: text/xml" http://demo.slashdb.com/db/Chinook/Playlist/
curl -H "Accept: application/json" http://demo.slashdb.com/db/Chinook/Playlist/
curl -H "Accept: text/csv" http://demo.slashdb.com/db/Chinook/Playlist/
curl -H "Accept: text/html" http://demo.slashdb.com/db/Chinook/Playlist/

So there you have it. Now you can pick your way: strictly REST/HTTP correct or convenient.

Happy New Year

Thank you for your support all year and have a happy and prosperous 2015!

How Bloomberg Uses REST APIs

How Bloomberg Uses REST APIs

Bloomberg Industry Leaderboard Uses REST API for Financial Data Visualization; Imagine What You Could be Doing with Your Data Assets

If you have visited Bloomberg’s website lately you may have noticed a new tool called Bloomberg Industry Leaderboard, which is a part of their Visual Data site. The Leaderboard presents fundamental data about 600 leading global corporations in a visually attractive manner. Visualization techniques such as tree map, colored grid and rankings are all dynamically configurable, and results are sorted on the fly.

bloomberg-leaderboard

 

While the concept of presenting fundamental metrics in similar ways is not new, and there are many websites with similar data and visualization, the technical details behind the site are worth examining a bit closer.

Traditionally, data-driven  web pages respond to users input (clicks) by requesting from the web server a fully prepared page, coded in HTML for the browser to render. This typically results with reloading of the entire page upon each interaction or (more recently) with replacing fragments of existing HTML with new ones. In contrast, Bloomberg’s site uses REST/HTTP API to get raw data, which the browser then combines with a shell HTML page using Javascript and Cascading Style Sheets.

For us what is even more interesting is that Bloomberg seems to follow a very similar approach to that of SlashDB. Here’s an example of companies broken down industry and ranked by operating margin and estimated net income growth:

http://www.bloomberg.com/visual-data/industries/rank/margin:est-net (HTML representation)
http://www.bloomberg.com/visual-data/industries/db/rank/margin:est-net.json (underlying data)

By comparison, SlashDB links (to an unrelated data set) look as follows:

http://demo.slashdb.com/db/Chinook/Customer/Country/Brazil.html (HTML representation)
http://demo.slashdb.com/db/Chinook/Customer/Country/Brazil.json (underlying data)

Imagine what you could do by layering SlashDB on top of your data. Use it internally for data federation, database search and self-service reporting, or deliver data to the web and mobile apps, or even offer your data assets for sale. Either way, the time to market is about an order of magnitude shorter than custom developed solutions, as our customers have attested. SlashDB is also more versatile as it allows for reading and writing of data and provides alternative data formats. It just as easily integrates with Excel, R, Matlab and enterprise systems as it does with the web.

As you may know, the idea for SlashDB was conceived out of the issues with access to market data in large investment banks. Had Bloomberg used SlashDB, they could have saved a ton of time and money.

Try /db Risk Free

If you would like to learn more about SlashDB or to discuss REST APIs in finance or in general, please contact us. You can also register here to try our product risk free.