Changeset 321 for branches/0.5/presentations/myspace/slides_outline2
- Timestamp:
- 06/30/08 17:52:04 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/0.5/presentations/myspace/slides_outline2
r268 r321 7 7 - countless architectures tested 8 8 - now we've found the best 9 - javascript work 9 10 - Lead architect of Kaazing's Enterprise Comet Server offering 10 11 - coming soon (to theatres everywhere...) … … 30 31 - Auctions 31 32 - Sports reporting 33 - Collaborative Editing 34 - Network monitor reporting / system administration 32 35 - Election Monitoring (Andrew Betts / London Paper) 33 - Collaborative Editing34 36 - Air traffic control (no joke) 35 - Network monitor reporting / system administration36 37 - To name a few 37 - In practice though, everyone wants Comet without the need for flash 38 - Just plain old js and html 38 - In practice though, everyone wants Comet without the need for flash or bad performance of polling 39 - Just plain old js and html, low latency 39 40 - Which brings us to Transports 40 41 … … 51 52 Slide: Iframe Diagram 52 53 53 - Parentpage has a callback "receive"54 - Application page has a callback "receive" 54 55 - Finishes loading, creates and iframe 55 56 - Iframe causes an HTTP request to the server … … 71 72 - Loading Bars 72 73 - Hour glasses 73 - clicking noises?! (wtf mate ^^)74 - clicking noises?! 74 75 75 76 Slide: Iframe Unacceptable 76 77 - Modern applications can't have clicking noises and hour glasses. 77 78 - The users would get too confused 78 - So Iframe streaming isn't th at popular79 - Instead, the winneris...79 - So Iframe streaming isn't the most popular transport 80 - Instead, the most popular transport is... 80 81 81 82 Slide: XHR Long polling … … 96 97 - still easy to implement 97 98 - and no usability issues! 99 - seems like a big win 98 100 - but how does long polling performance compare to iframe streaming? 99 101 - Consider an island off the coast … … 115 117 - It waits for the boat to come back 116 118 - It gets on, and waits for the boat to go to the island 119 - 3x travel duration 117 120 - Well Iframe streaming is the bridge, and the boat is long polling 118 121 - Meaning, long polling suffers from a 3x latency performance hit … … 120 123 Slide: Bandwidth comparison 121 124 - You also have to send headers all the time 122 - Your buddy says 'how 's it hanging'125 - Your buddy says 'hows it hanging' 123 126 - But the browser says 'GET /some/url HTTP/1.1\r\nUser-Agent: ...etc' 124 127 - And the server says 'HTTP/1.1 200 ok\r\nContent-type....' 125 - your 15 byte message can easily incur 300 bytes of headers 128 - your 15 byte message can easily incur 300 bytes of headers, or more! 126 129 - thats a 20x bandwidth increase in that case 127 130 … … 153 156 - transport for ff and safari 154 157 Slide: ready state 3 158 - don't do one event per request/response cycle 159 - do a hundred. a thousand... 155 160 - ready state 3 saves the day 156 161 - callbacks for download progress from server … … 178 183 179 184 - Then they went on to propose that the this be included in HTML5 180 - after discussions with other vendors, a new spec came up185 - after discussions with other vendors, gained support, a new spec came up 181 186 182 187 Slide: deprecated … … 186 191 - we can use the deprecated one in opera 8+ 187 192 188 Slide: Transport Conclusions 189 - You've seen the prettier side of Comet 193 Slide: Transport Conclusions 10.18.20 190 194 - Ten minutes to explain 191 195 - Years to discover … … 201 205 - That is to say, just imagine the most frustrating game you can 202 206 - That game is twice as fun as building transports 203 - But in the end204 207 205 208 Slide: sleek bridge 206 209 - We can avoid the boat transport (long polling) 207 210 - And provide great user experience 211 - get a nice looking bridge 208 212 209 213 Slide: sleek bridge image with orbited logo superimosed … … 220 224 - How do you put lots of users on one machine? 221 225 - Seems like such a hard problem, but really there's a simple trick 222 - And once you know the trick, its easy226 - And once you know the trick, its possible 223 227 - Don't use threads. 224 228 - People have tried this with servers like apache 225 - So areasonable thread count, of 20, will service 20 users229 - A reasonable thread count, of 20, will service 20 users 226 230 - A better user count is a 1000 though 227 231 - But a 1000 threads brings a system to its knees with context switches 228 232 - No comet, just thrashing 233 234 Slide: Comet + threads != scalable 229 235 - So use the little trick of omitting threads, and you're golden 230 236 - Build event-based servers 231 - You r comet apps won't haveto be like nature preserves237 - You don't want your comet apps to be like nature preserves 232 238 - You don't want your app to be a lonely desert with the occasional wanderer 233 239 - it should be a riot, with users tearing down the walls, sucking your resources dry, demanding more... … … 235 241 Slide: desert -> riot 236 242 - So use event based programming for your comet server 243 - And I guarantee, your app will be a riot, not a desert. 237 244 238 245 Slide: zzzz … … 241 248 242 249 Slide: Horizontal Scalability 250 - If one server supports 1000 users, does 2 support 2000? and n, n-1000? 243 251 - This is a truly tough problem 244 252 - Really though, it depends on the application 253 - No one answer. 245 254 - But a few core rules are in order 246 255 - 1. Don't share state between comet servers 247 - 2. Only do Comet in the Comet server. no Pub/sub, no jabber/game server, just comet256 - 2. Only do Comet in the Comet server. no Pub/sub, no jabber/game server, no load balancing, just comet 248 257 - 3. Treat comet as the last leg of the journey 249 258 … … 252 261 - Developers like it, great. 253 262 - But it was already a hard problem before Browser's existed 254 - And the people solving the problem, RabbitMQ/ActiveMQ, aren't part of the comet community. 255 - Integrating comet wouldreal publish/subscribe message queues would be great263 - And the people solving the problem, RabbitMQ/ActiveMQ, aren't part of the comet community. (there have been minor inroads) 264 - Integrating streaming comet sith real publish/subscribe message queues would be great 256 265 - But, thats just a specific case of a larger issue 257 - And really, integrating comet with existing technologies would allow us to solve the horizontal scaling problem however these existing technologies already solve it. 266 - The real issue with scaling comet applications is that 267 - Comet is difficult 268 - Comet imposes architectural constraints on web apploications that we aren't used to (can't do round robin balancing per http request) 269 - Its a moving part that has to be closely tied to the other pieces of the system 270 - But integrating comet with existing technologies would allow us to solve the horizontal scaling problem however these existing technologies already solve it. 271 - How could you scale a thick client deployment? 272 - We want that to be the only question to answer when scaling a comet application. 258 273 - So How do you integrate comet servers with X? 259 274 … … 279 294 - once for the bridge, once for the browser 280 295 - the bridge speaks xmpp to the jabber server, but json-chat (made up protocol) to the browser 296 - Clearly not the solution... 281 297 282 298 Slide: Victory march picture, maybe the planting of the american flag in some battle … … 286 302 287 303 Slide: TCPConnection (word) 288 - I've been working closely with whatwg/w3c to specify a protocol and api that solves all of our problems 304 - I've been working closely with whatwg/w3c to specify the protocol and api that solves all of our problems 305 - tcpconnection is just like a socket, but for javsacript in browsers 289 306 - It will 290 307 -traverse forward proxies … … 305 322 - and plain old tcp on the back 306 323 - So you put it in front of ANY tcp server 307 - and the browsers can interact as if they'd connected directly to the server over tcp.308 - and the server doesn't need to be altered at all.324 - and the browsers can interact as if they'd connected directly to the backend server over tcp. 325 - and the server doesn't need to be altered whatsoever. 309 326 - No need for a bridge or dispatch protocol 310 - but we can simplify this picture still 327 - Much less complex means easier to scale 328 - Load Balancing? 329 - We can simplify this picture still 311 330 312 331 Slide: Browser < - > ( comet Proxy + Jabber Diagram single machine) … … 316 335 317 336 Slide: Sigh of relief 318 - Because Comet isn't going to get in the way anymore319 - Scaling Comet applications isn't a twofold problem anymore337 - Because Comet isn't going to get in the way 338 - Scaling Comet applications horizontally isn't a twofold problem anymore 320 339 - If you know how to scale a network application, then you can scale a comet application. 321 340 322 341 Slide: Jabber server cloud with half Comet proxies, half normal 323 342 - And whats more, there's no difference between the browser and the desktop 324 - You get to325 343 326 344 … … 330 348 Slide: Jabber server with comet proxy on left, web app on the right, sql server behind both 331 349 - Just have the network server and the web app coordinate on the back end 350 - put the sql server behind both 351 - User creates an account over the web app 352 - but can log in to jabber 353 - jabber saves logs to the database 354 - and the user can see those logs via the web app 332 355 - And your problems are over. 333 356 334 357 Slide:Conclusion (Bullseye (with orbited logo somewhere)) 335 - Transports are frustrating, but Orbited implements them (indeed, manyprojects take our implementation directly)358 - Transports are frustrating, but Orbited implements them (indeed, a number of projects take our implementation directly) 336 359 - Vertical Scalability and threads don't mix. Orbited use event-based network IO. 337 360 - Horizontal scalability is tough because you have two problems. 338 - If you can solve integration, then you can get a handle on horizontal scalability 361 - If you can solve integration, then you can get a handle on horizontal scalability by normal means 339 362 - TCPConnection is the perfect integration point. It works with all past, present, and future tcp/ip servers. Out of the box. 340 363 - Orbited provides that functionality today.