Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

http://www.wired.com/images_blogs/gadgetlab/2011/05/google_io_f.jpg

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Nice to meet you! ွ᠘᠘ [email protected] https://github.com/sishen @yedingding @yedingding http://weibo.com/presently

Slide 5

Slide 5 text

https://pragmatic.ly

Slide 6

Slide 6 text

Let’s Begin!

Slide 7

Slide 7 text

http://www.sneijers.net/wp-content/uploads/2011/12/web-150x150.jpg http://www.lyngsat-logo.com/tvchannel/it/Real-Time.html

Slide 8

Slide 8 text

UX-driven evolution of Web

Slide 9

Slide 9 text

http://edudemic.com/wp-content/uploads/2012/07/future-400x300.jpg

Slide 10

Slide 10 text

What’s “Real Time”?

Slide 11

Slide 11 text

Show Me!

Slide 12

Slide 12 text

Instant Messaging

Slide 13

Slide 13 text

Apple Push Notification

Slide 14

Slide 14 text

Internet Game http://s2.img.766.com/194/120217/1613/144125.jpg

Slide 15

Slide 15 text

Persistent Connection

Slide 16

Slide 16 text

Real Time in Web?

Slide 17

Slide 17 text

Persistent Connection between Brower and Server http://careers.accenture.com/Microsites/uk-graduate/PublishingImages/programmes/consulting/teach_first.jpg

Slide 18

Slide 18 text

But

Slide 19

Slide 19 text

Based on HTTP Protocol ž  Request - Response Protocol ž  Stateless Protocol

Slide 20

Slide 20 text

HTTP Protocol ž  Request - Response Protocol ž  Stateless Protocol

Slide 21

Slide 21 text

http://www.pdidevelopment.net/Images/picture/difficulty.jpg

Slide 22

Slide 22 text

Solutions ž  XHR Polling ž  Long Polling ž  HTTP Streaming ž  Flash Socket ž  WebSocket ž  ….

Slide 23

Slide 23 text

XHR Polling

Slide 24

Slide 24 text

Long Polling

Slide 25

Slide 25 text

HTTP Streaming

Slide 26

Slide 26 text

Flash Socket

Slide 27

Slide 27 text

WebSocket

Slide 28

Slide 28 text

XHR Polling Long Polling HTTP Streaming Flash Socket WebSocket …… http://www.specialistpainphysio.com/wp-content/uploads/2012/08/thinking-pic.jpg

Slide 29

Slide 29 text

How to Choose?

Slide 30

Slide 30 text

Real Time Centric Real Time Supplemental VS

Slide 31

Slide 31 text

Real Examples

Slide 32

Slide 32 text

Pragmatic.ly

Slide 33

Slide 33 text

Pragmatic.ly ž WebSocket ž  XHR Polling ž  Long Polling ž  HTTP Streaming ž  Flash Socket

Slide 34

Slide 34 text

Integration Fast http://thatimthing.com/wp-content/uploads/2011/02/HandsMovingFastOnKeyboard.jpg

Slide 35

Slide 35 text

Work Fast http://www.devilslab.com/wp-content/uploads/2010/08/fast_snail_id86636_size350.jpg

Slide 36

Slide 36 text

Light Weight http://darkjade68.files.wordpress.com/2012/01/white-feather.jpg

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Slanger Open Source Pusher Server Good for Dev

Slide 39

Slide 39 text

em-websocket EventMachine based WebSocket Server

Slide 40

Slide 40 text

HipChat

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

HipChat ž Long Polling ž  XHR Polling ž  HTTP Streaming ž  Flash Socket ž  WebSocket

Slide 43

Slide 43 text

BOSH Bidirectional-Streams Over Synchronous HTTP

Slide 44

Slide 44 text

https://upload.wikimedia.org/wikipedia/de/thumb/e/ea/Logo_XMPP_Standards_Foundation.svg/500px-Logo_XMPP_Standards_Foundation.svg.png

Slide 45

Slide 45 text

Easy to Scale

Slide 46

Slide 46 text

Easy to Extend

Slide 47

Slide 47 text

Works Everywhere http://i.cmpnet.com/bmighty/images/slideshows/20090121/slide1A.jpg

Slide 48

Slide 48 text

Jabber Clients

Slide 49

Slide 49 text

RubyBOSH

Slide 50

Slide 50 text

stropheruby libstrophe.js

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

Twitter Web

Slide 53

Slide 53 text

Real Time is sugar http://images.sciencedaily.com/2008/12/081210090819-large.jpg

Slide 54

Slide 54 text

Twitter Web ž  XHR Polling ž Long Polling ž  HTTP Streaming ž  Flash Socket ž  WebSocket

Slide 55

Slide 55 text

http://www.dealz.ie/images/4347/original/simple.jpg

Slide 56

Slide 56 text

Acceptable Smart interval

Slide 57

Slide 57 text

Save Resource

Slide 58

Slide 58 text

Twitter Streaming API

Slide 59

Slide 59 text

Twitter Streaming API ž  HTTP Streaming ž  XHR Polling ž Long Polling ž  Flash Socket ž  WebSocket

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

Low Overhead

Slide 62

Slide 62 text

Low Latency

Slide 63

Slide 63 text

API Friendly

Slide 64

Slide 64 text

Rainbow Thin

Slide 65

Slide 65 text

Rack::Stream

Slide 66

Slide 66 text

Weibo

Slide 67

Slide 67 text

Weibo Web ž  XHR Polling ž Long Polling ž  HTTP Streaming ž  Flash Socket ž  WebSocket

Slide 68

Slide 68 text

Weibo IM ž Long Polling ž  XHR Polling ž  HTTP Streaming ž  Flash Socket ž  WebSocket

Slide 69

Slide 69 text

Bayeux Protocol

Slide 70

Slide 70 text

Faye

Slide 71

Slide 71 text

Thank You!