AlphaStreaming
Mark Fayngersh
Technologies
Pusher http://pusherapp.com/
NodeJS http://nodejs.org/
CouchDB http://couchdb.apache.org/
Rack http://rack.ru...
Architecture
     Chrome Extension    Client    Wave Robot


    CouchDB                             Pusher
              ...
Chrome -> Rack javascript
function loadResults() {
            $.ajax({
                type: "GET",
                url: ...
Wave -> Rack python
form_fields = {
                  'type': 'wave',
                  'image_url': pod.getAttribute('src...
Rack -> Pusher ruby
Pusher['stream'].trigger('new-query',
  {
    :type => params[:type],
    :image_url => params[:image_...
Rack -> CouchDB ruby
 db = CouchRest.database("http://mycouchdb.com:5984/queries")
 db.save_doc(
    {
        :type => pa...
End result
Usage so far
Try it out!

 Chrome Extension http://bit.ly/aOZxY1
 Wave Robot Address wave-alpha@appspot.com
 Frontend Site http://serve...
Contact
Email phunny.phacts@gmail.com
Twitter @gmaster1440
Git http://github.com/gmaster1440
Blog http://markfayngersh.com
Upcoming SlideShare
Loading in...5
×

Alpha Streaming Realtime

3,498

Published on

Wolfram Alpha streaming service composed of many interesting web technologies.

Published in: Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,498
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
26
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide











  • Alpha Streaming Realtime

    1. 1. AlphaStreaming Mark Fayngersh
    2. 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. 3. Architecture Chrome Extension Client Wave Robot CouchDB Pusher Rack NodeJS express Frontend
    4. 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. 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. 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. 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 }; }); });
    8. 8. End result
    9. 9. Usage so far
    10. 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. 11. Contact Email phunny.phacts@gmail.com Twitter @gmaster1440 Git http://github.com/gmaster1440 Blog http://markfayngersh.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×