collecting photo stream in node.js on heroku

15
Collecting Photo Stream in Node.js on Heroku @stomita (ja) @shinichitomita (en)

Upload: shinichi-tomita

Post on 09-May-2015

3.829 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Collecting Photo Stream in Node.js on Heroku

Collecting Photo Stream in Node.js on Heroku

@stomita (ja)@shinichitomita (en)

Page 2: Collecting Photo Stream in Node.js on Heroku

Who am I ?

• CEO at Mashmatrix, Inc.

• JavaScript Developer

• Formerly (almost forgot)

• Identity (OpenID/SAML/SSO)

• JavaEE

• Oracle

• Ex-Salesforce.com (2006/12-2007/12)

@stomita

Page 3: Collecting Photo Stream in Node.js on Heroku

Objective

• Collect and store photos tweeted in the world

• Add metadata to photos manually by crowd

• Category ? (food/people/landscape)

• Venue ? (foursquare)

Page 4: Collecting Photo Stream in Node.js on Heroku

Twitter Streaming API

https://dev.twitter.com/docs/streaming-api

Page 5: Collecting Photo Stream in Node.js on Heroku

Photo Stream

• Set tracking keywords to filter tweets with photo uploading services URL

• e.g. tracks=lockerz,plixi,tweetphoto,twitpic,yfrog,photozou,twitgoo,instagr

• Extract photo URLs by pre-given rule

• e.g. http://twitpic.com/7wiwlw => http://twitpic.com/show/thumb/7wiwlw

Page 6: Collecting Photo Stream in Node.js on Heroku

Architecture

Streaming JSON

Page 7: Collecting Photo Stream in Node.js on Heroku

Twitter-Node

https://github.com/technoweenie/twitter-node

Page 8: Collecting Photo Stream in Node.js on Heroku

Visualization

• Present photo stream to users in real-time

• Not our primary goal, but just interesting

• Don’t think, FEEL.

Page 9: Collecting Photo Stream in Node.js on Heroku

tweet-photo-stream

http://tweet-photo-stream.herokuapp.com/https://github.com/stomita/tweet-photo-stream

Page 10: Collecting Photo Stream in Node.js on Heroku

socket.io

• A Node.js library, enabling push messaging to browsers

• Stream Transport Supported :

• WebSocket/FlashSocket/XHR-Multipart/XHR-polling/JSONP-polling

• Used as fallback of SocketStream

Page 11: Collecting Photo Stream in Node.js on Heroku

Architecture

Streaming socket.io

Page 12: Collecting Photo Stream in Node.js on Heroku

Similar Work - Twitcaps

http://twitcaps.com/

Page 13: Collecting Photo Stream in Node.js on Heroku

Twitcaps - Not Real-time

Delayed Streaming Ajax Polling

Page 14: Collecting Photo Stream in Node.js on Heroku

Issue

• Heroku Node.js doesn’t support WebSocket yet (as of Dec 2011)

• Fallbacks to XHR-polling

• c.f. Joyent No.de SmartMachine

Page 15: Collecting Photo Stream in Node.js on Heroku

End