Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Comet: Making The Web a 2-Way Medium

9,964 views

Published on

A talk I did at FoWA

Published in: Technology, Education
  • You can try to use this service ⇒ www.WritePaper.info ⇐ I have used it several times in college and was absolutely satisfied with the result.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I pasted a website that might be helpful to you: ⇒ www.WritePaper.info ⇐ Good luck!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❤❤❤ http://bit.ly/2u6xbL5 ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❤❤❤ http://bit.ly/2u6xbL5 ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Comet: Making The Web a 2-Way Medium

  1. Comet: Making The Web a 2-Way Medium Joe Walker, DWR Lead Developer
  2. What is Comet? Long lived HTTP connections •Low latency data •For events outside the browser
  3. Agenda: Use Cases Techniques Technologies Demos
  4. Why? Ajax made individual pages interactive places to explore More and more of the data on the web is social and therefore changing
  5. Why? Time people spend on a page Time before a page changes Evolution of the Web
  6. Why? Simply keeping a page up to date is easy: poll But polling kills servers Comet keeps pages up to date *efficiently*
  7. But ... It’s a hack - the web is biased against it
  8. Does that stop us? Ajax is also a hack, but that hasn’t stopped it And Comet does work
  9. Examples of Comet Chat is everywhere: GMail, Meebo, Yahoo Mail, etc. GMail uses it to update email conversations Google Docs uses it to show you other collaborators actions yes.com uses it to track radio station playlists Polar Rose are using it for delayed photo recognition GPokr is using it for online gaming etc...
  10. Agenda: Use Cases Techniques Technologies Demos
  11. Client Tricks Maximum of 2 connections per browser per host •Coordination using window.name in the client •or cookies using a server •or use multi-home DNS HTTP streaming is download only (chunked mode) TCP connections are kept alive under HTTP 1.1 Server detection of failed connections
  12. Client How-to: Forever Frame Client posts an iframe which doesn’t close quickly •Send text/plain and poll in browser (not IE) •Send text/plain with 4k whitespace to flush IE •Flush with a <script> tag for each data block The iframe will need killing and restarting to avoid memory leak But IE clicks when iframe starts
  13. Client How-to: Long Polling Client makes an XHR request which does not return immediately IE disallows reading XHR.responseText until connection is closed Although you can keep XHR frames open forever, generally you poll
  14. Client How-to: htmlfile ‘htmlfile’ is an ActiveX control like XHR: htmlfile = new ActiveXObject(quot;htmlfilequot;); htmlfile.open(); htmlfile.write(quot;<html><iframe src='javascript:void(0)' onload='cleanup();'></iframe></html>quot;); htmlfile.close(); htmlfile.parentWindow.dwr = dwr; Avoids ‘clicking’, but doesn’t work in IE/Server 2003 Not supported in Firefox, Safari, Opera, etc.
  15. Client How-to: Callback Polling Create <script> blocks pointing to any domain Create new script block when last completes
  16. Client How-to: Other Options Mime Messaging: •Uses Multipart Mime in HTML: x-multipart-replace •Not in IE •Excellent performance Flash •We probably have enough other options that we don’t need to get into plugins
  17. Server Tricks Watch out for stream-stoppers •Apache: mod_jk •Buggy network proxies •Various application firewalls Watch out for thread starvation
  18. Agenda: Use Cases Techniques Technologies Demos
  19. Saving you the Pain On the Server: •Jetty, Twisted Python, Grizzly, Lighttpd, Perbal Event Buses •Cometd, mod_pubsub, mod_repubsub, Lightstreamer, KnowHow, HAppS Frameworks •DWR, Juggernaut, Nevow
  20. Bayeux Standard Protocol for Interoperable Comet Supported by: •Cometd, Jetty, Dojo, DWR and servers in development from BEA, IBM and Sun
  21. Bayeux on the Client via Cometd Dojo client implementation: dojox.cometd.init(serverUrl); dojox.cometd.publish(quot;/topicquot;, {/* payload */}); dojox.cometd.subscribe(quot;/topicquot;, function(){/* ... */ });
  22. Bayeux on the Server package dojox.cometd; public interface Bayeux { Client newClient(String idprefix, Listener listener); void publish(Client fromClient, String toChannel, Object data, String msgId); void subscribe(String toChannel, Client subscriber); ... }
  23. DWR Reverse Ajax == Comet + Polling + Piggyback (It’s just a configuration option) Allowing the server to easily manage groups of users
  24. DWR, Reverse Ajax DWR calling remote Javascript Collection sessions = context.getScriptSessionsByPage(url); ScriptProxy proxy = new ScriptProxy(sessions); proxy.addFunctionCall(quot;updateCallersquot;, calls);
  25. DWR, Reverse Ajax DWR calling remote Script.aculo.us Collection sessions = context.getScriptSessionsByPage(url); Effect e = new Effect(sessions); e.fade(quot;client-idquot;);
  26. DWR, Reverse Ajax DWR calling remote TIBCO GI Collection sessions = context.getScriptSessionsByPage(url); Server server = GI.getServer(sessions, quot;appnamequot;); Button button = server.getJSXById(quot;buttonquot;, Button.class); button.setEnabled(Form.STATEDISABLED, true);
  27. Bayeux Performance
  28. Agenda: Use Cases Techniques Technologies Demos
  29. Demo http://www.webtide.com/sessionRater/
  30. Demo
  31. Questions? http://cometdaily.com/ http://getahead.org/blog/joe/ http://cometd.com/ http://directwebremoting.org/

×