1) Realtime applications are becoming more mainstream as internet usage grows and technologies improve to enable realtime experiences. The internet is now a communications and entertainment platform.
2) Factors driving realtime applications include accessible technologies like WebSockets, improved server capabilities, and the need for up-to-date and engaging experiences with notifications, signaling, and data synchronization.
3) Popular realtime technologies now include messaging/signaling solutions like Socket.IO, data streaming with Pusher, collaborative editing with Firebase, and integrating realtime with other APIs and devices for IoT applications. Realtime connects the internet of things, web browsers, servers, native apps, and devices.
5. Internet Usage (per day)
†
200 billion emails
7 million blog posts written
500 million tweets
55 million Facebook status updates
5 billion Google+ +1's
60 million Instagram photos posted
33 million hours of Netflix watched
200 million hours of YouTube watched
2 billion minutes spent on Skype
6. The Internet...
1. is
the
communications
platform
2. is
becoming
the
entertainment
platform
15. What made it difficult?
HTTP - request/response paradigm
Keeping persistent HTTP connections alive
No cross-browser XMLHttpRequest
2 connection limit
No browser cross origin support
General cross browser incompatibilities
50. Server
public class GameHub : Hub {
public void Move(Player p, int x, int y) {
// Check if move is allowed
// Call the broadcastMessage method to update clients.
Clients.All.playerMoved(p, x, y);
}
}
Client
$.connection.hub.start(); // async
var game = $.connection.gameHub;
game.client.playerMoved = function (player, x, y) {
// update game
};
game.server.move( me, x, y );
57. DataSync
var myDataRef = new Firebase('https://my-app.firebaseio.com/');
myDataRef.push( {creator: '@leggetter', text: 'Not a Test!'} );
myDataRef.on( 'child_added', function(snapshot) {
// Add the data
});
myDataRef.on( 'child_changed', function(snapshot) {
// Update the data
});
myDataRef.on( 'child_removed', function(snapshot) {
// Remove the data
});
58. Data Sync Solutions
Self Hosted:
+
Hosted:
DerbyJS
Meteor
CouchDB pouchdb
Firebase
Google Drive Realtime API
GoInstant
Realtime.co
Simperium