SlideShare una empresa de Scribd logo
1 de 11
AlphaStreaming
Mark Fayngersh
Technologies
Pusher http://pusherapp.com/
NodeJS http://nodejs.org/
CouchDB http://couchdb.apache.org/
Rack http://rack.rubyforge.org/
Chrome http://code.google.com/chrome/extensions/
Google Wave http://code.google.com/apis/wave/
Wolfram Alpha http://wolframalpha.com/
Architecture
     Chrome Extension    Client    Wave Robot


    CouchDB                             Pusher
                        Rack




                        NodeJS
                        express
                        Frontend
Chrome -> Rack javascript
function loadResults() {
            $.ajax({
                type: "GET",
                url: query_url,
                dataType: "xml",
                success: function(wolfram) {
                     $.ajax({
                         type: "POST",
                         url: "http://alpharack.heroku.com",
                         data:"url=url_here&type=chrome&image_url=image_url_here”,
                         success: function(m) {
                             parseXml(wolfram);
                         }
                    });
                }
            });
});
Wave -> Rack python
form_fields = {
                  'type': 'wave',
                  'image_url': pod.getAttribute('src'),
                  'url': url
             }

form_data = urllib.urlencode(form_fields)

result = urlfetch.fetch(
                             url="http://alpharack.heroku.com",
                             payload=form_data,
                             method=urlfetch.POST,
                             headers={'Content-Type': 'application/x-www-form-urlencoded'}
                         )
Rack -> Pusher ruby
Pusher['stream'].trigger('new-query',
  {
    :type => params[:type],
    :image_url => params[:image_url],
    :url => params[:url]
  }
)




Pusher -> Node javascript
                                             flash
                                           fallback


WebSocket.__swfLocation = "/public/js/WebSocketMain.swf";
var socket = new Pusher('appid', 'stream');
socket.bind('new-query', function(query) {
    //logic
};
Rack -> CouchDB ruby
 db = CouchRest.database("http://mycouchdb.com:5984/queries")
 db.save_doc(
    {
        :type => params[:type],
        :image_url => params[:image_url],
        :url => params[:url], :created_at => Time.now
    }
 ) if params[:url] != nil




CouchDB -> Node javascript
 $.getJSON("http://url.com/to/couchdb/view", function(data) {
   $.each(data.rows, function(i,item) {
     if (item.value.type == "chrome") {
        //display logic for a chrome query
     };
     if (item.value.type == "wave") {
        //display logic for a wave query
     };
   });
 });
End result
Usage so far
Try it out!

 Chrome Extension http://bit.ly/aOZxY1
 Wave Robot Address wave-alpha@appspot.com
 Frontend Site http://server.markfayngersh.com:8080
Contact
Email phunny.phacts@gmail.com
Twitter @gmaster1440
Git http://github.com/gmaster1440
Blog http://markfayngersh.com

Más contenido relacionado

La actualidad más candente

Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014
blndrt
 
Hash Signaling Made Easy
Hash Signaling Made EasyHash Signaling Made Easy
Hash Signaling Made Easy
davidgouldin
 
Couch db 浅漫游.
Couch db 浅漫游.Couch db 浅漫游.
Couch db 浅漫游.
shyboyzk
 
YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
Yusuke Wada
 
Advanced WordPress Development Environments
Advanced WordPress Development EnvironmentsAdvanced WordPress Development Environments
Advanced WordPress Development Environments
Beau Lebens
 

La actualidad más candente (20)

Frontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and HowFrontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and How
 
Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014
 
Express JS
Express JSExpress JS
Express JS
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Future Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETFuture Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NET
 
Mojolicious on Steroids
Mojolicious on SteroidsMojolicious on Steroids
Mojolicious on Steroids
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
wp cli
wp cliwp cli
wp cli
 
Xmpp prebind
Xmpp prebindXmpp prebind
Xmpp prebind
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
Hash Signaling Made Easy
Hash Signaling Made EasyHash Signaling Made Easy
Hash Signaling Made Easy
 
Couch db 浅漫游.
Couch db 浅漫游.Couch db 浅漫游.
Couch db 浅漫游.
 
Будь первым
Будь первымБудь первым
Будь первым
 
YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
 
Asynchronous Interfaces
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
 
What the web platform (and your app!) can learn from Node.js
What the web platform (and your app!) can learn from Node.jsWhat the web platform (and your app!) can learn from Node.js
What the web platform (and your app!) can learn from Node.js
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Advanced WordPress Development Environments
Advanced WordPress Development EnvironmentsAdvanced WordPress Development Environments
Advanced WordPress Development Environments
 

Similar a Alpha Streaming Realtime

Simplify AJAX using jQuery
Simplify AJAX using jQuerySimplify AJAX using jQuery
Simplify AJAX using jQuery
Siva Arunachalam
 
Lift 2 0
Lift 2 0Lift 2 0
Lift 2 0
SO
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
Luke Summerfield
 
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMixEasy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
elliando dias
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
Ben Lin
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 

Similar a Alpha Streaming Realtime (20)

Simplify AJAX using jQuery
Simplify AJAX using jQuerySimplify AJAX using jQuery
Simplify AJAX using jQuery
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
 
Lift 2 0
Lift 2 0Lift 2 0
Lift 2 0
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
 
JavaScript Web Development
JavaScript Web DevelopmentJavaScript Web Development
JavaScript Web Development
 
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMixEasy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
 
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web AppsMashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
 
Drive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteerDrive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteer
 
Express Presentation
Express PresentationExpress Presentation
Express Presentation
 
What's new in jQuery 1.5
What's new in jQuery 1.5What's new in jQuery 1.5
What's new in jQuery 1.5
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk
 
huhu
huhuhuhu
huhu
 
Django + Vue, JavaScript de 3ª generación para modernizar Django
Django + Vue, JavaScript de 3ª generación para modernizar DjangoDjango + Vue, JavaScript de 3ª generación para modernizar Django
Django + Vue, JavaScript de 3ª generación para modernizar Django
 
Aimaf
AimafAimaf
Aimaf
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
Mashing up JavaScript
Mashing up JavaScriptMashing up JavaScript
Mashing up JavaScript
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Alpha Streaming Realtime

  • 2. Technologies Pusher http://pusherapp.com/ NodeJS http://nodejs.org/ CouchDB http://couchdb.apache.org/ Rack http://rack.rubyforge.org/ Chrome http://code.google.com/chrome/extensions/ Google Wave http://code.google.com/apis/wave/ Wolfram Alpha http://wolframalpha.com/
  • 3. Architecture Chrome Extension Client Wave Robot CouchDB Pusher Rack NodeJS express Frontend
  • 4. Chrome -> Rack javascript function loadResults() { $.ajax({ type: "GET", url: query_url, dataType: "xml", success: function(wolfram) { $.ajax({ type: "POST", url: "http://alpharack.heroku.com", data:"url=url_here&type=chrome&image_url=image_url_here”, success: function(m) { parseXml(wolfram); } }); } }); });
  • 5. Wave -> Rack python form_fields = { 'type': 'wave', 'image_url': pod.getAttribute('src'), 'url': url } form_data = urllib.urlencode(form_fields) result = urlfetch.fetch( url="http://alpharack.heroku.com", payload=form_data, method=urlfetch.POST, headers={'Content-Type': 'application/x-www-form-urlencoded'} )
  • 6. Rack -> Pusher ruby Pusher['stream'].trigger('new-query', { :type => params[:type], :image_url => params[:image_url], :url => params[:url] } ) Pusher -> Node javascript flash fallback WebSocket.__swfLocation = "/public/js/WebSocketMain.swf"; var socket = new Pusher('appid', 'stream'); socket.bind('new-query', function(query) { //logic };
  • 7. Rack -> CouchDB ruby db = CouchRest.database("http://mycouchdb.com:5984/queries") db.save_doc( { :type => params[:type], :image_url => params[:image_url], :url => params[:url], :created_at => Time.now } ) if params[:url] != nil CouchDB -> Node javascript $.getJSON("http://url.com/to/couchdb/view", function(data) { $.each(data.rows, function(i,item) { if (item.value.type == "chrome") { //display logic for a chrome query }; if (item.value.type == "wave") { //display logic for a wave query }; }); });
  • 10. Try it out! Chrome Extension http://bit.ly/aOZxY1 Wave Robot Address wave-alpha@appspot.com Frontend Site http://server.markfayngersh.com:8080
  • 11. Contact Email phunny.phacts@gmail.com Twitter @gmaster1440 Git http://github.com/gmaster1440 Blog http://markfayngersh.com

Notas del editor