Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
OSCON 2012: ql.io and Node.js
Search
Jonathan LeBlanc
July 20, 2012
Technology
1
570
OSCON 2012: ql.io and Node.js
OSCON 2012 (July - Portland, OR) presentation by Subbu Allamaraju and myself on ql.io and Node.js
Jonathan LeBlanc
July 20, 2012
Tweet
Share
More Decks by Jonathan LeBlanc
See All by Jonathan LeBlanc
Architecting Developer Relations for a New Development Platform
jcleblanc
0
3
Best practices for application development with Box
jcleblanc
0
6
BoxWorks Developer Training
jcleblanc
0
92
Building Mobile First Experiences on Box Platform
jcleblanc
0
39
Introduction to Box APIs
jcleblanc
1
59
Box Platform Developer Workshop
jcleblanc
2
260
JavaScript App Security: Auth and Identity on the Client
jcleblanc
0
52
Improving Developer Onboarding Through Intelligent Data Insights
jcleblanc
0
44
Better Data with Machine Learning and Serverless
jcleblanc
0
140
Other Decks in Technology
See All in Technology
Cloud Service Mesh に触れ合う
phaya72
1
150
今日からできる!簡単 .NET 高速化 Tips -2024 edition-
xin9le
7
3.6k
require(ESM)とECMAScript仕様
uhyo
4
950
Cracking the KubeCon CfP
inductor
2
270
コードや知識を組み込む / Incorporate Code and knowledge
ks91
PRO
0
140
LangSmith入門―トレース/評価/プロンプト管理などを担うLLMアプリ開発プラットフォーム
os1ma
5
690
Microsoft Intune 勉強会 第 2 回目
tamaiyutaro
2
370
実例で紹介するRAG導入時の知見と精度向上の勘所
yamahiro
5
1.5k
今年のRubyKaigiはProfiler Year🤘
osyoyu
0
320
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
2
280
IPUT App Dev. Co. -Overview 2024/4
iputapp
0
120
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
620
Featured
See All Featured
What's new in Ruby 2.0
geeforr
337
31k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Embracing the Ebb and Flow
colly
80
4.2k
Building Applications with DynamoDB
mza
88
5.6k
Atom: Resistance is Futile
akmur
260
25k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
Producing Creativity
orderedlist
PRO
338
39k
Transcript
node.js and ql.io Build Your Own HTTP APIs for Agility
and Scale OSCON July 20, 2012 1
Subbu Allamaraju @sallamar github.com/s3u 2
Jon LeBlanc @jcleblanc github.com/jcleblanc 3
How to consume HTTP APIs cheaply and efficiently 4
5 curl -‐X <HTTP method> <URI>
Real code (randomized)
7
8
9
10
11
12
13
14
Find things from A For each thing, find details from
B For each thing, find more details from C Merge results Use case: 15
Find products Find dominant categories of products Look up category
info Merge categories with products Use case: 16
Get stuff from A If A is down, try from
B Annotate stuff with other stuff from C Ignore some things from the stuff Join all Use case: 17
Producers Client [Really important client] Why don't you give
me an API optimized for my use cases? Server [Really important producer] Thanks. Get a number and stand in the line! 18
Producers Client Server [Really important producer] Thanks. Get a
number and stand in the line! Who gets to decide the right thing? 19 [Really important client] Why don't you give me an API optimized for my use cases?
Build Your Own Optimized APIs 20
21 https://github.com/ql-io/ql.io Platform Engineering
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
26 Server Web Node.js ql.io Installation Modes
27 curl http://<host>/q?s=query
As a Standalone Server Node Host ql.io Data (internal )
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 .ql file
Include in Request
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 5. Consumer oriented 35
36 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