SlideShare a Scribd company logo
node.js
 and ql.io
Build Your Own July 20, 2012 for
         OSCON HTTP APIs
                                   1
Subbu
Allamaraju
@sallamar
github.com/
s3u           2
Jon
LeBlanc
@jcleblanc
github.com/jcle
blanc             3
How to
 consume
HTTP APIs
cheaply and
              4
curl -X <HTTP method> <URI>




                              5
Real code
(randomized)
7
8
9
10
11
12
13
14
Use case:

Find things from A
For each thing, find details from
For each thing, find more deta
Merge results


                            15
Use case:

Find products
Find dominant categories of pr
Look up category info
Merge categories with product


                          16
Use case:

Get stuff from A
If A is down, try from B
Annotate stuff with other stuff f
Ignore some things from the st
Join all
                             17
Client
         [Really important client]
         Why don't you give me an
         API optimized for my use




                                             Producers
         cases?




                                             Server
               [Really important producer]
               Thanks. Get a number
               and stand in the line!
                                                 18
Client
         [Really important client]
         Why don't you give me an
         API optimized for my use




                                             Producers
         cases?
                  Who gets to
                decide the right




                                             Server
                        thing?
               [Really important producer]
               Thanks. Get a number
               and stand in the line!
                                                 19
Build Your Own
Optimized APIs

                 20
https://github.com/ql
        -io/ql.io
      Platform Engineering

                         21
A domain specific
language for HTTP
client programming
                     22
cut down lines of code
reduce no of requests
    save bandwidth

                         23
24
http://ql.io/console
                       25
ql.io Installation Modes


Web       Server      Node.js




                             26
curl http://<host>/q?s=query




                               27
As a Standalone Server
  Data
(internal
    )         ql.io     Node Host




  Data
(externa
    l)
# As a node.js module
npm install ql.io-engine
// Use ql.io from node.js
var Engine = require('ql.io-engine');
var engine = new Engine({
   //OPTIONS
});

var script = '…';
engine.execute(script, function(emitter){
    emitter.on("end", function(err, res){
        …
    });
});
Language: Defining a Data Source

Include in Request   Include in .ql file
Example: Mustache Templates
Example: jQuery for Cross Domain Reqs
Let’s Do It!
1. Interop via
   HTTP
2. SQL inspired
3. Implicit
   orchestration
4. Failure modes   35
code
  https://github.com/ql-io/ql.io
docs/demos
 http://ql.io
 https://github.com/jcleblanc/
api-masher
blog
  http://ql-io.github.com          36

More Related Content

PPTX
iOS App Development with F# and Xamarin
PPTX
Chaos Testing with F# and Azure by Rachel Reese at Codemotion Dubai
PDF
Willian Martins - Back to the future of JS: the next features and amazing pro...
PPTX
10 minute command line apps with zio cli
KEY
Padrino::Validation::HTML5
PPTX
What's coming in c# 9.0
PDF
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
PPTX
What's Coming in C# 9.0
iOS App Development with F# and Xamarin
Chaos Testing with F# and Azure by Rachel Reese at Codemotion Dubai
Willian Martins - Back to the future of JS: the next features and amazing pro...
10 minute command line apps with zio cli
Padrino::Validation::HTML5
What's coming in c# 9.0
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
What's Coming in C# 9.0

What's hot (6)

PDF
freeCodeCampTokyoMeetup 17
PDF
Setup von Configuration Management mit Ansible für smarte DevOps
PPTX
Apiary
PPT
Harsh ppt
PPTX
Declarative authorization in REST services in SharePoint with F# and ServiceS...
PDF
Intuitive CLIs for gRPC APIs
freeCodeCampTokyoMeetup 17
Setup von Configuration Management mit Ansible für smarte DevOps
Apiary
Harsh ppt
Declarative authorization in REST services in SharePoint with F# and ServiceS...
Intuitive CLIs for gRPC APIs
Ad

Viewers also liked (9)

PDF
Meniu Westgate
PPTX
Openmelodie juillet 2010
PPTX
Mozilla Labs Meeti
PPTX
Mobile payments 101
PPT
FOWA Miami 2009 - Y!OS
PPTX
2012 Oracle Open World: X.commerce and MongoDB
PPTX
2012 O'Reilly Where: ql.io and Open Source Querying
PDF
Bob the builder !!!!
PDF
Protecting the Future of Mobile Payments
Meniu Westgate
Openmelodie juillet 2010
Mozilla Labs Meeti
Mobile payments 101
FOWA Miami 2009 - Y!OS
2012 Oracle Open World: X.commerce and MongoDB
2012 O'Reilly Where: ql.io and Open Source Querying
Bob the builder !!!!
Protecting the Future of Mobile Payments
Ad

Similar to OSCON 2012: ql.io and Node.js (20)

PDF
Making Things Work Together
PDF
The 7 Deadly Sins of API Design
PDF
APIdays Singapore 2019 - SDKs and Code Samples - The Cornerstone of API Devel...
PDF
Aws Deployment Tools - Overview, Details, Implementation
PDF
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
PDF
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
PDF
I Love APIs - Oct 2015
PDF
A Snapshot of API Design Trends In 2019
PDF
Device Independent API design
PPTX
Nodejs Native Add-Ons from zero to hero
PDF
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
PDF
What’s behind a high quality web API? Ensure your APIs are more than just a ...
PPT
Make Your API Catalog Essential with z/OS Connect EE
PPTX
ql.io at NodePDX
PPT
Cloud Computing for Barcamp NOLA 2009
PDF
Why your APIs should fly first class
PDF
Moving from app services to azure functions
PDF
Self service cloud resources
PDF
Aws sdk-php-guide
PDF
INTERFACE, by apidays - How to Win Friends and Influence People with API First
Making Things Work Together
The 7 Deadly Sins of API Design
APIdays Singapore 2019 - SDKs and Code Samples - The Cornerstone of API Devel...
Aws Deployment Tools - Overview, Details, Implementation
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
I Love APIs - Oct 2015
A Snapshot of API Design Trends In 2019
Device Independent API design
Nodejs Native Add-Ons from zero to hero
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
What’s behind a high quality web API? Ensure your APIs are more than just a ...
Make Your API Catalog Essential with z/OS Connect EE
ql.io at NodePDX
Cloud Computing for Barcamp NOLA 2009
Why your APIs should fly first class
Moving from app services to azure functions
Self service cloud resources
Aws sdk-php-guide
INTERFACE, by apidays - How to Win Friends and Influence People with API First

More from Jonathan LeBlanc (20)

PDF
JavaScript App Security: Auth and Identity on the Client
PDF
Improving Developer Onboarding Through Intelligent Data Insights
PDF
Better Data with Machine Learning and Serverless
PPTX
Best Practices for Application Development with Box
PPTX
Box Platform Overview
PPTX
Box Platform Developer Workshop
PPTX
Modern Cloud Data Security Practices
PPTX
Box Authentication Types
PPTX
Understanding Box UI Elements
PPTX
Understanding Box applications, tokens, and scoping
PPTX
The Future of Online Money: Creating Secure Payments Globally
PDF
Modern API Security with JSON Web Tokens
PPTX
Creating an In-Aisle Purchasing System from Scratch
PDF
Secure Payments Over Mixed Communication Media
PDF
Node.js Authentication and Data Security
PDF
PHP Identity and Data Security
PPTX
Secure Payments Over Mixed Communication Media
PDF
Protecting the Future of Mobile Payments
PPTX
Future of Identity, Data, and Wearable Security
PDF
Kill All Passwords
JavaScript App Security: Auth and Identity on the Client
Improving Developer Onboarding Through Intelligent Data Insights
Better Data with Machine Learning and Serverless
Best Practices for Application Development with Box
Box Platform Overview
Box Platform Developer Workshop
Modern Cloud Data Security Practices
Box Authentication Types
Understanding Box UI Elements
Understanding Box applications, tokens, and scoping
The Future of Online Money: Creating Secure Payments Globally
Modern API Security with JSON Web Tokens
Creating an In-Aisle Purchasing System from Scratch
Secure Payments Over Mixed Communication Media
Node.js Authentication and Data Security
PHP Identity and Data Security
Secure Payments Over Mixed Communication Media
Protecting the Future of Mobile Payments
Future of Identity, Data, and Wearable Security
Kill All Passwords

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Cloud computing and distributed systems.
Big Data Technologies - Introduction.pptx
Network Security Unit 5.pdf for BCA BBA.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
Programs and apps: productivity, graphics, security and other tools
sap open course for s4hana steps from ECC to s4
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Assigned Numbers - 2025 - Bluetooth® Document

OSCON 2012: ql.io and Node.js

Editor's Notes

  • #29: If you download the standalone server version of ql.io, it will sit on top of your existing node server (or within your node applications) and be able to query your internal data and/or external data sources
  • #32: A create table call (to define a data source) may be included in the HTTP request to the ql.io web source or defined in a .ql file, which is added into the /tables directory of your application.
  • #33: First we need some mustache power
  • #34: Route files are also stored with the .ql extension but are placed under the routes directory
  • #35: create table slideshare on select get from &quot;http://www.slideshare.net/rss/user/{user}&quot; resultset &quot;rss.channel&quot;;create table github.users on select get from &quot;http://github.com/api/v2/json/user/show/{user}&quot;;user = &quot;jcleblanc&quot;;slides = select * from slideshare where user=&quot;{user}&quot;;twitter = select * from github.users where user=&quot;{user}&quot;;return { &quot;slides&quot;: &quot;{slides}&quot;, &quot;twitter&quot;: &quot;{twitter}&quot;}