SlideShare una empresa de Scribd logo
1 de 183
Descargar para leer sin conexión
PHIL @LEGGETTER
Head of Developer Relations
2 / 121
@leggetter
3 / 121
@leggetter
What we'll cover
1. Why Real-Time?
2. Common Real-Time Use Cases
3. What are your options?
How do you choose?
.NET examples
Pros & Cons
4. The Future of Real-Time
4 / 121
@leggetter
When do we need Realtime?
5 / 121
@leggetter
WCaaS
6 / 121
@leggetter
WCaaS
Data: Is there a timely nature to the data?
6 / 121
@leggetter
7 / 121
@leggetter
User Experience: Is there a timely nature to the
experience?
7 / 121
@leggetter
Realtime is required when there's a Need or
Demand for:
Up to date information
Interaction to maintain engagement (UX)
8 / 121
@leggetter
These aren't new Needs or Demands
But...
9 / 121
@leggetter
These aren't new Needs or Demands
But...
The Internet
9 / 121
@leggetter
Internet
“a global computer network providing a variety
of information and communication facilities,
consisting of interconnected networks using
standardized communication protocols.
10 / 121
@leggetter
11 / 121
@leggetter
12 / 121
@leggetter
13 / 121
@leggetter
HTTP was better. But many wanted more.
14 / 121
@leggetter
15 / 121
@leggetter
16 / 121
@leggetter
17 / 121
@leggetter
HTTP + Browsers were restrictive
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
18 / 121
@leggetter
HTTP + Browsers were restrictive
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
So we HACKED! Java Applets, Flash, HTTP Hacks
18 / 121
@leggetter
Then Real-Time Went Mainstream
19 / 121
@leggetter
Social
20 / 121
@leggetter
Technology Advancements
Memory & CPU speed and cost
The Cloud
Browser standardisation & enhancements
Any client can use the standards
21 / 121
@leggetter
22 / 121
@leggetter
MASSIVE Increase in Internet Usage
23 / 121
@leggetter
Internet Usage (per day)
200 billion emails
24 / 121
@leggetter
Internet Usage (per day)
200 billion emails
7 million blog posts written†
500 million tweets
30 billion WhatsApp messages
24 / 121
@leggetter
Internet Usage (per day)
200 billion emails
7 million blog posts written†
500 million tweets
30 billion WhatsApp messages
55 million Facebook status updates
5 billion Google+ +1's
60 million Instagram photos posted
2 billion minutes spent on Skype
33 million hours of Netflix watched
750 million hours of YouTube watched
24 / 121
@leggetter
25 / 121
@leggetter
Common Real-Time Use Cases
26 / 121
@leggetter
Notifications & Activity Streams
27 / 121
@leggetter
Data Visualizations
28 / 121
@leggetter
29 / 121
Chat
@leggetter
30 / 121
@leggetter
Real-Time Location Tracking
31 / 121
@leggetter
Multi-User Collaboration
32 / 121
@leggetter
WebRTC Powered AV Chat
33 / 121
@leggetter
34 / 121
@leggetter
Users expect a real-time UX
34 / 121
@leggetter
Users expect a real-time UX
Without a real-time UX your app appears
broken
34 / 121
@leggetter
Real-time Web Apps & .NET
What are your options?
35 / 121
@leggetter
7 Factors to Consider
36 / 121
@leggetter
1. Should you keep on polling?
37 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
38 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, with a 10 second polling interval
38 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, with a 10 second polling interval
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
38 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, with a 10 second polling interval
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
4. Poll requests per user/minute = (60 / 10) = 6
38 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, with a 10 second polling interval
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
4. Poll requests per user/minute = (60 / 10) = 6
5. Poll requests per user/hour = (6 * 60) = 360
38 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, with a 10 second polling interval
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
4. Poll requests per user/minute = (60 / 10) = 6
5. Poll requests per user/hour = (6 * 60) = 360
6. Poll requests site wide per hour = (360 * 10,000) = 3,600,000
38 / 121
@leggetter
Polling Calculations
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, with a 10 second polling interval
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
4. Poll requests per user/minute = (60 / 10) = 6
5. Poll requests per user/hour = (6 * 60) = 360
6. Poll requests site wide per hour = (360 * 10,000) = 3,600,000
With polling the site would need to handle 3.65 Million requests per hour
Or 50k HTTP requests + maintain 10k persistent connections?
38 / 121
@leggetter
Cache - clients keep polling
Push Proxy solutions
fanout.io
streamdata.io
Quick Win solutions
39 / 121
@leggetter
2. Use an existing solution
Don't reinvent the wheel
Unless you've a unique use case
40 / 121
@leggetter
Why use an existing solution?
Connection fallback/upgrade hacks still required
WebSocket: 91% of connections
HTTP fallback: 9% of connections
41 / 121
@leggetter
Why use an existing solution?
Connection fallback/upgrade hacks still required
WebSocket: 91% of connections
HTTP fallback: 9% of connections
Support/Community
41 / 121
@leggetter
Why use an existing solution?
Connection fallback/upgrade hacks still required
WebSocket: 91% of connections
HTTP fallback: 9% of connections
Support/Community
Maintenance
41 / 121
@leggetter
Why use an existing solution?
Connection fallback/upgrade hacks still required
WebSocket: 91% of connections
HTTP fallback: 9% of connections
Support/Community
Maintenance
Future features
41 / 121
@leggetter
Why use an existing solution?
Connection fallback/upgrade hacks still required
WebSocket: 91% of connections
HTTP fallback: 9% of connections
Support/Community
Maintenance
Future features
Scaling
41 / 121
@leggetter
42 / 121
@leggetter
j.mp/realtime-tech-guide
42 / 121
@leggetter
3. Use languages you're comfortable
with
43 / 121
@leggetter
3. Use languages you're comfortable
with
43 / 121
@leggetter
Solutions by language
PHP: Ratchet, dNode-php
Java: Netty, Jetty
JavaScript (Node.JS): Faye, Socket.IO (Engine.IO), Primus.io
.NET (C#): SignalR, XSockets
Python: Lots of options built on Tornado
Ruby: em-websocket, Faye
Language agnostic: most hosted services
44 / 121
@leggetter
4. Mobile Friendly?
45 / 121
@leggetter
Mobile Friendly
Only some have mobile libraries
46 / 121
@leggetter
Mobile Friendly
Only some have mobile libraries
How much data are you sending?
46 / 121
@leggetter
Mobile Friendly
Only some have mobile libraries
How much data are you sending?
SSL required on 3/4G networks
46 / 121
@leggetter
5. Application/Solution
Communication Patterns
47 / 121
@leggetter
5. Application/Solution
Communication Patterns
How does the client/server & client/client communicate
47 / 121
@leggetter
Simple Messaging
48 / 121
@leggetter
0:00 49 / 121
@leggetter
Internet ^5 Machine
0:00 49 / 121
@leggetter
Internet ^5 Machine
Simple Messaging
// client
var ws = new WebSocket('wss://localhost/');
50 / 121
@leggetter
Simple Messaging
// client
var ws = new WebSocket('wss://localhost/');
ws.onmessage = function(evt) {
var data = JSON.parse(evt.data);
50 / 121
@leggetter
Simple Messaging
// client
var ws = new WebSocket('wss://localhost/');
ws.onmessage = function(evt) {
var data = JSON.parse(evt.data);
// ^5
performHighFive();
};
50 / 121
@leggetter
Simple Messaging
// client
var ws = new WebSocket('wss://localhost/');
ws.onmessage = function(evt) {
var data = JSON.parse(evt.data);
// ^5
performHighFive();
};
// server
server.on('connection', function(socket){
50 / 121
@leggetter
Simple Messaging
// client
var ws = new WebSocket('wss://localhost/');
ws.onmessage = function(evt) {
var data = JSON.parse(evt.data);
// ^5
performHighFive();
};
// server
server.on('connection', function(socket){
socket.send(JSON.stringify({action: 'high-5'}));
});
50 / 121
@leggetter
Simple Messaging
using Nexmo.Api;
// SMS
var results = SMS.Send(new SMS.SMSRequest
{
from = "15555551212",
to = "17775551212",
text = "this is a test"
});
// Voice
var result = Voice.TextToSpeech(new Voice.TextToSpeechCallCommand
{
to = "17775551212",
from = "15555551212",
text = "Hello from Nexmo"
});
51 / 121
@leggetter
PubSub
52 / 121
@leggetter
53 / 121
@leggetter
PubSub
// client
var client = new Faye.Client('http://localhost:8000/faye');
54 / 121
@leggetter
PubSub
// client
var client = new Faye.Client('http://localhost:8000/faye');
client.subscribe('/leggetter-updates', function(data) {
54 / 121
@leggetter
PubSub
// client
var client = new Faye.Client('http://localhost:8000/faye');
client.subscribe('/leggetter-updates', function(data) {
console.log(data.text);
});
54 / 121
@leggetter
PubSub
// client
var client = new Faye.Client('http://localhost:8000/faye');
client.subscribe('/leggetter-updates', function(data) {
console.log(data.text);
});
client.subscribe('/leggetter-dm-notifications', function(data) {
console.log(data.count);
});
54 / 121
@leggetter
PubSub
// client
var client = new Faye.Client('http://localhost:8000/faye');
client.subscribe('/leggetter-updates', function(data) {
console.log(data.text);
});
client.subscribe('/leggetter-dm-notifications', function(data) {
console.log(data.count);
});
// server
server.publish('/leggetter-updates', {text: 'Hello DevWeek!'});
54 / 121
@leggetter
PubSub
// client
var client = new Faye.Client('http://localhost:8000/faye');
client.subscribe('/leggetter-updates', function(data) {
console.log(data.text);
});
client.subscribe('/leggetter-dm-notifications', function(data) {
console.log(data.count);
});
// server
server.publish('/leggetter-updates', {text: 'Hello DevWeek!'});
server.publish('/leggetter-dm-notifications', {count: 2});
54 / 121
@leggetter
Evented PubSub
55 / 121
@leggetter
Evented PubSub
// client
var updates = io('/leggetter-updates');
56 / 121
@leggetter
Evented PubSub
// client
var updates = io('/leggetter-updates');
updates.on('created', function (data) {
// Add activity to UI
});
56 / 121
@leggetter
Evented PubSub
// client
var updates = io('/leggetter-updates');
updates.on('created', function (data) {
// Add activity to UI
});
updates.on('updated', function(data) {
// Update activity
});
updates.on('deleted', function(data) {
// Remove activity
});
56 / 121
@leggetter
Evented PubSub
// client
var updates = io('/leggetter-updates');
updates.on('created', function (data) {
// Add activity to UI
});
updates.on('updated', function(data) {
// Update activity
});
updates.on('deleted', function(data) {
// Remove activity
});
// server
var io = require('socket.io')();
var updates = io.of('/leggetter-updates');
56 / 121
@leggetter
Evented PubSub
// client
var updates = io('/leggetter-updates');
updates.on('created', function (data) {
// Add activity to UI
});
updates.on('updated', function(data) {
// Update activity
});
updates.on('deleted', function(data) {
// Remove activity
});
// server
var io = require('socket.io')();
var updates = io.of('/leggetter-updates');
updates.emit('created', {text: 'PubSub Rocks!', id: 1});
56 / 121
@leggetter
Evented PubSub
// client
var updates = io('/leggetter-updates');
updates.on('created', function (data) {
// Add activity to UI
});
updates.on('updated', function(data) {
// Update activity
});
updates.on('deleted', function(data) {
// Remove activity
});
// server
var io = require('socket.io')();
var updates = io.of('/leggetter-updates');
updates.emit('created', {text: 'PubSub Rocks!', id: 1});
updates.emit('updated', {text: 'Evented PubSub Rocks!', id: 1});
updates.emit('deleted', {id: 1});
56 / 121
@leggetter
PubSub vs. Evented PubSub
57 / 121
@leggetter
58 / 121
@leggetter
59 / 121
@leggetter
PubSub
client.subscribe('devexp-channel', function(data) {
if(data.eventType === 'chat-message') {
addMessage(data.message);
}
60 / 121
@leggetter
PubSub
client.subscribe('devexp-channel', function(data) {
if(data.eventType === 'chat-message') {
addMessage(data.message);
}
else if(data.eventType === 'channel-purposed-changed') {
updateRoomTitle(data.purpose);
}
else if(/* and so on */) {
}
})
60 / 121
@leggetter
PubSub
client.subscribe('devexp-channel', function(data) {
if(data.eventType === 'chat-message') {
addMessage(data.message);
}
else if(data.eventType === 'channel-purposed-changed') {
updateRoomTitle(data.purpose);
}
else if(/* and so on */) {
}
})
Evented PubSub
var devexp = io('/devexp-channel');
devexp.on('chat-message', addMessage);
devexp.on('channel-purposed-changed', updateChannelPurpose);
60 / 121
@leggetter
PubSub
client.subscribe('devexp-channel', function(data) {
if(data.eventType === 'chat-message') {
addMessage(data.message);
}
else if(data.eventType === 'channel-purposed-changed') {
updateRoomTitle(data.purpose);
}
else if(/* and so on */) {
}
})
Evented PubSub
var devexp = io('/devexp-channel');
devexp.on('chat-message', addMessage);
devexp.on('channel-purposed-changed', updateChannelPurpose);
devexp.on('current-topic-changed', updateChannelTopic);
devexp.on('user-online', userOnline);
devexp.on('user-offline', userOffline);
60 / 121
@leggetter
DataSync
61 / 121
@leggetter
62 / 121
@leggetter
Data Sync
// client
var ref = new Firebase("https://app.firebaseio.com/doc1/lines");
63 / 121
@leggetter
Data Sync
// client
var ref = new Firebase("https://app.firebaseio.com/doc1/lines");
ref.on('child_added', function(childSnapshot, prevChildKey) {
// code to handle new child.
});
63 / 121
@leggetter
Data Sync
// client
var ref = new Firebase("https://app.firebaseio.com/doc1/lines");
ref.on('child_added', function(childSnapshot, prevChildKey) {
// code to handle new child.
});
ref.on('child_changed', function(childSnapshot, prevChildKey) {
// code to handle child data changes.
});
63 / 121
@leggetter
Data Sync
// client
var ref = new Firebase("https://app.firebaseio.com/doc1/lines");
ref.on('child_added', function(childSnapshot, prevChildKey) {
// code to handle new child.
});
ref.on('child_changed', function(childSnapshot, prevChildKey) {
// code to handle child data changes.
});
ref.on('child_removed', function(oldChildSnapshot) {
// code to handle child removal.
});
63 / 121
@leggetter
Data Sync
// client
var ref = new Firebase("https://app.firebaseio.com/doc1/lines");
ref.on('child_added', function(childSnapshot, prevChildKey) {
// code to handle new child.
});
ref.on('child_changed', function(childSnapshot, prevChildKey) {
// code to handle child data changes.
});
ref.on('child_removed', function(oldChildSnapshot) {
// code to handle child removal.
});
ref.push({ 'editor_id': 'leggetter', 'text': 'Nexmo Rocks!' });
63 / 121
@leggetter
Data Sync
// client
var ref = new Firebase("https://app.firebaseio.com/doc1/lines");
ref.on('child_added', function(childSnapshot, prevChildKey) {
// code to handle new child.
});
ref.on('child_changed', function(childSnapshot, prevChildKey) {
// code to handle child data changes.
});
ref.on('child_removed', function(oldChildSnapshot) {
// code to handle child removal.
});
ref.push({ 'editor_id': 'leggetter', 'text': 'Nexmo Rocks!' });
Framework handles updates to other clients
63 / 121
@leggetter
RMI (aka RPC)
64 / 121
@leggetter
65 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
66 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
chat.client.broadcastMessage = function (name, message) {
// handle message
};
66 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
chat.client.broadcastMessage = function (name, message) {
// handle message
};
chat.server.send( 'me', 'hello world' );
66 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
chat.client.broadcastMessage = function (name, message) {
// handle message
};
chat.server.send( 'me', 'hello world' );
$.connection.hub.start(); // async
66 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
chat.client.broadcastMessage = function (name, message) {
// handle message
};
chat.server.send( 'me', 'hello world' );
$.connection.hub.start(); // async
// server
public class ChatHub : Hub
{
66 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
chat.client.broadcastMessage = function (name, message) {
// handle message
};
chat.server.send( 'me', 'hello world' );
$.connection.hub.start(); // async
// server
public class ChatHub : Hub
{
public void Send(string name, string message)
{
66 / 121
@leggetter
RMI
// client
var chat = $.connection.chatHub;
chat.client.broadcastMessage = function (name, message) {
// handle message
};
chat.server.send( 'me', 'hello world' );
$.connection.hub.start(); // async
// server
public class ChatHub : Hub
{
public void Send(string name, string message)
{
// Call the broadcastMessage method to update clients.
Clients.All.broadcastMessage(name, message);
}
}
66 / 121
@leggetter
67 / 121
@leggetter
68 / 121
@leggetter
69 / 121
@leggetter
70 / 121
@leggetter
71 / 121
@leggetter
6. Deployment & Architecture
Considerations
72 / 121
@leggetter
Code
https://github.com/leggetter/realtime-dotnet-examples
Short link: http://j.mp/rt-dotnet-ex
73 / 121
@leggetter
Self Hosted (Tightly Coupled) 74 / 121
@leggetter
.NET Self-Hosted Real-Time options
SignalR
XSockets
75 / 121
@leggetter
76 / 121
@leggetter
Self-Hosted Demo 1: ASP.NET + SignalR (Tightly Coupled)
76 / 121
@leggetter
What we'll look at:
ReferencesMicrosoft.AspNet.SignalR.*
Scriptsjquery.signalR*.js
App_StartSignalRStartup.cs
ControllersHomeController.cs
HubsChatHub.cs
ViewsHomeSignalR.cshtml
ScriptchatSignalRChat.js
77 / 121
@leggetter
Pros
.NET
Simple integration
MS Supported
jQuery Dependency
Cons
Tightly coupled
RMI only
Self-Scaling
Scaling (realtime + HTTP)
Self-Hosted Demo 1: Pro & Cons
78 / 121
@leggetter
79 / 121
@leggetter
Self-Hosted Demo 2: ASP.NET + XSockets (Tightly Coupled)
79 / 121
@leggetter
What we'll look at:
ReferencesXSockets.*
App_StartXSocketsStartup.cs
ControllersHomeController.cs
XSocketsChatController.cs
ViewsHomeXSockets.cshtml
ScriptsXSockets.latest.js
ScriptchatXSocketsChat.cs
80 / 121
@leggetter
Pros
.NET
Simple integration
Communication patterns
PubSub/Evented
RMI
Licensed
Cons
Tightly coupled
Self-Scaling
Scaling (realtime + HTTP)
Licensed
Self-Hosted Demo 2: Pro & Cons
81 / 121
@leggetter
Self-Hosted: .NET + Message Queue (Loosely Coupled)
82 / 121
@leggetter
83 / 121
@leggetter
Pros
.NET
Maps well to PubSub
Loosely coupled
Could use another runtime
Cons
How does it fit with RMI/SignalR?
Multiple components
Self-scaling
Queue routing questions
In: HTTP. Out: WebSocket
Self-Hosted: .NET + Message Queue - Pro &
Cons
84 / 121
@leggetter
85 / 121
@leggetter
Self-Hosted: ASP.NET + Faye
(Loosely Coupled)
85 / 121
@leggetter
Pros
PubSub
Connection fallback
Redis Queue support
Simple integration
Cons
Not .NET(?)
You need to scale
Self-Hosted + Faye: Pros & Cons
86 / 121
@leggetter
.NET Hosted Real-Time options
Ably
Firebase
Fanout
PubNub
Pusher
Realtime.co
Syncano
87 / 121
@leggetter
88 / 121
@leggetter
Hosted Demo: Pusher
88 / 121
@leggetter
What we'll look at:
ReferencesPusherServer
ControllersHomeController.cs
ViewsHomePusher.cshtml
ScriptchatPusherChat.js
Pusher Debug Console
89 / 121
@leggetter
Pros
Simple & powerful
Instantly scalable
Managed & dedicated
Direct integration. No overhead.
Cons
3rd party reliance
Difficult to influence functionality
Hosted - Pros & Cons
90 / 121
@leggetter
Why use a hosted service?
Scenario
1. Site average of 10,000 Users
91 / 121
@leggetter
Why use a hosted service?
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, no polling
91 / 121
@leggetter
Why use a hosted service?
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, no polling
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
91 / 121
@leggetter
Why use a hosted service?
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, no polling
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
4. That's it! Total: 50,000
91 / 121
@leggetter
Why use a hosted service?
Scenario
1. Site average of 10,000 Users
2. Over 1 Hour, no polling
3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000
4. That's it! Total: 50,000
Your servers handle 50k requests per hour instead of 3.6M
You offload the polling or persistent connections to the service
91 / 121
@leggetter
7. Self-Hosted v Hosted
"Build vs. Buy"
92 / 121
@leggetter
Build vs. Buy - Costs
baremetrics.com/calculator
93 / 121
@leggetter
How do you choose?
7 Realtime Framework Considerations
1. Should you keep on polling?
2. Use an Existing Solution
3. Use a language you're comfortable with
4. Do you need native mobile support?
5. Simple Messaging, PubSub/Evented, RMI or DataSync
6. Architectural considerations
7. Hosted v Self-Hosted (Build vs. Buy)
94 / 121
@leggetter
Future
95 / 121
@leggetter
Network Infrastructure & Protocols
Reliability
Speed
Beyond HTTP
HTTP2
96 / 121
@leggetter
Bayeux
DDP
dNode
EPCP
GRIP
gRPC
MQTT
Pusher Protocol
STOMP
SignalR Protocol
WAMP (Web App Messaging Protocol)
XMPP (various)
Communication Pattern Protocol
Standardisation
97 / 121
@leggetter
98 / 121
@leggetter
Firebase
GitHub
Iron.io
MailChimp
MailJet
PagerDuty
Nexmo
SendGrid
Real-Time APIs
99 / 121
@leggetter
100 / 121
@leggetter
More "Things"!
101 / 121
@leggetter
The Physical Web
102 / 121
@leggetter
IoT, Apps & Developers
103 / 121
@leggetter
A thing can be anything
104 / 121
@leggetter
A thing can be anything
Sensors
Appliances
Vehicles
Smart Phones
Devices (Arduino, Electric Imp, Raspberry Pi etc.)
104 / 121
@leggetter
A thing can be anything
Sensors
Appliances
Vehicles
Smart Phones
Devices (Arduino, Electric Imp, Raspberry Pi etc.)
Servers
Browsers
Apps: Native, Web, running anywhere
104 / 121
@leggetter
The Majority of code we'll write will still be
for "Apps"
Configuring
Monitoring
Interacting
App Logic
105 / 121
@leggetter
Real-Time Use Case Evolution
Notifications & Signalling
Activity Streams
Data Viz & Polls
Chat
Collaboration
Multiplayer Games
106 / 121
@leggetter
Notifications/Activity Streams -> Actions
107 / 121
@leggetter
The end of apps as we know it - Intercom
Subscriptions
108 / 121
@leggetter
Personalised Event Streams
109 / 121
@leggetter
Unified UIs
110 / 121
@leggetter
Chat & Bots for Everything and the rise of the .ai domain 111 / 121
@leggetter
600M MAUs
10M integrations
app-within-an-app model
taxi, order food, tickets, games etc.
WeChat
112 / 121
@leggetter
Chat Integrations
113 / 121
@leggetter
Siri
Google Now
Microso Cortana
Facebook M
Chat "Virtual Assistants"
114 / 121
@leggetter
115 / 121
@leggetter
Chat has evolved. Chat is now a platform!
116 / 121
@leggetter
Multi-Device Experiences
117 / 121
@leggetter
Ben Foxall - A conceptual future for the multi-device web (FutureJS 2014)
118 / 121
@leggetter
You need Real-Time!
There are lots of options.
Make the choice that's right for you.
I hope this helps!
119 / 121
@leggetter
Resources
Real-time Tech Guide
github.com/leggetter/realtime-dotnet-examples
Tools, Tips and Techniques for Developing Real-
time Apps
Nexmo
120 / 121
@leggetter
Real-time Web Apps & .NET
What are your options?
Questions?
PHIL @LEGGETTER
Head of Developer Relations
121 / 121
@leggetter

Más contenido relacionado

La actualidad más candente

Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comIlya Grigorik
 
0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-Services0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-ServicesIlya Grigorik
 
Forensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsForensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsNicholas Jansma
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!jfarcand
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHPKing Foo
 
Communication in Python and the C10k problem
Communication in Python and the C10k problemCommunication in Python and the C10k problem
Communication in Python and the C10k problemJose Galarza
 
Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014Nenad Pecanac
 
Building WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using AtmosphereBuilding WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using Atmospherejfarcand
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsSergi Almar i Graupera
 
TLS - 2016 Velocity Training
TLS - 2016 Velocity TrainingTLS - 2016 Velocity Training
TLS - 2016 Velocity TrainingPatrick Meenan
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scalajfarcand
 
The Atmosphere Framework
The Atmosphere FrameworkThe Atmosphere Framework
The Atmosphere Frameworkjfarcand
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.jsPrabin Silwal
 
GWT Web Socket and data serialization
GWT Web Socket and data serializationGWT Web Socket and data serialization
GWT Web Socket and data serializationGWTcon
 
0-60 with Goliath: High performance web services
0-60 with Goliath: High performance web services0-60 with Goliath: High performance web services
0-60 with Goliath: High performance web servicesIlya Grigorik
 

La actualidad más candente (20)

The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
 
0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-Services0-60 with Goliath: Building High Performance Ruby Web-Services
0-60 with Goliath: Building High Performance Ruby Web-Services
 
Forensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsForensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance Investigations
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
 
Communication in Python and the C10k problem
Communication in Python and the C10k problemCommunication in Python and the C10k problem
Communication in Python and the C10k problem
 
Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014
 
Building WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using AtmosphereBuilding WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using Atmosphere
 
WebSockets with Spring 4
WebSockets with Spring 4WebSockets with Spring 4
WebSockets with Spring 4
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
 
TLS - 2016 Velocity Training
TLS - 2016 Velocity TrainingTLS - 2016 Velocity Training
TLS - 2016 Velocity Training
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
 
The Atmosphere Framework
The Atmosphere FrameworkThe Atmosphere Framework
The Atmosphere Framework
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
GWT Web Socket and data serialization
GWT Web Socket and data serializationGWT Web Socket and data serialization
GWT Web Socket and data serialization
 
Measuring Continuity
Measuring ContinuityMeasuring Continuity
Measuring Continuity
 
About Node.js
About Node.jsAbout Node.js
About Node.js
 
0-60 with Goliath: High performance web services
0-60 with Goliath: High performance web services0-60 with Goliath: High performance web services
0-60 with Goliath: High performance web services
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
 

Similar a Real-Time Web Apps & .NET - What are your options?

Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016Phil Leggetter
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsPhil Leggetter
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsPhil Leggetter
 
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil LeggetterTools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil LeggetterFuture Insights
 
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Soroosh Khodami
 
Realtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondRealtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondPhil Leggetter
 
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Nati Shalom
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaborationJulien Pivotto
 
Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013Siva Arunachalam
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimizationwipjam
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15streamdata.io
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01purans
 
SignalR + Mobile Possibilities
SignalR + Mobile PossibilitiesSignalR + Mobile Possibilities
SignalR + Mobile PossibilitiesSam Basu
 
Is your mobile app up to speed softwaresymposium
Is your mobile app up to speed softwaresymposiumIs your mobile app up to speed softwaresymposium
Is your mobile app up to speed softwaresymposiumDoug Sillars
 
IRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET Journal
 

Similar a Real-Time Web Apps & .NET - What are your options? (20)

Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and Communications
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and Communications
 
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil LeggetterTools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
 
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
 
Realtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondRealtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & Beyond
 
Webware Webinar
Webware WebinarWebware Webinar
Webware Webinar
 
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaboration
 
Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013
 
Web-Socket
Web-SocketWeb-Socket
Web-Socket
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimization
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerryjWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
 
SignalR + Mobile Possibilities
SignalR + Mobile PossibilitiesSignalR + Mobile Possibilities
SignalR + Mobile Possibilities
 
WebSockets in JEE 7
WebSockets in JEE 7WebSockets in JEE 7
WebSockets in JEE 7
 
Is your mobile app up to speed softwaresymposium
Is your mobile app up to speed softwaresymposiumIs your mobile app up to speed softwaresymposium
Is your mobile app up to speed softwaresymposium
 
IRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time Communication
 

Más de Phil Leggetter

An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...Phil Leggetter
 
How APIs Enable Contextual Communications
How APIs Enable Contextual CommunicationsHow APIs Enable Contextual Communications
How APIs Enable Contextual CommunicationsPhil Leggetter
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...Phil Leggetter
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...Phil Leggetter
 
Contextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JSContextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JSPhil Leggetter
 
What's the ROI of Developer Relations?
What's the ROI of Developer Relations?What's the ROI of Developer Relations?
What's the ROI of Developer Relations?Phil Leggetter
 
Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Phil Leggetter
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Phil Leggetter
 
Real-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondReal-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondPhil Leggetter
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Phil Leggetter
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015Phil Leggetter
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScalePhil Leggetter
 
BladeRunnerJS Show & Tell
BladeRunnerJS Show & TellBladeRunnerJS Show & Tell
BladeRunnerJS Show & TellPhil Leggetter
 
Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014Phil Leggetter
 
How to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSPhil Leggetter
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Phil Leggetter
 
What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012Phil Leggetter
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsPhil Leggetter
 

Más de Phil Leggetter (20)

An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
 
How APIs Enable Contextual Communications
How APIs Enable Contextual CommunicationsHow APIs Enable Contextual Communications
How APIs Enable Contextual Communications
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
 
Contextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JSContextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JS
 
What's the ROI of Developer Relations?
What's the ROI of Developer Relations?What's the ROI of Developer Relations?
What's the ROI of Developer Relations?
 
Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
 
Real-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondReal-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & Beyond
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that Scale
 
BladeRunnerJS Show & Tell
BladeRunnerJS Show & TellBladeRunnerJS Show & Tell
BladeRunnerJS Show & Tell
 
Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014
 
How to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJS
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
 
What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communications
 

Último

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 

Último (20)

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 

Real-Time Web Apps & .NET - What are your options?

  • 1.
  • 2. PHIL @LEGGETTER Head of Developer Relations 2 / 121 @leggetter
  • 4. What we'll cover 1. Why Real-Time? 2. Common Real-Time Use Cases 3. What are your options? How do you choose? .NET examples Pros & Cons 4. The Future of Real-Time 4 / 121 @leggetter
  • 5. When do we need Realtime? 5 / 121 @leggetter
  • 7. WCaaS Data: Is there a timely nature to the data? 6 / 121 @leggetter
  • 9. User Experience: Is there a timely nature to the experience? 7 / 121 @leggetter
  • 10. Realtime is required when there's a Need or Demand for: Up to date information Interaction to maintain engagement (UX) 8 / 121 @leggetter
  • 11. These aren't new Needs or Demands But... 9 / 121 @leggetter
  • 12. These aren't new Needs or Demands But... The Internet 9 / 121 @leggetter
  • 13. Internet “a global computer network providing a variety of information and communication facilities, consisting of interconnected networks using standardized communication protocols. 10 / 121 @leggetter
  • 17. HTTP was better. But many wanted more. 14 / 121 @leggetter
  • 21. HTTP + Browsers were restrictive 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 18 / 121 @leggetter
  • 22. HTTP + Browsers were restrictive 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 So we HACKED! Java Applets, Flash, HTTP Hacks 18 / 121 @leggetter
  • 23. Then Real-Time Went Mainstream 19 / 121 @leggetter
  • 25. Technology Advancements Memory & CPU speed and cost The Cloud Browser standardisation & enhancements Any client can use the standards 21 / 121 @leggetter
  • 27. MASSIVE Increase in Internet Usage 23 / 121 @leggetter
  • 28. Internet Usage (per day) 200 billion emails 24 / 121 @leggetter
  • 29. Internet Usage (per day) 200 billion emails 7 million blog posts written† 500 million tweets 30 billion WhatsApp messages 24 / 121 @leggetter
  • 30. Internet Usage (per day) 200 billion emails 7 million blog posts written† 500 million tweets 30 billion WhatsApp messages 55 million Facebook status updates 5 billion Google+ +1's 60 million Instagram photos posted 2 billion minutes spent on Skype 33 million hours of Netflix watched 750 million hours of YouTube watched 24 / 121 @leggetter
  • 32. Common Real-Time Use Cases 26 / 121 @leggetter
  • 33. Notifications & Activity Streams 27 / 121 @leggetter
  • 34. Data Visualizations 28 / 121 @leggetter
  • 37. Real-Time Location Tracking 31 / 121 @leggetter
  • 39. WebRTC Powered AV Chat 33 / 121 @leggetter
  • 41. Users expect a real-time UX 34 / 121 @leggetter
  • 42. Users expect a real-time UX Without a real-time UX your app appears broken 34 / 121 @leggetter
  • 43. Real-time Web Apps & .NET What are your options? 35 / 121 @leggetter
  • 44. 7 Factors to Consider 36 / 121 @leggetter
  • 45. 1. Should you keep on polling? 37 / 121 @leggetter
  • 46. Polling Calculations Scenario 1. Site average of 10,000 Users 38 / 121 @leggetter
  • 47. Polling Calculations Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, with a 10 second polling interval 38 / 121 @leggetter
  • 48. Polling Calculations Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, with a 10 second polling interval 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 38 / 121 @leggetter
  • 49. Polling Calculations Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, with a 10 second polling interval 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 4. Poll requests per user/minute = (60 / 10) = 6 38 / 121 @leggetter
  • 50. Polling Calculations Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, with a 10 second polling interval 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 4. Poll requests per user/minute = (60 / 10) = 6 5. Poll requests per user/hour = (6 * 60) = 360 38 / 121 @leggetter
  • 51. Polling Calculations Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, with a 10 second polling interval 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 4. Poll requests per user/minute = (60 / 10) = 6 5. Poll requests per user/hour = (6 * 60) = 360 6. Poll requests site wide per hour = (360 * 10,000) = 3,600,000 38 / 121 @leggetter
  • 52. Polling Calculations Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, with a 10 second polling interval 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 4. Poll requests per user/minute = (60 / 10) = 6 5. Poll requests per user/hour = (6 * 60) = 360 6. Poll requests site wide per hour = (360 * 10,000) = 3,600,000 With polling the site would need to handle 3.65 Million requests per hour Or 50k HTTP requests + maintain 10k persistent connections? 38 / 121 @leggetter
  • 53. Cache - clients keep polling Push Proxy solutions fanout.io streamdata.io Quick Win solutions 39 / 121 @leggetter
  • 54. 2. Use an existing solution Don't reinvent the wheel Unless you've a unique use case 40 / 121 @leggetter
  • 55. Why use an existing solution? Connection fallback/upgrade hacks still required WebSocket: 91% of connections HTTP fallback: 9% of connections 41 / 121 @leggetter
  • 56. Why use an existing solution? Connection fallback/upgrade hacks still required WebSocket: 91% of connections HTTP fallback: 9% of connections Support/Community 41 / 121 @leggetter
  • 57. Why use an existing solution? Connection fallback/upgrade hacks still required WebSocket: 91% of connections HTTP fallback: 9% of connections Support/Community Maintenance 41 / 121 @leggetter
  • 58. Why use an existing solution? Connection fallback/upgrade hacks still required WebSocket: 91% of connections HTTP fallback: 9% of connections Support/Community Maintenance Future features 41 / 121 @leggetter
  • 59. Why use an existing solution? Connection fallback/upgrade hacks still required WebSocket: 91% of connections HTTP fallback: 9% of connections Support/Community Maintenance Future features Scaling 41 / 121 @leggetter
  • 62. 3. Use languages you're comfortable with 43 / 121 @leggetter
  • 63. 3. Use languages you're comfortable with 43 / 121 @leggetter
  • 64. Solutions by language PHP: Ratchet, dNode-php Java: Netty, Jetty JavaScript (Node.JS): Faye, Socket.IO (Engine.IO), Primus.io .NET (C#): SignalR, XSockets Python: Lots of options built on Tornado Ruby: em-websocket, Faye Language agnostic: most hosted services 44 / 121 @leggetter
  • 65. 4. Mobile Friendly? 45 / 121 @leggetter
  • 66. Mobile Friendly Only some have mobile libraries 46 / 121 @leggetter
  • 67. Mobile Friendly Only some have mobile libraries How much data are you sending? 46 / 121 @leggetter
  • 68. Mobile Friendly Only some have mobile libraries How much data are you sending? SSL required on 3/4G networks 46 / 121 @leggetter
  • 70. 5. Application/Solution Communication Patterns How does the client/server & client/client communicate 47 / 121 @leggetter
  • 71. Simple Messaging 48 / 121 @leggetter
  • 72. 0:00 49 / 121 @leggetter Internet ^5 Machine
  • 73. 0:00 49 / 121 @leggetter Internet ^5 Machine
  • 74. Simple Messaging // client var ws = new WebSocket('wss://localhost/'); 50 / 121 @leggetter
  • 75. Simple Messaging // client var ws = new WebSocket('wss://localhost/'); ws.onmessage = function(evt) { var data = JSON.parse(evt.data); 50 / 121 @leggetter
  • 76. Simple Messaging // client var ws = new WebSocket('wss://localhost/'); ws.onmessage = function(evt) { var data = JSON.parse(evt.data); // ^5 performHighFive(); }; 50 / 121 @leggetter
  • 77. Simple Messaging // client var ws = new WebSocket('wss://localhost/'); ws.onmessage = function(evt) { var data = JSON.parse(evt.data); // ^5 performHighFive(); }; // server server.on('connection', function(socket){ 50 / 121 @leggetter
  • 78. Simple Messaging // client var ws = new WebSocket('wss://localhost/'); ws.onmessage = function(evt) { var data = JSON.parse(evt.data); // ^5 performHighFive(); }; // server server.on('connection', function(socket){ socket.send(JSON.stringify({action: 'high-5'})); }); 50 / 121 @leggetter
  • 79. Simple Messaging using Nexmo.Api; // SMS var results = SMS.Send(new SMS.SMSRequest { from = "15555551212", to = "17775551212", text = "this is a test" }); // Voice var result = Voice.TextToSpeech(new Voice.TextToSpeechCallCommand { to = "17775551212", from = "15555551212", text = "Hello from Nexmo" }); 51 / 121 @leggetter
  • 82. PubSub // client var client = new Faye.Client('http://localhost:8000/faye'); 54 / 121 @leggetter
  • 83. PubSub // client var client = new Faye.Client('http://localhost:8000/faye'); client.subscribe('/leggetter-updates', function(data) { 54 / 121 @leggetter
  • 84. PubSub // client var client = new Faye.Client('http://localhost:8000/faye'); client.subscribe('/leggetter-updates', function(data) { console.log(data.text); }); 54 / 121 @leggetter
  • 85. PubSub // client var client = new Faye.Client('http://localhost:8000/faye'); client.subscribe('/leggetter-updates', function(data) { console.log(data.text); }); client.subscribe('/leggetter-dm-notifications', function(data) { console.log(data.count); }); 54 / 121 @leggetter
  • 86. PubSub // client var client = new Faye.Client('http://localhost:8000/faye'); client.subscribe('/leggetter-updates', function(data) { console.log(data.text); }); client.subscribe('/leggetter-dm-notifications', function(data) { console.log(data.count); }); // server server.publish('/leggetter-updates', {text: 'Hello DevWeek!'}); 54 / 121 @leggetter
  • 87. PubSub // client var client = new Faye.Client('http://localhost:8000/faye'); client.subscribe('/leggetter-updates', function(data) { console.log(data.text); }); client.subscribe('/leggetter-dm-notifications', function(data) { console.log(data.count); }); // server server.publish('/leggetter-updates', {text: 'Hello DevWeek!'}); server.publish('/leggetter-dm-notifications', {count: 2}); 54 / 121 @leggetter
  • 88. Evented PubSub 55 / 121 @leggetter
  • 89. Evented PubSub // client var updates = io('/leggetter-updates'); 56 / 121 @leggetter
  • 90. Evented PubSub // client var updates = io('/leggetter-updates'); updates.on('created', function (data) { // Add activity to UI }); 56 / 121 @leggetter
  • 91. Evented PubSub // client var updates = io('/leggetter-updates'); updates.on('created', function (data) { // Add activity to UI }); updates.on('updated', function(data) { // Update activity }); updates.on('deleted', function(data) { // Remove activity }); 56 / 121 @leggetter
  • 92. Evented PubSub // client var updates = io('/leggetter-updates'); updates.on('created', function (data) { // Add activity to UI }); updates.on('updated', function(data) { // Update activity }); updates.on('deleted', function(data) { // Remove activity }); // server var io = require('socket.io')(); var updates = io.of('/leggetter-updates'); 56 / 121 @leggetter
  • 93. Evented PubSub // client var updates = io('/leggetter-updates'); updates.on('created', function (data) { // Add activity to UI }); updates.on('updated', function(data) { // Update activity }); updates.on('deleted', function(data) { // Remove activity }); // server var io = require('socket.io')(); var updates = io.of('/leggetter-updates'); updates.emit('created', {text: 'PubSub Rocks!', id: 1}); 56 / 121 @leggetter
  • 94. Evented PubSub // client var updates = io('/leggetter-updates'); updates.on('created', function (data) { // Add activity to UI }); updates.on('updated', function(data) { // Update activity }); updates.on('deleted', function(data) { // Remove activity }); // server var io = require('socket.io')(); var updates = io.of('/leggetter-updates'); updates.emit('created', {text: 'PubSub Rocks!', id: 1}); updates.emit('updated', {text: 'Evented PubSub Rocks!', id: 1}); updates.emit('deleted', {id: 1}); 56 / 121 @leggetter
  • 95. PubSub vs. Evented PubSub 57 / 121 @leggetter
  • 98. PubSub client.subscribe('devexp-channel', function(data) { if(data.eventType === 'chat-message') { addMessage(data.message); } 60 / 121 @leggetter
  • 99. PubSub client.subscribe('devexp-channel', function(data) { if(data.eventType === 'chat-message') { addMessage(data.message); } else if(data.eventType === 'channel-purposed-changed') { updateRoomTitle(data.purpose); } else if(/* and so on */) { } }) 60 / 121 @leggetter
  • 100. PubSub client.subscribe('devexp-channel', function(data) { if(data.eventType === 'chat-message') { addMessage(data.message); } else if(data.eventType === 'channel-purposed-changed') { updateRoomTitle(data.purpose); } else if(/* and so on */) { } }) Evented PubSub var devexp = io('/devexp-channel'); devexp.on('chat-message', addMessage); devexp.on('channel-purposed-changed', updateChannelPurpose); 60 / 121 @leggetter
  • 101. PubSub client.subscribe('devexp-channel', function(data) { if(data.eventType === 'chat-message') { addMessage(data.message); } else if(data.eventType === 'channel-purposed-changed') { updateRoomTitle(data.purpose); } else if(/* and so on */) { } }) Evented PubSub var devexp = io('/devexp-channel'); devexp.on('chat-message', addMessage); devexp.on('channel-purposed-changed', updateChannelPurpose); devexp.on('current-topic-changed', updateChannelTopic); devexp.on('user-online', userOnline); devexp.on('user-offline', userOffline); 60 / 121 @leggetter
  • 104. Data Sync // client var ref = new Firebase("https://app.firebaseio.com/doc1/lines"); 63 / 121 @leggetter
  • 105. Data Sync // client var ref = new Firebase("https://app.firebaseio.com/doc1/lines"); ref.on('child_added', function(childSnapshot, prevChildKey) { // code to handle new child. }); 63 / 121 @leggetter
  • 106. Data Sync // client var ref = new Firebase("https://app.firebaseio.com/doc1/lines"); ref.on('child_added', function(childSnapshot, prevChildKey) { // code to handle new child. }); ref.on('child_changed', function(childSnapshot, prevChildKey) { // code to handle child data changes. }); 63 / 121 @leggetter
  • 107. Data Sync // client var ref = new Firebase("https://app.firebaseio.com/doc1/lines"); ref.on('child_added', function(childSnapshot, prevChildKey) { // code to handle new child. }); ref.on('child_changed', function(childSnapshot, prevChildKey) { // code to handle child data changes. }); ref.on('child_removed', function(oldChildSnapshot) { // code to handle child removal. }); 63 / 121 @leggetter
  • 108. Data Sync // client var ref = new Firebase("https://app.firebaseio.com/doc1/lines"); ref.on('child_added', function(childSnapshot, prevChildKey) { // code to handle new child. }); ref.on('child_changed', function(childSnapshot, prevChildKey) { // code to handle child data changes. }); ref.on('child_removed', function(oldChildSnapshot) { // code to handle child removal. }); ref.push({ 'editor_id': 'leggetter', 'text': 'Nexmo Rocks!' }); 63 / 121 @leggetter
  • 109. Data Sync // client var ref = new Firebase("https://app.firebaseio.com/doc1/lines"); ref.on('child_added', function(childSnapshot, prevChildKey) { // code to handle new child. }); ref.on('child_changed', function(childSnapshot, prevChildKey) { // code to handle child data changes. }); ref.on('child_removed', function(oldChildSnapshot) { // code to handle child removal. }); ref.push({ 'editor_id': 'leggetter', 'text': 'Nexmo Rocks!' }); Framework handles updates to other clients 63 / 121 @leggetter
  • 110. RMI (aka RPC) 64 / 121 @leggetter
  • 112. RMI // client var chat = $.connection.chatHub; 66 / 121 @leggetter
  • 113. RMI // client var chat = $.connection.chatHub; chat.client.broadcastMessage = function (name, message) { // handle message }; 66 / 121 @leggetter
  • 114. RMI // client var chat = $.connection.chatHub; chat.client.broadcastMessage = function (name, message) { // handle message }; chat.server.send( 'me', 'hello world' ); 66 / 121 @leggetter
  • 115. RMI // client var chat = $.connection.chatHub; chat.client.broadcastMessage = function (name, message) { // handle message }; chat.server.send( 'me', 'hello world' ); $.connection.hub.start(); // async 66 / 121 @leggetter
  • 116. RMI // client var chat = $.connection.chatHub; chat.client.broadcastMessage = function (name, message) { // handle message }; chat.server.send( 'me', 'hello world' ); $.connection.hub.start(); // async // server public class ChatHub : Hub { 66 / 121 @leggetter
  • 117. RMI // client var chat = $.connection.chatHub; chat.client.broadcastMessage = function (name, message) { // handle message }; chat.server.send( 'me', 'hello world' ); $.connection.hub.start(); // async // server public class ChatHub : Hub { public void Send(string name, string message) { 66 / 121 @leggetter
  • 118. RMI // client var chat = $.connection.chatHub; chat.client.broadcastMessage = function (name, message) { // handle message }; chat.server.send( 'me', 'hello world' ); $.connection.hub.start(); // async // server public class ChatHub : Hub { public void Send(string name, string message) { // Call the broadcastMessage method to update clients. Clients.All.broadcastMessage(name, message); } } 66 / 121 @leggetter
  • 124. 6. Deployment & Architecture Considerations 72 / 121 @leggetter
  • 126. Self Hosted (Tightly Coupled) 74 / 121 @leggetter
  • 127. .NET Self-Hosted Real-Time options SignalR XSockets 75 / 121 @leggetter
  • 129. Self-Hosted Demo 1: ASP.NET + SignalR (Tightly Coupled) 76 / 121 @leggetter
  • 130. What we'll look at: ReferencesMicrosoft.AspNet.SignalR.* Scriptsjquery.signalR*.js App_StartSignalRStartup.cs ControllersHomeController.cs HubsChatHub.cs ViewsHomeSignalR.cshtml ScriptchatSignalRChat.js 77 / 121 @leggetter
  • 131. Pros .NET Simple integration MS Supported jQuery Dependency Cons Tightly coupled RMI only Self-Scaling Scaling (realtime + HTTP) Self-Hosted Demo 1: Pro & Cons 78 / 121 @leggetter
  • 133. Self-Hosted Demo 2: ASP.NET + XSockets (Tightly Coupled) 79 / 121 @leggetter
  • 134. What we'll look at: ReferencesXSockets.* App_StartXSocketsStartup.cs ControllersHomeController.cs XSocketsChatController.cs ViewsHomeXSockets.cshtml ScriptsXSockets.latest.js ScriptchatXSocketsChat.cs 80 / 121 @leggetter
  • 135. Pros .NET Simple integration Communication patterns PubSub/Evented RMI Licensed Cons Tightly coupled Self-Scaling Scaling (realtime + HTTP) Licensed Self-Hosted Demo 2: Pro & Cons 81 / 121 @leggetter
  • 136. Self-Hosted: .NET + Message Queue (Loosely Coupled) 82 / 121 @leggetter
  • 138. Pros .NET Maps well to PubSub Loosely coupled Could use another runtime Cons How does it fit with RMI/SignalR? Multiple components Self-scaling Queue routing questions In: HTTP. Out: WebSocket Self-Hosted: .NET + Message Queue - Pro & Cons 84 / 121 @leggetter
  • 140. Self-Hosted: ASP.NET + Faye (Loosely Coupled) 85 / 121 @leggetter
  • 141. Pros PubSub Connection fallback Redis Queue support Simple integration Cons Not .NET(?) You need to scale Self-Hosted + Faye: Pros & Cons 86 / 121 @leggetter
  • 142. .NET Hosted Real-Time options Ably Firebase Fanout PubNub Pusher Realtime.co Syncano 87 / 121 @leggetter
  • 144. Hosted Demo: Pusher 88 / 121 @leggetter
  • 145. What we'll look at: ReferencesPusherServer ControllersHomeController.cs ViewsHomePusher.cshtml ScriptchatPusherChat.js Pusher Debug Console 89 / 121 @leggetter
  • 146. Pros Simple & powerful Instantly scalable Managed & dedicated Direct integration. No overhead. Cons 3rd party reliance Difficult to influence functionality Hosted - Pros & Cons 90 / 121 @leggetter
  • 147. Why use a hosted service? Scenario 1. Site average of 10,000 Users 91 / 121 @leggetter
  • 148. Why use a hosted service? Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, no polling 91 / 121 @leggetter
  • 149. Why use a hosted service? Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, no polling 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 91 / 121 @leggetter
  • 150. Why use a hosted service? Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, no polling 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 4. That's it! Total: 50,000 91 / 121 @leggetter
  • 151. Why use a hosted service? Scenario 1. Site average of 10,000 Users 2. Over 1 Hour, no polling 3. Requests from pages load + HTML, CSS, JS, Images for 10k users = 50,000 4. That's it! Total: 50,000 Your servers handle 50k requests per hour instead of 3.6M You offload the polling or persistent connections to the service 91 / 121 @leggetter
  • 152. 7. Self-Hosted v Hosted "Build vs. Buy" 92 / 121 @leggetter
  • 153. Build vs. Buy - Costs baremetrics.com/calculator 93 / 121 @leggetter
  • 154. How do you choose? 7 Realtime Framework Considerations 1. Should you keep on polling? 2. Use an Existing Solution 3. Use a language you're comfortable with 4. Do you need native mobile support? 5. Simple Messaging, PubSub/Evented, RMI or DataSync 6. Architectural considerations 7. Hosted v Self-Hosted (Build vs. Buy) 94 / 121 @leggetter
  • 156. Network Infrastructure & Protocols Reliability Speed Beyond HTTP HTTP2 96 / 121 @leggetter
  • 157. Bayeux DDP dNode EPCP GRIP gRPC MQTT Pusher Protocol STOMP SignalR Protocol WAMP (Web App Messaging Protocol) XMPP (various) Communication Pattern Protocol Standardisation 97 / 121 @leggetter
  • 161. More "Things"! 101 / 121 @leggetter
  • 162. The Physical Web 102 / 121 @leggetter
  • 163. IoT, Apps & Developers 103 / 121 @leggetter
  • 164. A thing can be anything 104 / 121 @leggetter
  • 165. A thing can be anything Sensors Appliances Vehicles Smart Phones Devices (Arduino, Electric Imp, Raspberry Pi etc.) 104 / 121 @leggetter
  • 166. A thing can be anything Sensors Appliances Vehicles Smart Phones Devices (Arduino, Electric Imp, Raspberry Pi etc.) Servers Browsers Apps: Native, Web, running anywhere 104 / 121 @leggetter
  • 167. The Majority of code we'll write will still be for "Apps" Configuring Monitoring Interacting App Logic 105 / 121 @leggetter
  • 168. Real-Time Use Case Evolution Notifications & Signalling Activity Streams Data Viz & Polls Chat Collaboration Multiplayer Games 106 / 121 @leggetter
  • 169. Notifications/Activity Streams -> Actions 107 / 121 @leggetter The end of apps as we know it - Intercom
  • 171. Personalised Event Streams 109 / 121 @leggetter
  • 172. Unified UIs 110 / 121 @leggetter
  • 173. Chat & Bots for Everything and the rise of the .ai domain 111 / 121 @leggetter
  • 174. 600M MAUs 10M integrations app-within-an-app model taxi, order food, tickets, games etc. WeChat 112 / 121 @leggetter
  • 175. Chat Integrations 113 / 121 @leggetter
  • 176. Siri Google Now Microso Cortana Facebook M Chat "Virtual Assistants" 114 / 121 @leggetter
  • 178. Chat has evolved. Chat is now a platform! 116 / 121 @leggetter
  • 180. Ben Foxall - A conceptual future for the multi-device web (FutureJS 2014) 118 / 121 @leggetter
  • 181. You need Real-Time! There are lots of options. Make the choice that's right for you. I hope this helps! 119 / 121 @leggetter
  • 182. Resources Real-time Tech Guide github.com/leggetter/realtime-dotnet-examples Tools, Tips and Techniques for Developing Real- time Apps Nexmo 120 / 121 @leggetter
  • 183. Real-time Web Apps & .NET What are your options? Questions? PHIL @LEGGETTER Head of Developer Relations 121 / 121 @leggetter