real time realitites
TRANSCRIPT
Real Time Realities!!!
Adding Real Time support to Your web app
Kausikram KrishnasayeeSilver Stripe Software
The Steps
● Step 0 – get your code ready for real-time.● Step 1 – lets start with some Websockets.● Step 2 – lets show the same love to some old browsers.● Step 3 – Real-time strategies, to make life easy.● Step 4 – Deployment, Scalability and Hair loss.
● Code is much more cleaner● Code is easily testable● Change in logic, data schema and rendering
is easy.● Adding new functionality is easy.
Step 0
Bring in Real Time Support for browsers which support the awesome HTML5 websocket spec.
Write a fail safe for Browsers written for our forefathers.
Step 1
Note about Technologies used
● Tornado running on a different port which basically echos back data to all concurrent connections
● Using the native websocket JS api to make connections and update changes when there is a model change taking place.
● Do nothing when on IE, if possible intimidate the user.
Step 1
● Real-time backend server running on a different port
● Full real-time support for new browsers● No real-time support for old browsers
Step 1
Step 2 : Full Real-time support
Use a combination of comet, Web sockets, flash, and any other possible technology that is possible
to create a cross browser, almost similar functioning realtime system.
Note on technology
● Comet: doing non HTTP things through HTTP ways...
● Socket.io or js.io or something similar in the front end.
● Socket.io / servers implementing connection negotiation mechanisms in the backend.
Step 2
● Support for real Real-time even on IE 6.● Abstracted out API to perform real-time actions.● Peace of mind.
Step 2
Step 3: pub sub systems● What if there are more than one task list?● How about activities performed through the
API?● How about having a need to authenticate ?
Note on technology● Hookbox, Juggernaut or any other channel
based pub-sub system● I wrote one myself :D
Step 3
● Running the LS on a different port is not a great idea.
● How about handling a few hundred connections at the same time? What if you get Tech Crunched ?
● What is the fall back option if LS crashes.
Step 4