<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Infrequently Noted &#187; comet</title>
	<atom:link href="http://infrequently.org/category/comet/feed/" rel="self" type="application/rss+xml" />
	<link>http://infrequently.org</link>
	<description></description>
	<lastBuildDate>Tue, 01 May 2012 11:30:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>DWR Joins The Dojo Foundation, Joe Walker Joins SitePen</title>
		<link>http://infrequently.org/2007/12/drw-joins-the-dojo-foundation-joe-walker-joins-sitepen/</link>
		<comments>http://infrequently.org/2007/12/drw-joins-the-dojo-foundation-joe-walker-joins-sitepen/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 20:25:45 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[comet]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Dojo Foundaton]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[sitepen]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=639</guid>
		<description><![CDATA[Dylan has the short-and-sweet writeup of what&#8217;s happening with DWR and the Dojo Foundation and Joe Walker has a bit more Q&#038;A. I can&#8217;t really add much to the &#8220;news&#8221; bit of the news other than to say that I&#8217;m tremendously excited about it. The DWR community has been amazingly level-headed in its deliberations, and [...]]]></description>
			<content:encoded><![CDATA[<p>Dylan has the <a href="http://www.sitepen.com/blog/2007/12/11/london-calling/">short-and-sweet writeup</a> of what&#8217;s happening with DWR and the Dojo Foundation and <a href="http://getahead.org/blog/joe/2007/12/11/changes_for_dwr.html">Joe Walker</a> has a bit more Q&#038;A. I can&#8217;t really add much to the &#8220;news&#8221; bit of the news other than to say that I&#8217;m tremendously excited about it. The DWR community has been amazingly <a href="http://www.nabble.com/DWR-and-the-Dojo-Foundation-to13766527.html#a13767547">level-headed</a> in its deliberations, and I can&#8217;t wait to work with them in the future.</p>
<p>I&#8217;ve been concerned a bit that it may appear as though Joe joining SitePen may carry with it the perception that the Dojo Foundation is an arm of SitePen in some way or that DWR will now need to become Dojo-centric. Luckily neither is the case, although reading assurances to that effect on this blog should be taken with a grain of salt. The Foundation has an open door for deserving projects which need a good legal umbrella and don&#8217;t want a lot of process or formality, and we&#8217;ve extended personal invitations to many non-Dojo-centric projects over the years to join  (including direct competitors).</p>
<p>For anyone still worried about the DWR/DF arrangement, working it backwards from both perspectives should yield some comfort. It does very little good for Dojo to be shoved down someone&#8217;s throat by the choice of some orthogonal tool in the same way that it would be tremendously foolhardy for the Foundation to lose its independence in any way. Neither would be very meritocratic and in particular the independence of the Foundation and its track record of providing a level playing field is most of what it has going for it. To that end, putting DWR at the Foundation and not under the <a href="http://getahead.org/">getahead legal entity</a> should help to make the distinction between commercial interest and community development even clearer than it previously was.</p>
<p>An umbrella organization to help support projects in meeting their goals is the under-appreciated bit of what separates successful stand-alone projects from projects which can&#8217;t escape the yolk of either a closed development process or a sponsoring company that just can&#8217;t let go of assumed control or brand affinity. Having your work backed by a legal entity is essential <a href="http://alex.dojotoolkit.org/?p=609">if you&#8217;re not going to pick a GPL-ish license</a>, but having that entity be a brand-neutral known quantity helps get projects adopted by organizations which have both lawyers and some experience with OSS. For component software like <a href="http://getahead.org/dwr">DWR</a>, <a href="http://cometd.com">Cometd</a>, and <a href="http://dojotoolkit.org">Dojo</a> that&#8217;s nearly all of the users which an OSS license alone won&#8217;t convince. The independent nature of the Foundation also isolates users from the employment decisions of key contributors. Through the Foundation, Dojo&#8217;s licensing has survived wholly in-tact through changes in employment status of nearly all of its <a href="http://www.ohloh.net/projects/3548/analyses/latest/contributors">most prolific contributors</a>.</p>
<p>Having &#8220;external&#8221; committers, a <a href="http://webkit.org/coding/commit-review-policy.html">reasonable process for minting new ones</a>, and a peaceful atmosphere where developers can build trust along with software isn&#8217;t rocket science but it does require some amount of prioritization of those concerns over personal and corporate directives. We&#8217;re not perfect at this at the Dojo Foundation, and we haven&#8217;t yet encountered the wrenching attempts at &#8220;brand drafting&#8221; which Apache deals with on a regular basis, but we&#8217;re committed to keeping the process as hands-off as we can and working to ensure that the umbrella doesn&#8217;t imply more than it really provides.</p>
<p>Our door is open. All that we require of new projects is that all committers on the project <a href="http://dojotoolkit.org/cla/">sign a CLA</a>, that the lineage of the code be &#8220;clean&#8221; (within reason), that the project community is relatively healthy, and that you can convince the existing committers <a href="http://dojotoolkit.org/pipermail/foundation/2007-December/thread.html">that yours is worthy of Foundation support</a>. It has always been the intent of the Foundation to host projects that have nothing to do whatsoever with Dojo and it&#8217;s my sincere hope that the DWR announcement drives this home, but we&#8217;re not going to leave it to chance. More on this in a forthcoming post.</p>
<p>Until then, my congrats again to Joe and the entire DWR community. Thanks for giving the Foundation the opportunity to make good on the trust you&#8217;ve invested in us.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2007/12/drw-joins-the-dojo-foundation-joe-walker-joins-sitepen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comet Daily Is Live!</title>
		<link>http://infrequently.org/2007/11/comet-daily-is-live/</link>
		<comments>http://infrequently.org/2007/11/comet-daily-is-live/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 09:03:43 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[comet]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=631</guid>
		<description><![CDATA[The new Comet Daily blog (to which I will be a contributor) is finally live, and already they are doing a better job than I ever have at explaining the value of Comet for building low-latency interactions. Greg Wilkins has an excellent post outlining the load and latency benefits of going with a Comet server [...]]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://cometdaily.com">Comet Daily blog</a> (to which I will be a contributor) is finally live, and already they are doing a better job than I ever have at explaining the value of Comet for building low-latency interactions. Greg Wilkins has an <a href="http://cometdaily.com/2007/11/06/comet-is-always-better-than-polling/">excellent post</a> outlining the load and latency benefits of going with a Comet server vs. traditional polling.</p>
<p>Michael Carter (of <a href="http://orbited.org/">Orbited</a>) walks us through the details of getting the beautiful htmlfile hack to work. This is new and novel information which is useful to all implementers of Comet clients and servers, so hats off to him on his sleuthing and persistence.</p>
<p>Lastly, Joe Walker leads off with as post that <a href="http://cometdaily.com/2007/10/23/why-comet-is-of-growing-importance/">does one of the clearest jobs of explaining why Comet is inevitable</a> that I&#8217;ve seen.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2007/11/comet-daily-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Browser.Next List</title>
		<link>http://infrequently.org/2007/09/the-browsernext-list/</link>
		<comments>http://infrequently.org/2007/09/the-browsernext-list/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 00:30:24 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[comet]]></category>
		<category><![CDATA[dhtml]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=623</guid>
		<description><![CDATA[Thanks to the Ajaxian&#8217;s for linking my last post on the topic of what we need from IE. As I&#8217;ve been responding to the comments, it occured to me that it&#8217;s not quite fair to poke IE in the eye when there are issues (like WYSIWYG) where we need the help of all the browser [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the <a href="http://ajaxian.com">Ajaxian&#8217;s</a> for linking my <a href="http://alex.dojotoolkit.org/?p=620">last post</a> on the topic of what we need from IE. As I&#8217;ve been responding to the comments, it occured to me that it&#8217;s not quite fair to poke IE in the eye when there are issues (like <a href="http://alex.dojotoolkit.org/?p=620">WYSIWYG</a>) where we need the help of all the browser vendors to get something useful done. That in mind, here&#8217;s my generic Browser.Next list of 10 issues that would give Ajax libraries a break and let app authors worry less.</p>
<p><span id="more-623"></span></p>
<p>It should be noted, first, that these issues are designed to be small, (relatively) easily implemented point solutions to accute problems. They are intentionally not on the scale of &#8220;add a new tag for&#8230;&#8221; some feature or &#8220;standardize and implement XBL&#8221; or even &#8220;make renderers pluggable&#8221;. While those would all be good, the current pace of browser progress makes me think they&#8217;re beyond the pale.</p>
<p>This list also tries to avoid vendor-specific issues (of which there are a pile, and many of them may be much more pressing on a per-browser basis than the below issues). Lastly, I&#8217;m also not asking for standardization of these things in short order (although it&#8217;s clearly preferable). We DHTML hackers are hearty folk. We&#8217;ll take whatever they give us, but we could deliver much, much better developer and end-user experiences if only the browser vendors would all give us:</p>
<ul>
<li><b>Event Opacity</b>: we need a way to tell browsers that for some nodes in the z-index stack that events should be passed through to their background. For instance, when implementing drag-and-drop, Ajax libraries have a stark choice: attempt to calculate the locations of all drop targets to enable dragging of the source with offset (expensive hitbox calculations, ahoy!) or move the drag shadow with an offset from the cursor (efficient and what we do in 0.9, but visually unsatisfying). Yes, yes, there are WHATWG specs for drag-and-drop and various browser vendors have implemented them to some extent for some time, but what I&#8217;m asking for here is much more constrained: a single API extension that can help us deliver better experiences until all the browsers get DnD right. There are also lots of other use cases where visual decorations should be able to defer their events to underlying elements (think drop shadows, etc.)</li>
<li><b>Long-Lived Connections</b>: this was on my <a href="http://alex.dojotoolkit.org/?p=536">IE7 list</a>, but it&#8217;s still a problem nearly everywhere. The basic issue is that we can&#8217;t implement Comet reliably because if two tabs both keep a long-lived connection to the same server, no other connections can open up to that server, meaning that normal Ajax (and even style changes) will be blocked. Very often this means that an app will appear to be locked up. One solution is to provide a way to specify in an HTTP header that a connection will be long lived or to provide pages a way to request more concurrent connections be made available to a particular server (on a per-tab basis, and with a hard limit, of course). If feasible, it might just suffice to just break the global lock connection limits and make them per-tab in general. Whatever the solution, we need ways to be able to have multiple tabs each able to create Comet connections without worrying.</li>
<li><b>Expose [DontEnum] To Library Authors</b>: The contortions that Ajax toolkit vendors go through to keep iteration over JavaScript objects and primitives coherent is, quite simply, insane. Much of Dojo, in particular, is designed around this problem. Giving us a <a href="http://wiki.ecmascript.org/doku.php?id=proposals:enumerability">way to say that a property is [DontEnum]</a>, before ES4 lands, would go a long way toward alleviating this back pressure.</li>
<li><b>Fast LiveCollection -&gt; Array Transforms</b>: That many DOM apis return live collections is a bug, but it need not be fatal. Browser vendors could start to provide a simple toArray() method on these live collections to provide a way to &#8220;fix&#8221; them in place.</li>
<li><b>Provided A Blessed Cache For Ajax Libraries</b>: Long story short, Ajax libraries are going to be here for a while. The idea that a browser is going to be so good that it will remove the need for a JS library simply doesn&#8217;t hold water any more, and even if one browser <em>was</em> that good, the other browsers wouldn&#8217;t be and none of them would be pervasive enough given current upgrade trends. We need to be able to better support our own patches to the browsing platform, and we need the browser vendors to get on board and realize that Ajax toolkits aren&#8217;t a threat. We can&#8217;t be&#8230;we don&#8217;t have enough leverage. With all of that being true, it&#8217;s high time for the browser vendors to provide Ajax toolkit vendors a way to specify a canonical URL or hash scheme which would bypass the network entirely, cross-site. This is something of an extension to the <a href="http://build.dojotoolkit.org/0.9.0/">CDN concept</a> for Ajax toolkits, but would go a long way to fundamentally changing the way Ajax toolkits evolve. Instead of fretting about how much 10K on the wire is going to degrade the user experience, we can focus on delivering better and better tool sets, even behind the firewall or offline (where CDN usage isn&#8217;t feasible).<br />
<br />
Obviously, this one is going to require some vendor coordination, but it&#8217;s the kind of thing where if one vendor does it (well), everyone else should follow quickly without much risk. The <a href="http://openajax.org">Open Ajax Alliance</a> could even function as a body to provide a list of toolkits and hashes to browser vendors should they demure from the task themselves. Lastly, before the flames start rolling in on this topic, I should note that I&#8217;m proposing this with some hesitation. Who are we (the Ajax toolkits) to suggest that our content deserves a more &#8220;blessed&#8221; cache position than site content? I&#8217;ve been wrestling with this for a long time, but now believe that we don&#8217;t have much of a choice. This solution is good for everyone and while it has the potential to create an uneven playing filed, I think that can be handled at an organizational level.</li>
<li><b>Mutation Events</b>: The browsers already know when a new item is added to a DOM, why can&#8217;t they tell us, the poor toolkit/framework authors? I&#8217;m not going to suggest in this list that browser vendors should fully figure out HTML tag subclassing since it will generally require architecture changes for the least capable browsers (*cough* IE *cough*). Instead, point solutions like mutation events everywhere will go a long way to allowing us to further band-aid their brokenness and allow us to more seamlessly upgrade content while we wait for the new-tag cavalry to arrive.</li>
<li><b>onLayoutComplete</b>: onDomReady doesn&#8217;t cut it. Toolkits that want to avoid <a href="http://bluerobot.com/web/css/fouc.asp/">FOUC</a> when applying behaviors and progressive enhancement to pages are currently attempting to get into the page rendering stream as early as possible. The problem is that for anything that needs to manage layout of widgets on the page, we need to know the dimensions, and that also must mean that CSS has been applied and any initial flow computations have been completed. Obviously, there are issues with progressive rendering of a page, but generally speaking I beleive toolkits are looking to browser vendors for a semantic that is roughly equivalent to &#8220;after onDomReady, but potentially before all images have finished loading, inform us when the layout and geometry have stabilized.&#8221;</li>
<li><b>HttpOnly cookies</b>: There&#8217;s a lot wrong with WebAppSec these days, and the traditional trust boundaries are constantly under attack. Worse, none of the browser vendors seem to feel it&#8217;s their responsibility to figure out cross-domain or JS sandboxing. This infuriating state of affairs leads directly to my next item, but the minimum any browser vendor should be required to do is to implement HttpOnly cookies. It&#8217;s no silver bullet, but it&#8217;s another tool in the toolbox and one we need badly.</li>
<li><b>Bundle Gears</b>: Until it&#8217;s primary APIs are put through the standardization process and introduced in browsers natively, any browser that includes Flash support should, out of good-faith respect for the Open Source and Open Web nature of its intent, bundle Google Gears as soon as it&#8217;s stable. A commitment to do so in the future will suffice until that time.</li>
<li><b>Standardize on the Firebug API&#8217;s</b>: <a href="http://getfirebug.com">Firebug</a> provides great debugging and performance profiling APIs. These need to be built in so that we can stop shipping <a href="http://www.getfirebug.com/lite.html">Firebug Lite</a> around the net ad-infinitum (as we do in Dojo 0.9). Being able to have built in timing tic/tock apis and a UI to view it would be a hugely useful. This falls far short of other proposals that have been floated for unified debugging APIs and protocols, but again represents the least vendors can do to alleviate the pain.</li>
</ul>
<p>So that&#8217;s my list&#8230;what&#8217;s on yours? What am I forgetting? And how should we organize to ask the vendors for these in a way that will really stick?</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2007/09/the-browsernext-list/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Bits and Peices</title>
		<link>http://infrequently.org/2007/01/bits-and-peices/</link>
		<comments>http://infrequently.org/2007/01/bits-and-peices/#comments</comments>
		<pubDate>Mon, 08 Jan 2007 21:59:32 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[cometd]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=596</guid>
		<description><![CDATA[As things ramp up for the Comet Developer Day and the Dojo Developer Day(s), there&#8217;s been a ton of activity in Dojo-land. Here&#8217;s a selected sample: SitePen begins to offer Dojo Training to the public! Signup here. Since we employ a huge percentage of the committer base and fund significant new development on the toolkit [...]]]></description>
			<content:encoded><![CDATA[<p>As things ramp up for the <a href="http://cometd.vox.com/library/post/cometd-developer-day.html">Comet Developer Day</a> and the <a href="http://dojo.jot.com/3D2">Dojo Developer Day(s)</a>, there&#8217;s been a ton of activity in Dojo-land. Here&#8217;s a selected sample:</p>
<ul>
<li>SitePen begins to <a href="http://www.sitepen.com/blog/2007/01/08/sitepen-presents/">offer Dojo Training</a> to the public! Signup <a href="http://www.sitepen.com/training.php">here</a>. Since we employ a huge percentage of the committer base and <a href="">fund significant new development on the toolkit</a> you&#8217;ll know you&#8217;re getting it &#8220;from the horse&#8217;s mouth&#8221;.</li>
<li><a href="http://shaneosullivan.wordpress.com/">Shane O&#8217;Sullivan</a> of IBM has made a first public release of his <a href="http://shaneosullivan.wordpress.com/2007/01/08/first-beta-release-of-dojo-build-tool/">GUI Dojo build tool</a>.</li>
<li>The <a href="http://www.sitepen.com/blog/2007/01/07/going-data-driven/">second part</a> in the SitePen performance blog series is up (<a href="http://www.sitepen.com/blog/2006/12/29/what-is-bloat/">part 1</a>).</li>
<li>Dojo 0.4.1 blew past the 100K download mark (now at ~180K) and continues its march to becoming the most successful Dojo release ever</li>
<li>And not to tease too much, but there&#8217;s stuff coming down the pike that I&#8217;m tremendously excited about. More news on that after 3D2.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2007/01/bits-and-peices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adventures In Comet and Multipart Mime</title>
		<link>http://infrequently.org/2006/12/adventures-in-comet-and-multipart-mime/</link>
		<comments>http://infrequently.org/2006/12/adventures-in-comet-and-multipart-mime/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 22:20:14 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[bayeux]]></category>
		<category><![CDATA[comet]]></category>
		<category><![CDATA[cometd]]></category>
		<category><![CDATA[dhtml]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=595</guid>
		<description><![CDATA[The Dojo <a href="http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt">Bayeux</a> client implements a bunch of different "transports" and tries to pick the right one based on what the browser can support, the cross-domain requirements, and so forth. What follows is one of those stories that makes people assume that I'm crazy to do what I do for a living. They might be right.]]></description>
			<content:encoded><![CDATA[<p>The Dojo <a href="http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt">Bayeux</a> client implements a bunch of different &#8220;transports&#8221; and tries to pick the right one based on what the browser can support, the cross-domain requirements, and so forth. When we started down this path, most of the reason for doing this was to implement both the forever-frame and long-polling styles of Comet as well as providing a platform to experiment with alternate transport types (e.g., Flash sockets). One of the most promising of these experiments took advantage of the multipart mime support that&#8217;s been tucked away in the <a href="http://www.xulplanet.com/references/xpcomref/ifaces/nsIXMLHttpRequest.html">Mozilla codebase</a> for quite a while. What follows is one of those stories that makes people assume that I&#8217;m crazy to do what I do for a living. They might be right.</p>
<p><span id="more-595"></span></p>
<p>Multipart is attractive because it provides a way of avoiding TCP set-up and tear-down for each and every event across the channel. While it&#8217;s not significant overhead (comparatively), being able to also reduce the number of HTTP header blocks sent can also help out when it comes to wringing latency out of the system. The code indicates that multipart is supported on Safari and Mozilla, but while events are indeed delivered at the right times on Safari, you can&#8217;t get at the payload until the connection closes completely. Not useful.</p>
<p>Things were looking better on Firefox and it was the preferred transport type in the Dojo client, but I think that&#8217;s going to have to change. Sadly, it seems we can&#8217;t actually tell when a multipart connection has failed. In &#8220;normal&#8221; XHR requests, the 200 HTTP status code plus a &#8220;finished&#8221; readystate indicates that the contents of the request can be read and control handed back. In the multipart case, each successful <em>block</em> fires of a load handler and resets the readystate. That means that the combination of readystate and and status can&#8217;t be used to differentiate between block success and connection success. Making matters worse, server-side connection failure doesn&#8217;t fire <em>any kind</em> of readystatechange handler, and even if it did, it doesn&#8217;t appear to be possible to determine if the connection is closed from any of the public properties on the object.</p>
<p>So, OK, what about falling back to a timer that restarts the connection every N seconds for good measure? This might work in cases like failover where a lag of 10 to 30 seconds might be acceptable but not for normal operation. Should events be flow regularly, it might never be necessary to hit this &#8220;backstop&#8221;. Not great, but I gave it a try, only to discover that Firefox won&#8217;t give you responseText of an XHR request if the connection is marked as multipart but the response isn&#8217;t a 200 and wrapped in a multipart block. Since we&#8217;re trying to use <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP status codes</a> correctly and keep the server internals from needing to fork significantly for each pluggable transport, it&#8217;s something of a step backward to need this kind of hand-holding.</p>
<p>I&#8217;d still like to support the multipart transport type, but until at least one of the implementations becomes rational for use from the XHR object, I think I&#8217;m going to just be commenting this transport out in <code>cometd.js</code>. Like XHR itself, it&#8217;s one to mark down for resurrection a year or two from now. At least we still have good enough options in the mean time.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2006/12/adventures-in-comet-and-multipart-mime/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cometd, Bayeux, and Why They&#8217;re Different</title>
		<link>http://infrequently.org/2006/08/cometd-bayeux-and-whey-theyre-different/</link>
		<comments>http://infrequently.org/2006/08/cometd-bayeux-and-whey-theyre-different/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 10:40:25 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[bayeux]]></category>
		<category><![CDATA[cometd]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=573</guid>
		<description><![CDATA[Ajax has been stupendously successful in capturing the imaginations of webdevs in part because of the backlog of demand for better interactivity in browser-based apps, but also because it&#8217;s stone-simple to implement. One of the biggest problems facing the adoption of Comet is that it&#8217;s, by definition, not as simple. It&#8217;s usually not possible to [...]]]></description>
			<content:encoded><![CDATA[<p>Ajax has been stupendously successful in capturing the imaginations of webdevs in part because of the backlog of demand for better interactivity in browser-based apps, but also because it&#8217;s stone-simple to implement. One of the biggest problems facing the adoption of Comet is that it&#8217;s, by definition, not as simple. It&#8217;s usually not possible to take ye-old-RESTian HTTP endpoint and suddenly imbue your app with realtime event delivery using it unless you want your servers to fall over. The thread and process pooling models common to most web serving environments usually guarantees this will be true. Add to that the complexity of figuring out what browsers will support what kinds of janky hacks to make event delivery work and you&#8217;ve got a recipe for abysmal adoption. That complexity is why we started work on <a href="http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt">Bayeux</a>.</p>
<p>Bayeux is a JSON-based protocol for clients to register interest in events and for servers to deliver them in a more timely fashion than Ajax-based polling allows. The goals of the Bayeux spec so far have been to:</p>
<ul>
<li>make event delivery fast</li>
<li>keep it simple</li>
<li>provide extension points in the protocol</li>
</ul>
<p>As a result we&#8217;ve variously rejected plans that involved implementing some subset of XMPP in JSON or actually tunneling XMPP over some other carrier. JSON libraries are available almost everywhere and you can&#8217;t beat the speed of eval for message deserialization on the client. It keeps things fast, simple, and pluggable. Authentication and authorization, while being given spots in the protocol, have also been left entirely to implementations to negotiate. The result has been that implementations have gotten off the ground very fast. Since the protocol doesn&#8217;t specify any guarantees around durability, entirely ephemeral event busses can be as conformant as MOM-style guaranteed-delivery systems. </p>
<p>So what, then is Cometd and how does it relate to this Bayeux specification? The short answer is that Cometd is a project to provide several reference implementations of Bayeux and to evolve the spec until it&#8217;s good enough for some other group to take over maintenance. Bayeux and Cometd are two complimentary parts of a plan to tackle the complexity around building and deploying comet apps, and we&#8217;re hoping for many independent Bayeux implementations outside of the Cometd project. For more interactive apps to finally take off, we need a set of portable concepts about how this kind of message passing should be handled in much the same ways that Ajax could be thought of as &#8220;RESTian web services for browsers&#8221;. Today lots of folks are thinking about event busses under the buzzword banner of SOA, but hopefully in the same way that REST was the lighter but easier variant of SOAP for doing request-response web services, Bayeux can be the less-sophisticated (but easier to use) alternative to exotic schemes for connecting MQSeries and TIBCO to browsers.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2006/08/cometd-bayeux-and-whey-theyre-different/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bayeux</title>
		<link>http://infrequently.org/2006/08/bayeux/</link>
		<comments>http://infrequently.org/2006/08/bayeux/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 10:07:11 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[comet]]></category>
		<category><![CDATA[cometd]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=572</guid>
		<description><![CDATA[There&#8217;s been a lot going on in the world of Comet in the past couple of months. Post-JavaOne activity from the Java side has been tremendous and I was unaware of most of it until Greg Murray and Greg Wilkins mentioned the various efforts to me.]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a lot going on in the world of Comet in the past couple of months. Post-JavaOne activity from the Java side has been tremendous and I was unaware of most of it until Greg Murray and Greg Wilkins mentioned the various efforts to me. <a href=http://blogs.webtide.com:80/gregw/2006/07/25/1153845234453.html">Greg&#8217;s got the details</a> of most of the Java activity, save Sun&#8217;s <a href="http://weblogs.java.net/blog/jfarcand/archive/2006/07/the_grizzly_com.html">Comet-on-Grizzly</a> announcement. As was widely covered elsewhere, the excellent work of <a href="http://juggernaut.rubyforge.org/">Juggernaut</a> has demonstrated the Flash XMLSocket approach and integration into a widely-used, modern web framework. Of course, <a href="http://www.divmod.org/trac/wiki/DivmodNevow">Nevow</a> has been shipping some great Comet infrastructure for Twisted developers for <em>years</em>, but that&#8217;s been a pretty small group of folks.</p>
<p>In other news, the <a href="http://cometd.com">Cometd</a> project has been accepted into the <a href="http://dojotoolkit.org/foundation/">Dojo Foundation</a>. With multiple demonstrated implementations of the pre-0.1 <a href="http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt">Bayeux spec</a>, we&#8217;ve got lots of momentum around solving the &#8220;last mile&#8221; problem for events to browser. Work on the spec has been bursty but I think that&#8217;s contributed to keeping it simple. Right now we&#8217;re tackling topic/channel globbing, event timeouts, and multiple event delivery semantics. Perhaps the most exciting thing to Bayeux to me, though, is that implementations of it lend themselves to extension and experimentation with implementing new styles of Comet transport mechanisms. The current Bayeux client in Dojo supports 4 different transport types with more on the way.</p>
<p>I think it&#8217;s going to be interesting to see how much the ability of platforms and languages to handle Comet workloads impairs or enhances their chances. Can Ruby and PHP pull off something that&#8217;ll allow them to scale? Will Twisted Python, Erlang, or full-stack Perl finally have their days in the webdev sun? Will great implementations in Java and C# hold the dynamic languages at bay?</p>
<p>I can&#8217;t wait to find out.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2006/08/bayeux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cross Domain Comet</title>
		<link>http://infrequently.org/2006/07/cross-domain-comet/</link>
		<comments>http://infrequently.org/2006/07/cross-domain-comet/#comments</comments>
		<pubDate>Sat, 22 Jul 2006 20:04:09 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[comet]]></category>
		<category><![CDATA[cometd]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sitepen]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=567</guid>
		<description><![CDATA[Cross-domain request-response via JSONP is pretty well understood these days. Well, at least among the 10 people who care. With Cometd we're taking it one level further.]]></description>
			<content:encoded><![CDATA[<p>Last night we got Cometd working <em>across domains</em>, without plugins. </p>
<p>&#8220;Cross domain Ajax&#8221; (see <a href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/">JSONP</a>) hasn&#8217;t taken off the way that I&#8217;d hoped, perhaps in part because of a lack of necessity. It might just be easier to set up a permissive proxy to do requests to services hosted on other domains. Moore&#8217;s Law discounts distributed coordination in favor of localized transformation. But whatever the reason, there hasn&#8217;t been huge uptake, even with beautiful abstractions like Dojo&#8217;s JSON-RPC facilities (see the <a href="http://download.dojotoolkit.org/release-0.3.1/dojo-0.3.1-event_and_io/tests/rpc/test_YahooService.html">Yahoo services example</a>). Intensely useful, but not everyone is on board just yet. Hopefully <a href="http://www.flickr.com/photos/bees/146678708/in/set-72057594135212396/">Joseph Smarr</a>&#8216;s talk on the topic at OSCON will help turn some heads.</p>
<p>But there&#8217;s one scenario where it&#8217;s a total no-brainer: cross-domain Comet. Normally when you set up a Comet server, it either has to sit in front of the application server or have requests passed off to it from the main web server. In the case where the app server dishes off the requests, it&#8217;s potentially still &#8220;involved&#8221; in the process if it acts like a proxy. Unless your front-end web server is also built with event-based-IO in it&#8217;s core, this can really really hurt. Luckily, there&#8217;s <a href="http://www.lighttpd.net/">hope</a> <a href="http://httpd.apache.org/docs/2.2/mod/event.html">on the horizon</a>. <a href="http://weblogs.java.net/blog/jfarcand/archive/2006/07/the_grizzly_com.html">Sun even announced</a> that they&#8217;re baking Comet support directly into their app server. But until the web tier collectively upgrades, we need some other way to simplify the configuration of apps+Comet servers. Until now, help has come in the form of iframes plus <code>document.domain</code> setting. This lets you put the Comet server on a sub-domain and still pass event payloads back-and-forth between parent document and the iframe. This is how the tried-and-true mod_pubsub client operates, but it&#8217;s brittle. Browsers get picky when you try to set document.domain and things don&#8217;t line up <em>exactly</em> the right way. Add Safari&#8217;s non-deterministic iframe behaviors to the mix and it&#8217;s a recipe for sleepless nights and begging forgiveness from the ops folks when you need <em>just one more</em> DNS change and server restart.</p>
<p>We can do better.</p>
<p>The solution to this that <a href="http://juggernaut.rubyforge.org/">Juggernaut</a> employs is to use the built-in cross-domain capabilities of the Flash player and it&#8217;s proprietary <a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213">crossdomain.xml scheme</a>. This isn&#8217;t a bad solution, but having Flash turned off isn&#8217;t unheard of. The performance-across-the-flash-boundary problems are mostly licked these days (thanks <a href="http://trac.dojotoolkit.org/browser/trunk/src/flash.js">dojo.flash</a>!), but the complexity with getting it all set up correctly puts it in the position of &#8220;Plan B&#8221; if something better comes along. And we just might have something better in the form of <code>&lt;script src="..."&gt;</code>.</p>
<p>By building on top of the Dojo ScriptSrcIO infrastructure it was trivial to make a JSONP transport for <a href="http://cometd.com">Cometd</a>. We just adapt the long-poll style of Comet but make the initial handshake messages JSONP-clued. That in place, the rest works just like &#8220;normal&#8221; long-polling, except that the client can connect from *any domain*. The configuration problem just dropped from &#8220;make sure everything cooperates at the systems and network level&#8221; to &#8220;make sure that the client and server speak the same protocol&#8221;&#8230;and I like solutions that put the problem in software and not external configuration or human effort. The <a href="http://svn.xantus.org/shortbus/trunk/cometd-twisted/cometd.py">checked-in server-side code shows how to handle it</a>.</p>
<p>So what&#8217;s the downside? The first downside is that the latency characteristics for cross-domain Comet using this technique are the same as long-polling. Not bad, mind you, but not as optimal as iframe, multipart-mime, or Flash-based solutions when you have large numbers of messages being thrown at the client. Additionally, it&#8217;s more difficult to know when a connection &#8220;times out&#8221; or in some other way fails, but I think these are tractable. Having a Plan A and a Plan B for cross-domain Comet and a server that can speak both styles via pluggable transport wrappers is exciting to me. By lowering the configuration barrier, I think we&#8217;ll start to see a significant uptick in Comet adoption.</p>
<p>Next time: Why we need a standard protocol for this stuff, and what we&#8217;re doing about that in <a href="http://cometd.com">Cometd</a>.</p>
<p>PS: as usual, big thanks go out to my employer <a href="http://sitepen.com">SitePen</a> who is funding this research and making it available under liberal Open Source licenses.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2006/07/cross-domain-comet/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Cometd: The Long Tail of Bad Puns</title>
		<link>http://infrequently.org/2006/07/finding-the-wall/</link>
		<comments>http://infrequently.org/2006/07/finding-the-wall/#comments</comments>
		<pubDate>Wed, 19 Jul 2006 10:43:38 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[comet]]></category>
		<category><![CDATA[cometd]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sitepen]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=566</guid>
		<description><![CDATA[Thanks to a premature Ajaxian mention there&#8217;s some real wind in the sails of Cometd, a primordial little Comet server and protocol project that I&#8217;m lucky enough to be working on. The goal of the project is to produce a content-level protocol for publish/subscribe event notification down to browsers. We need a name for the [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to a premature <a href="http://ajaxian.com/archives/cometd-brining-coment-to-the-masses">Ajaxian mention</a> there&#8217;s some real wind in the sails of <a href="http://cometd.com">Cometd</a>, a primordial little Comet server and protocol project that I&#8217;m lucky enough to be working on. The goal of the project is to produce a content-level protocol for publish/subscribe event notification down to browsers. We need a name for the protocol (as distinct from the code), so if you have ideas, we&#8217;re <a href="http://groups.google.com/group/cometd-users/">all ears</a>.</p>
<p>Along with the protocol, we&#8217;re producing <a href="http://svn.xantus.org/shortbus/trunk/">multiple server implementations</a> and at least one <a href="http://trac.dojotoolkit.org/browser/trunk/src/io/cometd.js">JavaScript client library</a>.</p>
<p>Unlike some predecessors, however, a couple of neat features should help to make Cometd clients and servers resilient in the face of browser and network stupidity. The first of these features is &#8220;transport negotiation&#8221;. At the core of it, there&#8217;s a realization that browsers very rarely all do the same thing the same way&#8230;especially when you&#8217;re out pushing on the lightly tested bits like we are. We get around this by having the client and server advertise what they want to speak over, and if they can come to some agreement, the conversation starts. Since the protocol is so simple, this generally means that servers can implement almost every type of transport with exactly the same code. The Twisted Python server does exactly this. This is very interesting because it allows us to implement most of the known Comet techniques with very little overhead. In the last 2 days I&#8217;ve implemented 3 different styles (forever-frame, multi-part-mime, and long-polling) which cover most of the modern browsers with at least one transport method. Each method exhibits different bugs, browser compatibility headaches, and performance characteristics, but being able to swap out one technique cheaply for another is going to let us experiment that much faster with how best to implement Comet systems.</p>
<p>If there&#8217;s a secret sauce to Cometd it&#8217;s that both of the initial implementations are being based on async network responder frameworks. On the Perl side, <a href="http://www.danga.com/perlbal/">Perlbal</a> is doing the heavy lifting while the Python variant relies on <a href="http://twistedmatrix.com/trac/">Twisted</a>. Obviously there&#8217;s a lot more to these things than picking a good library, but it sure helps. There&#8217;s even been some discussion of how Java, PHP, and Erlang implementations could be made to scale using similar techniques.</p>
<p>Hopefully we&#8217;ll get a new name for the protocol bits of Cometd soon (and a draft of the spec shortly thereafter) and once the Python server does topic and client pruning I&#8217;ll try to get some demos hooked up. After all, it&#8217;s the sexy collaboration that sells this stuff.</p>
<p><b>Update:</b> seems I forgot to mention that in addition to the mailing list, the Cometd project also has one of them <a href="http://cometd.vox.com/">newfangled &#8220;blog&#8221; thingers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2006/07/finding-the-wall/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

