240 likes | 256 Views
High Performance API Mashups
E N D
High Performance Mashups Using ql.io and Node.js Jonathan LeBlanc Developer Evangelist (PayPal) Twitter: @jcleblanc | @PayPalDev Github: github.com/jcleblanc
ql.io: Reducing Workload + Processing Reduced Documentation Reduced Code Length Reduced Result Syncing
ql.io: Using the System Standalone Server / Node.js App Web Endpoint
Language: Defining a Data Source Include in Request Include in .ql Table
ql.io: The Test Console Test Console: http://ql.io/console
Language: Including Script Routes user = "jcleblanc"; slides = select * from slideshare where user="{user}"; twitter = select * from github.users where user="{user}"; return { "slides": "{slides}", "twitter": "{twitter}" } via route '/social' using method post;
Language: Using Script Routes curl --header "content-type: application/x-www-form-urlencoded" -d "user=jcleblanc" http://localhost:3000/social
Tools: API Masher Visualization Engine: https://github.com/jcleblanc/api-masher Technology Backbone – ql.io – jQuery – Mustache Templates
Node.js: Installing the Package npm install ql.io-engine
Node.js: Including the Engine var Engine = require('ql.io-engine'); var engine = new Engine({ … });
Node.js: Invoking the Engine var script = "select * from …"; engine.execute(script, function(emitter){ emitter.on("end", function(err, res){ console.log(res['body'][0]); }); });
Tools: External API Tables Tables Source: https://github.com/jcleblanc/ql.io-tables https://github.com/ql-io/ql.io- site/tree/master/tables
Thank You! Any Questions? http://www.slideshare.net/jcleblanc Jonathan LeBlanc Developer Evangelist (PayPal) Twitter: @jcleblanc | @PayPalDev Github: github.com/jcleblanc