IT Camp 2011<br />Thanks for coming!<br />ITCamp is made possible by our sponsors:<br />
Duplex Communications with WCF and Azure<br />Florin Cardașim, software developer<br />RomSoft Iași, www.rms.ro<br />caf@r...
Session agenda<br />Enterprise duplex. Non-browser clients<br />WCF duplex bindings, router service<br />Windows Azure Ser...
Enterprise duplex<br />Non-browser clients<br />- WCF duplex bindings, router service<br />- Windows Azure Service Bus<br />
Full duplex using WCF NetTcpBinding<br />Event <br />publisher<br />Event <br />consumer<br />Full duplex TCP<br />Publish...
“Full duplex” using WCF WSDualHttpBinding<br />Event <br />publisher<br />Event <br />consumer<br />NAT<br />Duplex HTTP<b...
“Full duplex” using WCF WSHttpBinding<br />Event <br />publisher<br />Event consumer<br />Dual HTTP<br />Publisher and con...
WCF Router Service<br />Event <br />publisher<br />Router Service<br />Event <br />consumer<br />Router Service<br />TCP<b...
Windows Azure Service Bus<br />sb://itcampnamespace.servicebus.windows.net/publisher<br />Relay Service<br />Event <br />p...
DEMO<br />Connecting the enterprises via:<br /><ul><li>NetTcpBinding, WsDualHttpBinding
RouterService, NetTcpBinding, WsDualHttpBinding
Service Bus, NetEventRelayBinding</li></li></ul><li>Enterprise duplex: conclusions<br />Direct TCP is best IF available<br...
WEB duplex<br />Browser clients<br />- Simple polling, comet/long polling<br />- WebSockets<br />
Http polling<br />Wasted resources, many requests return no data<br />Frequent polling means higher load on the server<br />
Comet/long polling<br />Bandwidth: small payload, large http headers overhead<br />Scalability: pressure on memory, bandwi...
DEMO<br />An open source, WCF based, long polling server implementation:<br />http://laharsub.codeplex.com/<br />
Html5 WebSockets<br />Full duplex, bidirectional<br />Single TCP socket<br />Standard ports: http/80, https/443<br />Bandw...
Html5/websockets: server<br />Socket.IO Fallbacks<br />Adobe Flash Socket<br />AJAX Long Polling<br />AJAX Multipart Strea...
Html5/websockets: server<br />Test browser support: http://websocket.org/echo.html<br />Microsoft is still experimenting ...
DEMO<br />Some WebSockets in action:<br />http://kaazing.me<br />http://retrospectiveapp.heroku.com<br />
DEMO<br />Using the WCF WebSockets prototype from http://html5labs.com<br />
References<br />channel9.msdn.com/Learn/Courses/Azure/ServiceBus<br />en.wikipedia.org/wiki/Comet_%28programming%29<br />h...
Q&A<br />
Upcoming SlideShare
Loading in …5
×

ITCamp 2011 - Florin Cardasim - Duplex Communications with WCF and Azure

2,475 views
2,342 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,475
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

ITCamp 2011 - Florin Cardasim - Duplex Communications with WCF and Azure

  1. 1. IT Camp 2011<br />Thanks for coming!<br />ITCamp is made possible by our sponsors:<br />
  2. 2. Duplex Communications with WCF and Azure<br />Florin Cardașim, software developer<br />RomSoft Iași, www.rms.ro<br />caf@rms.ro | twitter.com/cardasim<br />
  3. 3. Session agenda<br />Enterprise duplex. Non-browser clients<br />WCF duplex bindings, router service<br />Windows Azure Service Bus<br />Web duplex. Browser clients<br />Simple polling, comet/long polling<br />WebSockets<br />Q&A<br />
  4. 4. Enterprise duplex<br />Non-browser clients<br />- WCF duplex bindings, router service<br />- Windows Azure Service Bus<br />
  5. 5. Full duplex using WCF NetTcpBinding<br />Event <br />publisher<br />Event <br />consumer<br />Full duplex TCP<br />Publisher requires public IP<br />Custom ports open in firewall<br />
  6. 6. “Full duplex” using WCF WSDualHttpBinding<br />Event <br />publisher<br />Event <br />consumer<br />NAT<br />Duplex HTTP<br />Network address translation makes connection back impossible<br />
  7. 7. “Full duplex” using WCF WSHttpBinding<br />Event <br />publisher<br />Event consumer<br />Dual HTTP<br />Publisher and consumers require public IP<br />That’s fine, BUT we want the servers INSIDE the enterprise<br />
  8. 8. WCF Router Service<br />Event <br />publisher<br />Router Service<br />Event <br />consumer<br />Router Service<br />TCP<br />Dual HTTP<br />TCP<br />Firewall and NAT friendly<br />Routers have protocol bridging, failover etc<br />Not bad, but quite crowded. <br />Can you do better?<br />
  9. 9. Windows Azure Service Bus<br />sb://itcampnamespace.servicebus.windows.net/publisher<br />Relay Service<br />Event <br />publisher<br />Event<br />consumer<br />
  10. 10. DEMO<br />Connecting the enterprises via:<br /><ul><li>NetTcpBinding, WsDualHttpBinding
  11. 11. RouterService, NetTcpBinding, WsDualHttpBinding
  12. 12. Service Bus, NetEventRelayBinding</li></li></ul><li>Enterprise duplex: conclusions<br />Direct TCP is best IF available<br />public endpoint , open ports in firewall<br />Duplex HTTP is an alternative<br />public IP both publisher and consumer, port 80<br />Router Service bridges the enterprises<br />flexible, but quite complicated deployment<br />Azure Service Bus<br />very flexible & powerful; requires careful planning because each connection costs money <br />
  13. 13. WEB duplex<br />Browser clients<br />- Simple polling, comet/long polling<br />- WebSockets<br />
  14. 14. Http polling<br />Wasted resources, many requests return no data<br />Frequent polling means higher load on the server<br />
  15. 15. Comet/long polling<br />Bandwidth: small payload, large http headers overhead<br />Scalability: pressure on memory, bandwidth, threads/processes<br />
  16. 16. DEMO<br />An open source, WCF based, long polling server implementation:<br />http://laharsub.codeplex.com/<br />
  17. 17. Html5 WebSockets<br />Full duplex, bidirectional<br />Single TCP socket<br />Standard ports: http/80, https/443<br />Bandwidth savings<br />More scalable than Comet<br />Nice programming model<br />In&outside of browser<br />Server<br />Open WebSocket Connection<br />Client<br />Drafts:<br /><ul><li>IETF WebSockets Protocol</li></ul>-W3C WebSockets API<br />
  18. 18. Html5/websockets: server<br />Socket.IO Fallbacks<br />Adobe Flash Socket<br />AJAX Long Polling<br />AJAX Multipart Streaming<br />Forever iFrame<br />JSONP Polling<br />http://socket.io/<br />Socket.IO (Java, node.js)<br />Jetty (Java)<br />Ruby/EventMachine<br />Python/Twisted<br />WCF websocket prototype <br />… others<br />
  19. 19. Html5/websockets: server<br />Test browser support: http://websocket.org/echo.html<br />Microsoft is still experimenting <br />http://html5labs.com<br />
  20. 20. DEMO<br />Some WebSockets in action:<br />http://kaazing.me<br />http://retrospectiveapp.heroku.com<br />
  21. 21. DEMO<br />Using the WCF WebSockets prototype from http://html5labs.com<br />
  22. 22. References<br />channel9.msdn.com/Learn/Courses/Azure/ServiceBus<br />en.wikipedia.org/wiki/Comet_%28programming%29<br />html5rocks.com/tutorials/websockets/basics<br />websocket.org<br />pusher.com<br />kaazing.com<br />live.visitmix.com/MIX11?q=web+sockets<br />paulbatum.com<br />
  23. 23. Q&A<br />
  24. 24. Don’t forget!<br />Get your free Azure pass!<br />30+15 days, no CC req’d<br />http://bit.ly/ITCAMP11<br />Promo code: ITCAMP11<br />We want your feedback!<br />Win a WP7 smartphone<br />Fill in your feedback forms<br />Raffle: end of the day<br />

×