The most justified in ql.io mash applications that manipulate data from disparate web-services, such as combining queries and API Google Maps API eBay. With ql.io data from different Web API, processed into single operations of union and aggregation, as well as about the SELECT statement retrieves data from several different tables. Using ql.io developers no longer need to look at every step on the characteristics of various Web API service, once is enough to determine their specification and in the future to address them through a unified interface.
As a demonstration of ql.io an example of the action to find a product with the conclusion of the seller.The algorithm of this operation is reduced to the conclusion of the eBay database of product identifiers for key words, getting through a single API parameters and determination of requests for applications for the origin through the Google Geocoding API. In the traditional approach to implementing this example would require a volume rather code that sends requests and parsing the output from three different Web API. When using ql.io all of these actions fall within a SELECT-query.
By analogy with the first SQL generated virtual tables, identified with one or another existing Web API.Then, for data processing and querying Web API, you can use the SQL-statement SELECT. While maintaining the possibility of the subqueries, aggregation, sorting and combining the results (JOIN) query to several different tables, behind which may be completely different Web API services. The result is returned in JSON. To add data to the operator is proposed to use INSERT.
Example create a table and a simple SQL-query (in action script can be run on a special demonstration web-console):
format = 'json' ResultSet 'results' ;
select g.geometry.location from google.geocode as G WHERE g.address = 'city Moscow, Red Square ' ;
In addition to increasing the convenience to access Web API and reduce the number of lines of code to implement the logic of the new language also allows you to reduce delays and increase execution speed by reducing the number of requests to the server, perform operations on data aggregation on the server and send the client only needed for the web application data. To optimize the performance of complex queries that require handling large volumes of data, the project prepared a special gateway server (actually performs the task DBMS) that can take the initial loading and processing of data, returning the client has finished result. The components of the gateway ql.io run on top of a server platform node.js. At the gateway load scripts in a format ready ql.io, which are then called from the final web-application after a specified in the script interface WebSocket or HTTP API (web-application to send to the gateway normal http-request with the appropriate parameters).