name: lblue layout: true class: bg-light, center, middle --- name: dblue layout: true class: bg-dark, center, middle --- template: dblue class: title, h1-big, pinkie-list # A 10 Minute Guide to Choosing a Realtime Framework * Phil @leggetter * Head of Evangelism * Pusher ??? * 15 years - realtime tech * before probably all solutions existed * so many frameworks = difficult to choose --- template: dblue class: title, h1-big !(./themes/pusher-default/img/pusher-logos/pusher-slogan-dark.png) ??? * Our logo * Interested in realtime? * Come by our booth * Love to hear what you're building --- template: dblue class: h1-big # What is Realtime? ??? * No real time for detail * But a few examples --- template: dblue class: em-text, bg-cover, trans-h background-image: url(./img/itv-news-may-2014.png) # Notifications & Signalling ??? * Something has happened * Changed * Alert - do something --- class: center, bg-cover, em-text, trans-h background-image: url(./img/delighted-app.gif) # Activity Streams ??? * a stream of activity * things have - and are - happening * synonymous with social apps * Twitter * Facebook * Google+ * News * Sports --- template: dblue class: bg-cover, em-text, trans-h background-image: url(./img/senate-election-results.png) # Data Visualizations --- template: lblue class: bg-video, trans-h, em-text # Chat
??? * The 101 of realtime * An interactive experience * Real-time matters --- template: lblue class: trans-h background-image: url(./img/sprintly.jpg) # Multi-User Collaboration ??? * Google Apps * Cloud 9 * TODO: other --- template: lblue class: bg-cover, trans-h background-image: url(./img/quizup.png) # Multiplayer Games --- template: dblue class: h2-big background-image: url(./themes/pusher-default/img/code-back.jpg) ## You want this functionality. ##
But, how do you choose a Realtime Framework?
--- template: lblue class: h1-big, bg-cover background-image: url(./img/maybee.gif) ## Use Socket.IO, right? --- template: lblue class: h1-big, bg-cover, em-text background-image: url(./img/falkirk-wheel.gif) # 1. Use an existing solution ## Don't reinvent the wheel
Unless you've a unique use case
??? * Less initial overhead - quick Integration * As project grows complexity increases * Updating request/response cycle may impact realtime functionality and vise-versa * Likely that the web server is handling load of both standard HTTP and realtime i.e. WebSocket, Server-Sent Events, HTTP fallbacks --- template: lblue class: bottom background-image: url(./img/realtime-web-stack-integration-self-hosted.png) ### Self Hosted
??? * Generally agreed that a loosely coupled architecture is going to be easier to change and maintain * Your DB may even be message-queue-capable e.g. Redis. * So you simply need to hook your realtime server into that * Web App for HTTP * Realtime for realtime functionality * Scale-out realtime server in the same way as web server --- template: lblue class: fill-img ### Hosted !(./img/realtime-web-stack-integration-hosted.png) ??? * Load-balancing connections * Maintaining state of connections * Synchronising data between nodes * Mapping connections to users? * Dedicated hosted service will offer : * Make things easier and faster * Reduce scaling complexities * Natural loose coupling via an API * Where is your value? * Features v Infrastructure --- template: lblue class: block ## Shout-out to Hosted Services .left[* Dropbox * Fanout.io * Firebase * GDrive Realtime API * Hydna * Meteor] .right[* PubNub * Pusher * Realtime.co * Simperium * Syncano] --- template: lblue # You are just starting out * Architecture considerations * Loose coupling * Hosted? * Go all-in with a "new breed of framework" --- template: lblue ### Realtime Framework * Meteor & hosted offering * SailsJS * SocketStream ### BaaS (Back-end as a Service) * Firebase * Simperium See: http://nobackend.org/ ??? * A Framework where you can self-host * Or hosted service: a BaaS where your can focus mainly on front-end functionality * In both cases: Realtime is baked in * In some cases even HTML templating will be baked in * and those templates will auto-updated when you update data structures * Will "Realtime" simply become an expected piece of functionality in the same way we expect to be able to persist data? --- template: dblue ## 5 Realtime Framework Considerations 1. Use an Existing Solution 2. Use a language you're comfortable with 3. Do you need native mobile support? 4. onMessage, PubSub (Evented), RMI or DataSync 5. Where in development? --- template: dblue class: title, h1-big, pinkie-list * Phil @leggetter * Head of Evangelism * Pusher