<?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>Webtide Blogs</title>
	<atom:link href="http://webtide.intalio.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://webtide.intalio.com</link>
	<description>Blogs from the developers of Jetty &#38; Cometd</description>
	<lastBuildDate>Tue, 03 Apr 2012 10:17:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Jetty-SPDY blogged</title>
		<link>http://webtide.intalio.com/2012/04/jetty-spdy-blogged/</link>
		<comments>http://webtide.intalio.com/2012/04/jetty-spdy-blogged/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 10:17:06 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Jetty]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=925</guid>
		<description><![CDATA[Jos Dirksen has written a nice blog about Jetty-SPDY, thanks Jos ! In the upcoming Jetty 7.6.3 and 8.1.3 (due in the next days), the Jetty-SPDY module has been enhanced with support for prioritized streams and for SPDY push (although the latter only available via the pure SPDY API), and we have fixed a few bugs that we spotted and &#8230; <a href="http://webtide.intalio.com/2012/04/jetty-spdy-blogged/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smartjava.org/" target="_blank">Jos Dirksen</a> has written a <a href="http://www.smartjava.org/content/how-use-spdy-jetty" target="_blank">nice blog</a> about <a href="http://webtide.intalio.com/2012/03/spdy-support-in-jetty/" title="SPDY support in Jetty" target="_blank">Jetty-SPDY</a>, thanks Jos !</p>
<p>In the upcoming Jetty 7.6.3 and 8.1.3 (due in the next days), the Jetty-SPDY module has been enhanced with support for prioritized streams and for SPDY push (although the latter only available via the pure SPDY API), and we have fixed a few bugs that we spotted and were reported by early adopters.<br />
Also, we are working on making really easy for Jetty users to enable SPDY, so that the configuration changes needed to enable SPDY in Jetty will be minimal.</p>
<p>After these releases we will be working on full support for SPDY/3 (currently Jetty-SPDY supports SPDY/2, with some feature of SPDY/3).<br />
Browsers such as Chromium and Firefox are already updating their implementations to support also SPDY/3, so we will soon have support for the new version of the SPDY protocol also in the browsers.</p>
<p>Stay tuned !</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2012/04/jetty-spdy-blogged/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jetty-SPDY is joining the revolution!</title>
		<link>http://webtide.intalio.com/2012/03/jetty-spdy-is-joining-the-revolution/</link>
		<comments>http://webtide.intalio.com/2012/03/jetty-spdy-is-joining-the-revolution/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 03:47:47 +0000</pubDate>
		<dc:creator>gregw</dc:creator>
				<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Jetty]]></category>
		<category><![CDATA[Servlets]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=909</guid>
		<description><![CDATA[There is a revolution quietly happening on the web and if you blink you might miss it. The revolution is in the speed and latency with which some browsers can load some web pages, and what used to take 100&#8242;s of ms is now often reduced to 10&#8242;s.  The revolution is Google&#8217;s  SPDY protocol which I predict will soon replace &#8230; <a href="http://webtide.intalio.com/2012/03/jetty-spdy-is-joining-the-revolution/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There is a revolution quietly happening on the web and if you blink you might miss it. The revolution is in the speed and latency with which some browsers can load some web pages, and what used to take 100&#8242;s of ms is now often reduced to 10&#8242;s.  The revolution is Google&#8217;s  <a href="http://en.wikipedia.org/wiki/SPDY">SPDY</a> protocol which I predict will soon replace HTTP as the primary protocol of the web, and  <a href="http://webtide.intalio.com/2012/03/spdy-support-in-jetty/">Jetty-SPDY</a> is joining this revolution.</p>
<p style="text-align: justify;">SPDY is a fundamental rethink of how HTTP is transported over the internet, based on careful analysis of the interaction between TCP/IP, Browsers and web page design .  It does not entirely replace HTTP (it still uses HTTP GET&#8217;s and POST&#8217;s), but makes HTTP semantics available over a much more efficient wire protocol. It also opens up the possibility of new semantics that can be used on the web (eg server push/hint).  Improved latency, throughput and efficiency will improve user experience and facilitate better and cheaper services in environments like the mobile web.</p>
<h2 style="text-align: justify;">When is the revolution?</h2>
<p style="text-align: justify;">So when is SPDY going to be available?  It already is!!! The SPDY protocol is deployed in the current Chrome browsers and on the Amazon Kindle, and it is optionally supported by firefox 11.  Thus it is already on 25% of clients and will soon be over 50%. On the server side, Google supports SPDY on all their primary services and Twitter switched on SPDY support this month.  As the webs most popular browsers and servers are talking SPDY, this is a significant shift in the way data is moved on the web.   Since Jetty 7.6.2/8.1.2, SPDY is supported in  <a href="webtide.intalio.com/2012/03/spdy-support-in-jetty/">Jetty</a> and you can start using it without any changes to your web application!</p>
<h2>Is it a revolution or a coup?</h2>
<p style="text-align: justify;">By deploying SPDY on it&#8217;s popular browser and web services, Google has used it&#8217;s market share to make a fundamental shift in the web (<a href="http://techcrunch.com/2011/12/17/this-is-not-the-net-you-thought-you-knew/">but not as we know it</a>)!  and there are some <a href="http://www.technologyreview.in/web/37428/page3/">rum</a>b<a href="http://lambda-the-ultimate.org/node/4355">lings</a> that this may be an abuse of Google&#8217;s market power.  I&#8217;ve not been shy in the past of pointing out <a href="http://webtide.intalio.com/2008/08/bad-robot-google-android-is-evil-2/">google&#8217;s failings</a> to engage with the community in good faith, but in this case I think they have done an excellent job.  The SPDY protocol has been an <a href="http://dev.chromium.org/spdy">open project</a> for over two years and they have published specs and actively solicited feedback and participation.  More over, they are intending to take the protocol to the <a href="http://www.ietf.org/">IETF</a> for standardisation and have already submitted a <a href="http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00">draft</a> to the httpbis working group.   Openly developing the protocol to the point of wide deployment is a good fit with the IETF&#8217;s approach of &#8220;<a href="https://www.google.com/search?q=ietf+%22rough+consensus+working+code%22">rough consensus and working code</a>&#8220;.</p>
<p style="text-align: justify;">Note also that Google are not tying any functionality to SPDY, so it is not as if they are saying that we must use their new protocol or else we can&#8217;t access their services.  We are free to disable or block SPDY on our own networks and the browsers will happily fallback to normal HTTP.  Currently SPDY is a totally transparent upgrade to the user.</p>
<h2 style="text-align: justify;">Is there a problem?</h2>
<p style="text-align: justify;">So why would anybody be upset about Google making the web run faster?  One of the most significant changes in the SPDY protocol, is that all traffic is encrypted with TLS. For most users, this can be considered a significant security enhancement, as they will no longer need to consider if a page/form is secure enough for the transaction they are conducting.</p>
<p style="text-align: justify;">However, if you are the administrator of a firewall that is enforcing some kind of content filtering policy, then having all traffic be opaque to your filters will make it impossible to check content (which may be great if you are a dissident in a rogue state, but not so great if you are responsible for a primary school network).  Similarly, caching proxies will no longer be able to cache shareable content as it will also be opaque to them, which may reduce some of the latency/throughput benefits of SPDY.</p>
<p style="text-align: justify;">Mike Belshe, who has lead the development of SPDY, points out that <a href="http://www.belshe.com/2011/11/17/spdy-of-the-future-might-blow-your-mind-today/">SPDY does not prevent proxies</a>, it just prevents implicit (aka transparent) proxies.  Since SPDY traffic is encrypted, the browser and any intermediaries must negotiate a session to pass TLS traffic, so the browser will need to give it&#8217;s consent before a proxy can see or modify any content.  This is probably workable for the primary school use-case, but no so much for the rouge state.</p>
<h2 style="text-align: justify;">Policy or Necessity?</h2>
<p style="text-align: justify;">There is nothing intrinsic about the SPDY protocol that requires TLS, and there are versions of it that operate in the clear.  I believe it was a policy rather than a technical decision to required TLS only. There are some technical justification by the argument that it reduces round trips needed to negotiate a SPDY and/or HTTP connection,  but I don&#8217;t see that encryption is the only answer to those problems.  Thus I suspect that there is also a little bit of an agenda in the decision and it will probably be the most contentious aspect of SPDY going forward.  It will be interesting to see if the TLS-only policy survives the IETF process, but then I might be hard to argue for a policy change that benefits rogue states and less personal privacy.</p>
<p style="text-align: justify;">Other than rouge states, another victim of the TLS-only policy is eas of debugging, as highlighted by Mike&#8217;s blog, where he is having trouble working out how the kindle uses SPDY because all the traffic is encrypted.  As a developer/debugger of a HTTP server, I cannot over stress how important it is to be able to see a TCP dump of a problematic session.  This argument is one of the reasons why the IETF has historically favoured clear text protocols.  It remains to be seen if this argument will continue to prevail or if we will have to rely on better tools and browser/servers coughing up TLS sessions keys in order to debug?</p>
<h2 style="text-align: justify;">In Summary</h2>
<p style="text-align: justify;">Google and the other contributors to the SPDY project have done great work to develop a protocol that promises to take the web a significant step forward and to open up the prospects for many new semantics and developments.  While they have done this some what unilaterally, it has been done openly and with out any evidence of any intent other than to improve user experience/privacy and to reduce server costs.</p>
<p style="text-align: justify;">SPDY is a great development for the web and the Jetty team is please to be a part of it.</p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2012/03/jetty-spdy-is-joining-the-revolution/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>SPDY support in Jetty</title>
		<link>http://webtide.intalio.com/2012/03/spdy-support-in-jetty/</link>
		<comments>http://webtide.intalio.com/2012/03/spdy-support-in-jetty/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 10:50:52 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Jetty]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=914</guid>
		<description><![CDATA[SPDY is Google&#8217;s protocol that is intended to improve user experience on the web, by reducing the latency of web pages, sometimes up to a factor of 3. Yes, three times faster. How does SPDY accomplish that ? SPDY reduces roundtrips with the server, reduces the HTTP verboseness by compressing HTTP headers, improves the utilization of the TCP connection, multiplexes &#8230; <a href="http://webtide.intalio.com/2012/03/spdy-support-in-jetty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.chromium.org/spdy/">SPDY</a> is Google&#8217;s protocol that is intended to improve user experience on the web, by reducing the latency of web pages, sometimes up to a factor of 3. Yes, three times faster.</p>
<p>How does SPDY accomplish that ?</p>
<p>SPDY reduces roundtrips with the server, reduces the HTTP verboseness by compressing HTTP headers, improves the utilization of the TCP connection, multiplexes requests into a single TCP connection (instead of using a limited number of connections, each serving only one request), and allows for server to push secondary resources (like CSS, images, scripts, etc.) associated with a primary resource (typically a web page) without incurring in additional round-trips.</p>
<p>Now, the <em>really</em> cool thing is that <a href="http://eclipse.org/jetty">Jetty</a> has an implementation of SPDY (see the <a href="http://wiki.eclipse.org/Jetty/Feature/SPDY">documentation</a>) in the newly released 7.6.2 and 8.1.2 releases.<br />
Your web applications can immediately and transparently benefit of many of the SPDY improvements without changes, because Jetty does the heavy lifting for you under the covers.</p>
<p>With Chromium/Chrome already supporting SPDY, and Firefox 11 supporting it also (although it needs to be enabled, see how <a href="http://en.wikipedia.org/wiki/SPDY">here</a>), more than 50% of the web browsers will be supporting it, so servers needs to catch up, and where Jetty shines.</p>
<p>The Jetty project continues to foster innovation by supporting emerging web protocols: first <a href="http://webtide.intalio.com/2011/12/websocket-over-ssl-in-jetty/" title="WebSocket over SSL in Jetty">WebSocket</a> and now SPDY.</p>
<p>A corollary project that came out from the SPDY implementation is a pure Java implementation of the <a href="http://wiki.eclipse.org/Jetty/Feature/NPN">Next Protocol Negotiation (NPN) TLS Extension</a>, also available in Jetty 7.6.2 and 8.1.2.</p>
<p>To prove that this is no fluke, we have updated <a href="https://www.webtide.com" target="_blank">Webtide&#8217;s website</a> with Jetty&#8217;s SPDY implementation, and now the website can be served via SPDY, if the browser supports it.</p>
<p>We encourage early adopters to test out Jetty&#8217;s SPDY and feedback us on <a href="http://eclipse.org/jetty/mailinglists.php">jetty-dev@eclipse.org</a>.</p>
<p>Enjoy !</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2012/03/spdy-support-in-jetty/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>i-jetty 3.1 Released</title>
		<link>http://webtide.intalio.com/2012/01/i-jetty-3-1-released/</link>
		<comments>http://webtide.intalio.com/2012/01/i-jetty-3-1-released/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 04:26:56 +0000</pubDate>
		<dc:creator>janb</dc:creator>
				<category><![CDATA[i-jetty]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=885</guid>
		<description><![CDATA[Release 3.1 of i-jetty for Android is now available from the Android Market and the i-jetty download page. This release updates the embedded Jetty to jetty-7.6.0.RC4, although the majority of the changes have been to the Console, which is a webapp that allows you to interact with your Android device from a remote browser. Higlights include: pagination of large data &#8230; <a href="http://webtide.intalio.com/2012/01/i-jetty-3-1-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Release 3.1 of <a href="http://code.google.com/p/i-jetty">i-jetty</a> for Android is now available from the <a href="http://market.android.com">Android Market</a> and the i-jetty <a href="http://code.google.com/p/i-jetty/downloads/list">download page</a>.</p>
<p>This release updates the embedded Jetty to jetty-7.6.0.RC4, although the majority of the changes have been to the <a href="http://code.google.com/p/i-jetty/wiki/ConsoleWebApplication">Console</a>, which is a webapp that allows you to interact with your Android device from a remote browser.</p>
<p>Higlights include:</p>
<ul>
<li> pagination of large data sets such as Contacts and Media thumbnails (images, videos) </li>
<li> re-implementation of generated content as json &#038; ajax REST</li>
<li> ability to cause the device to ring (helpful for finding it around the house!)</li>
<li> ability to show current location of the Android device on Google maps , or track its location on the map as the device moves.</li>
</ul>
<p>Here&#8217;s a screenshot showing tracking my phone as it moves from the Sydney Opera House to Fort Denison on Sydney Harbour:</p>
<div id="attachment_893" class="wp-caption aligncenter" style="width: 600px"><a href="http://webtide.intalio.com/wp-content/uploads/2012/01/screenshot1.png"><img src="http://webtide.intalio.com/wp-content/uploads/2012/01/screenshot1.png" alt="Tracking phone via i-jetty console webapp" title="screenshot" width="590" height="915" class="size-full wp-image-893" /></a><p class="wp-caption-text">Tracking phone via i-jetty console webapp</p></div>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2012/01/i-jetty-3-1-released/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WebSocket over SSL in Jetty</title>
		<link>http://webtide.intalio.com/2011/12/websocket-over-ssl-in-jetty/</link>
		<comments>http://webtide.intalio.com/2011/12/websocket-over-ssl-in-jetty/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 11:52:44 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[cometd]]></category>
		<category><![CDATA[Jetty]]></category>
		<category><![CDATA[WebSockets]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[websocket]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=877</guid>
		<description><![CDATA[Jetty has always been in the front line on the implementation of the WebSocket Protocol. The CometD project leverages the Jetty WebSocket implementation to its maximum, to achieve great scalability and minimal latencies. Until now, however, support for WebSocket over SSL was lacking in Jetty. In Jetty 7.6.x a redesign of the connection layer allows for more pluggability of SSL &#8230; <a href="http://webtide.intalio.com/2011/12/websocket-over-ssl-in-jetty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://eclipse.org/jetty" target="_blank">Jetty</a> has always been in the front line on the implementation of the <a href="http://www.ietf.org/rfc/rfc6455.txt" target="_blank">WebSocket Protocol</a>.</p>
<p>The <a href="http://cometd.org" title="http://cometd.org" target="_blank">CometD project</a> leverages the Jetty WebSocket implementation to its maximum, to achieve <a href="http://webtide.intalio.com/2011/09/cometd-2-4-0-websocket-benchmarks/" title="CometD 2.4.0 WebSocket Benchmarks" target="_blank">great scalability and minimal latencies</a>.</p>
<p>Until now, however, support for WebSocket over SSL was lacking in Jetty.</p>
<p>In Jetty 7.6.x a redesign of the connection layer allows for more pluggability of SSL encryption/decryption and of connection upgrade (from HTTP to WebSocket), and these changes combined allowed to implement very easily WebSocket over SSL.</p>
<p>These changes are now merged into Jetty&#8217;s <code>master</code> branch, and will be shipped with the next version of Jetty.</p>
<p>Developers will now be able to use the <code>wss://</code> protocol in web pages in conjunction with Jetty on the server side, or just rely on the CometD framework to forget about transport details and always have the fastest, most reliable and now also confidential transport available, and concentrate in writing application logic rather than transport logic.</p>
<p>WebSocket over SSL is of course also available in the Java WebSocket client provided by Jetty.</p>
<p>Enjoy !</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2011/12/websocket-over-ssl-in-jetty/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CometD, Dojo and XDomainRequest</title>
		<link>http://webtide.intalio.com/2011/11/cometd-dojo-and-xdomainrequest/</link>
		<comments>http://webtide.intalio.com/2011/11/cometd-dojo-and-xdomainrequest/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 14:23:30 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[cometd]]></category>
		<category><![CDATA[cross-origin]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[internet-explorer]]></category>
		<category><![CDATA[xdomainrequest]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=830</guid>
		<description><![CDATA[The CometD project implements various Comet techniques to implement a web messaging bus. You can find an introduction to CometD here. Web applications often need to access resources residing on different servers, making the request to access those resources a cross origin request and therefore subject to the same origin policy. Fortunately, all modern browsers implement the Cross Origin Resource &#8230; <a href="http://webtide.intalio.com/2011/11/cometd-dojo-and-xdomainrequest/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://cometd.org">CometD</a> project implements various Comet techniques to implement a web messaging bus.<br />
You can find an introduction to CometD <a href="http://webtide.intalio.com/2011/04/cometd-introduction/" title="CometD Introduction">here</a>.</p>
<p>Web applications often need to access resources residing on different servers, making the request to access those resources a cross origin request and therefore subject to the <a href="http://en.wikipedia.org/wiki/Same_origin_policy">same origin policy</a>.</p>
<p>Fortunately, all modern browsers implement the <a href="http://www.w3.org/TR/cors/">Cross Origin Resource Sharing</a> (CORS) specification, and with the support of <a href="http://eclipse.org/jetty">Jetty</a>&#8216;s <a href="http://wiki.eclipse.org/Jetty/Feature/Cross_Origin_Filter">Cross Origin Filter</a>, it&#8217;s a breeze to write applications that allow cross origin resource sharing.</p>
<p>That is, all modern browsers apart Internet Explorer 8 and 9.</p>
<p>Without CORS support, CometD fallbacks to another Comet technique known as <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a>.<br />
While JSONP is much less efficient than a CORS request, it guarantees the CometD functionality, but it&#8217;s 2011 and JSONP should be a relic of the past.</p>
<p>Microsoft&#8217;s browsers have another JavaScript object that allows to make cross origin request: <a href="http://msdn.microsoft.com/en-us/library/cc288060%28v=vs.85%29.aspx">XDomainRequest</a>.</p>
<p>Unfortunately this object is non-standard, and it is not, in general, supported by the JavaScript toolkits on which CometD relies for the actual communication with the server.<br />
I cannot really blame toolkits authors for this lack of support.</p>
<p>However, I recently found a way to make XDomain request work with CometD 2.4.0 and the <a href="http://dojotoolkit.org">Dojo toolkit library</a>.</p>
<p>The solution (see <a href="http://www.sitepen.com/blog/2008/07/31/cross-site-xhr-plugin-registry/">this blog post</a> for reference) is the following:</p>
<p>Add this code to your JavaScript application:</p>
<pre style="white-space: pre-wrap">
dojo.require("dojox.io.xhrPlugins");
...
dojox.io.xhrPlugins.addCrossSiteXhr("http://&lt;crossOriginHost&gt;:&lt;crossOriginPort&gt;");
</pre>
<p>What remains is to configure CometD with the <code>crossOriginHost</code>:</p>
<pre style="white-space: pre-wrap">
dojox.cometd.configure({
    url: "http://&lt;crossOriginHost&gt;:&lt;crossOriginPort&gt;"
});
</pre>
<p>The last glitch is that XDomainRequest does not seem to allow to send the Content-Type HTTP header, so all of the above will only work in CometD 2.4.0.RC1 or greater where <a href="http://bugs.cometd.org/browse/COMETD-289">this improvement</a> has been made.</p>
<p>I do not particularly recommend this hack, but sometimes it&#8217;s the only way to support cross origin requests for the obsolete Internet Explorers.</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2011/11/cometd-dojo-and-xdomainrequest/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>mvn jetty:run-forked</title>
		<link>http://webtide.intalio.com/2011/10/mvn-jettyrun-forked/</link>
		<comments>http://webtide.intalio.com/2011/10/mvn-jettyrun-forked/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 06:45:58 +0000</pubDate>
		<dc:creator>janb</dc:creator>
				<category><![CDATA[Jetty]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=842</guid>
		<description><![CDATA[Being able to run the jetty maven plugin on your webapp &#8211; but in a freshly forked jvm &#8211; is a feature that has been requested for a loooong time. With jetty-7.5.2 release, this feature has been implemented, and it even works on your unassembled webapp. How to Run mvn jetty:run-forked That will kick off a Jetty instance in a &#8230; <a href="http://webtide.intalio.com/2011/10/mvn-jettyrun-forked/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Being able to run the jetty maven plugin on your webapp &#8211; but in a freshly forked jvm &#8211; is a feature that has been requested for a loooong time. With jetty-7.5.2 release, this feature has been implemented, and it even works on your <strong>unassembled</strong> webapp.</p>
<h2>How to Run</h2>
<p><code><br />
  mvn jetty:run-forked<br />
</code><br />
That will kick off a Jetty instance in a brand new jvm and deploy your unassemabled webapp to it. The forked Jetty will keep on running until either:</p>
<ul>
<li> you execute a <code>mvn jetty:stop</code> (in another terminal window)</li>
<li> you &lt;cntrl-c&gt; the plugin
</ul>
<p>The plugin will keep on executing until either:</p>
<ul>
<li> you stop it with a &lt;cntrl-c&gt; </li>
<li> the forked jvm terminates </li>
</ul>
<p><strong>NOTE: </strong> I&#8217;m interested in obtaining feedback about the lifecycles of the plugin and the forked Jetty. Is the lifecycle linkage that I&#8217;ve implemented the way you want to use it? Do you want the forked jvm to continue on, even if the plugin exits? Please post your input to the Jetty list at <code>jetty-users@eclipse.org</code>.</p>
<h2>How to Configure</h2>
<p>You need a few different configuration parameters from the usual <code>jetty:run</code> ones. Let&#8217;s look at an example:</p>
<pre>
     &lt;plugin&gt;
        &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
        &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;7.5.2.v20111006&lt;/version&gt;
        &lt;configuration&gt;
          &lt;stopPort&gt;8087&lt;/stopPort&gt;
          &lt;stopKey&gt;foo&lt;/stopKey&gt;
          &lt;jettyXml&gt;src/main/config/jetty.xml&lt;/jetty.xml&gt;
          &lt;contextXml&gt;src/main/config/context.xml&lt;/jetty.xml&gt;
          &lt;contextPath&gt;/foo&lt;/contextPath&gt;
          &lt;tmpDirectory&gt;${project.build.directory}/tmp&lt;/tmpDirectory&gt;
          &lt;jvmArgs&gt;-verbose:gc -Xmx80m&lt;/jvmArgs&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
</pre>
<p>You need to specify the <code>stopKey</code> and <code>stopPort</code> so that you can control the forked Jetty using the handy maven goal <code>mvn jetty:stop</code>.</p>
<p>You can use the <code>jettyXml</code> parameter to specify a comma separated list of jetty xml configuration files that you can use to configure the container. There&#8217;s nothing special about these config files, they&#8217;re just normal <a href="http://wiki.eclipse.org/Jetty/Reference/jetty.xml" title="Jetty Config File Reference" target="_blank">jetty configuration files</a>. You can also use this parameter with the <code>jetty:run</code> goal too.</p>
<p>The <code>contextXml</code> parameter specifies the location of a webapp context xml configuration file. Again, this is a normal jetty <a href="http://wiki.eclipse.org/Jetty/Feature/ContextDeployer" title="Context Xml Configuration File" target="_blank">context xml configuration file</a>. You can also use this with the <code>jetty:run</code> goal too, either in conjunction with, or instead of, the &lt;webAppConfig&gt; parameter (which configures the webapp right there in the pom). As the <code>jetty:run-forked</code> goal does NOT support the &lt;webAppConfig&gt; element, you MUST use <code>contextXml</code> if you need to configure the webapp.</p>
<p>The <code>contextPath</code> parameter specifies the context path at which to deploy the webapp. You can use this as a simple shortcut instead of the <code>contextXml</code> parameter if you have no other configuration that you need to do for the webapp. Or, you can specify both this AND the <code>contextXml</code> parameter, in which case the <code>contextPath</code> takes precedence over the context path inside the context xml file.</p>
<p><code>tmpDirectory</code> is the location of a temporary working directory for the webapp. You can configure it either here, or in a <code>contextXml</code> file.  If specified in both places, the <code>tmpDirectory</code> takes precedence.</p>
<p>With the <code>jvmArgs</code> parameter, you can specify an arbitrary list of args that will be passed as-is to the newly forked jvm. </p>
<p>There&#8217;s also the same parameters as the <code>mvn jetty:run</code> goal:</p>
<ul>
<li><code>skip</code> &#8211; if <code>true</code> the execution of the plugin is skipped</li>
<li><code>useTestScope</code> &#8211; if <code>true</code>, jars of <code>&lt;scope&gt;test&lt;/scope&gt;</code> and the test classes are placed on the webapp&#8217;s classpath inside the forked jvm</li>
<li><code>useProvidedScope</code> &#8211; if <code>true</code>, jars of <code>&lt;scope&gt;provided&lt;/scope&gt;</code>  are placed on the container&#8217;s classpath inside the forked jvm</li>
<li><code>classesDirectory</code> &#8211; the location of the classes for the webapp</li>
<li><code>testClassesDirectory</code> &#8211; the location of the test classes</li>
<li><code>webAppSourceDirectory</code> &#8211; the location of the static resources for the webapp</li>
</ul>
<p>Also, just like the <code>mvn jetty:run</code> case, if you have dependencies that are <code>&lt;type&gt;war&lt;/type&gt;</code> , then their resources will be <a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#Using_Overlayed_WARs">overlaid</a> onto the webapp when it is deployed in the new jvm.</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2011/10/mvn-jettyrun-forked/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CometD and Opera</title>
		<link>http://webtide.intalio.com/2011/10/cometd-and-opera/</link>
		<comments>http://webtide.intalio.com/2011/10/cometd-and-opera/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 10:08:19 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[cometd]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=828</guid>
		<description><![CDATA[The Opera browser is working well with the CometD JavaScript library. However, recently a problem was reported by the BlastChat guys: with Opera, long-polling requests were strangely disconnecting and immediately reconnecting. This problem was only happening if the long poll request was held by the CometD server for the whole duration of the long-polling timeout. Reducing the long-polling timeout from &#8230; <a href="http://webtide.intalio.com/2011/10/cometd-and-opera/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.opera.com/">Opera browser</a> is working well with the <a href="http://cometd.org">CometD</a> <a href="http://cometd.org/documentation/2.x/cometd-javascript">JavaScript library</a>.</p>
<p>However, recently a problem was reported by the <a href="http://www.blastchat.com/">BlastChat</a> guys: with Opera, long-polling requests were strangely disconnecting and immediately reconnecting. This problem was only happening if the long poll request was held by the CometD server for the whole duration of the long-polling timeout.</p>
<p>Reducing the long-polling timeout from the default 30 seconds to 20 seconds made the problem disappear.</p>
<p>This made me think that some other entity had a 30 seconds timeout, and it was killing the request just before it had the chance to be responded by the CometD server.</p>
<p>Such entities may be front-end web servers (such as when Apache Httpd is deployed in front of the CometD server), as well as firewalls or other network components.<br />
But in this case, all other major browsers were working fine, only Opera was failing.</p>
<p>So I typed <tt>about:config</tt> in Opera&#8217;s address bar to access Opera&#8217;s configuration options, and filtered with the keyword <tt>timeout</tt> in the &#8220;Quick find&#8221; text field.<br />
The second entry is &#8220;HTTP Loading Delayed Timeout&#8221; and it is set at 30 seconds.</p>
<p>Increasing that value to 45 seconds made the problem disappear.</p>
<p>In my opinion, that value is a bit too aggressive, especially these days where Comet techniques are commonly used and where WebSocket is not yet widely deployed.</p>
<p>The simple workaround is to set the CometD long poll timeout to 20-25 seconds as explained <a href="http://cometd.org/documentation/2.x/cometd-java/server/configuration">here</a>, but it would be great if Opera&#8217;s default was set to a bigger value.</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2011/10/cometd-and-opera/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CometD 2.4.0 WebSocket Benchmarks</title>
		<link>http://webtide.intalio.com/2011/09/cometd-2-4-0-websocket-benchmarks/</link>
		<comments>http://webtide.intalio.com/2011/09/cometd-2-4-0-websocket-benchmarks/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 16:00:30 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[cometd]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[websocket]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=783</guid>
		<description><![CDATA[Slightly more than one year has passed since the last CometD 2 benchmarks, and more than three years since the CometD 1 benchmark. During this year we have done a lot of work on CometD, both by adding features and by continuously improving performance and stability to make it faster and more scalable. With the upcoming CometD 2.4.0 release, one &#8230; <a href="http://webtide.intalio.com/2011/09/cometd-2-4-0-websocket-benchmarks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Slightly more than one year has passed since the <a href="http://blogs.webtide.com/gregw/entry/cometd_2_throughput_vs_latency">last CometD 2 benchmarks</a>, and more than three years since the <a href="http://cometdaily.com/2008/01/07/20000-reasons-that-comet-scales/">CometD 1 benchmark</a>. During this year we have done a lot of work on <a href="http://cometd.org">CometD</a>, both by adding features and by continuously improving performance and stability to make it faster and more scalable.</p>
<p>With the upcoming CometD 2.4.0 release, one of the biggest changes is the implementation of a <a href="http://en.wikipedia.org/wiki/WebSocket">WebSocket</a> transport for both the Java client and the Java server.<br />
The WebSocket protocol is finalizing at the IETF, major browsers all support various draft versions of the protocol (and <a href="http://eclipse.org/jetty">Jetty</a> supports all draft versions), so while WebSocket is slowly picking up, it is interesting to compare how WebSocket behaves with respect to HTTP for the typical scenarios that use CometD.</p>
<p>We conducted several benchmarks using the <a href="http://cometd.org/documentation/2.x/howtos/loadtesting">CometD load tools</a> on <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> instances.</p>
<h3><span style="text-decoration: underline;">HTTP Benchmark Results</span></h3>
<p>Below you can find the benchmark result graph when using the CometD long-polling transport, based on plain HTTP.</p>
<p><a href="http://webtide.intalio.com/wp-content/uploads/2011/09/http.png"><img class="alignnone size-large wp-image-784" title="CometD 2.4.0 HTTP Benchmark" src="http://webtide.intalio.com/wp-content/uploads/2011/09/http-1024x786.png" alt="" width="640" height="490" /></a></p>
<p>Differently from the <a href="http://blogs.webtide.com/gregw/entry/cometd_2_throughput_vs_latency">previous benchmark</a>, where we reported the average latency, this time we report the median latency, which is a better indicator of the latencies seen by the clients.<br />
Comparison with the previous benchmark would be unfair, since the hosts were different (both in number and computing power), and the JVM also was different. </p>
<p>As you can see from the graph above, the median latency is pretty much the same no matter the number of clients, with the exception of 50k clients at 50k messages/s.<br />
The median latency stays well under 200 ms even at more than 50k messages/s, and it is in the range of 2-4 ms until 10k messages/s, and around 50 ms for 20k messages/s, even for 50k clients.</p>
<p>The result for 50k clients and 50k messages/s is a bit strange, since the hosts (both server and clients) had plenty of CPU available and plenty of threads available (which rules out locking contention issues in the code that would have bumped up threads use).</p>
<p>Could it be possible that at that message rate we hit some limit of the EC2 platform ? It might be possible and <a href="http://blog.rightscale.com/2010/04/01/benchmarking-load-balancers-in-the-cloud/">this blog post</a> confirms that indeed there are limits in the virtualization of the network interfaces between host and guest. I have words from other people who have performed benchmarks on EC2 that they also hit limits very close to what the blog post above describes.</p>
<p>In any case, one server with 20k clients serving 50k messages/s with 150 ms median latency is a very good result.</p>
<p>For completeness, the 99th percentile latency is around 350 ms for 20k and 50k clients at 20k messages/s and around 1500 ms for 20k clients at 50k messages/s, and much less–quite close to the median latency–for the other results.</p>
<h3><span style="text-decoration: underline;">WebSocket Benchmark Results</span></h3>
<p>The results for the same benchmarks using the WebSocket transport were quite impressive, and you can see them below.</p>
<p><a href="http://webtide.intalio.com/wp-content/uploads/2011/09/websocket.png"><img class="alignnone size-large wp-image-789" title="CometD 2.4.0 WebSocket Benchmark" src="http://webtide.intalio.com/wp-content/uploads/2011/09/websocket-1024x784.png" alt="" width="640" height="490" /></a></p>
<p>Note that this graph uses a totally different scale for latencies and number of clients.<br />
Whereas for HTTP we had a 800 ms as maximum latency (on the Y axis), for WebSocket we have 6 ms (yes you read that right); and whereas for HTTP we somehow topped at 50k clients per server, here we could go up to 200k.<br />
We did not merge the two graphs into a single one to avoid that the WebSocket resulting trend lines were collapsed onto the X axis.</p>
<p>With HTTP, having more than 50k clients on the server was troublesome at any message rate, but with WebSocket 200k clients were stable up to 20k messages/s. Beyond that, we probably hit EC2 limits again, and the results were unstable–some runs could complete successfully, others could not.</p>
<ul>
<li>The median latencies, for almost any number of clients and any message rate, are below 10 ms, which is quite impressive.</li>
<li>The 99th percentile latency is around 300 ms for 200k clients at 20k messages/s, and around 200 ms for 50k clients at 50k messages/s.</li>
</ul>
<p>We have also conducted some benchmarks by varying the payload size from the default of 50 bytes to 500 bytes to 2000 bytes, but the results we obtained with different payload size were very similar, so we can say that payload size has a very little impact (if any) on latencies in this benchmark configuration.</p>
<p>We have also monitored memory consumption in &#8220;idle&#8221; state (that is, with clients connected and sending meta connect requests every 30 seconds, but not sending messages):</p>
<ul>
<li>HTTP: 50k clients occupy around 2.1 GiB</li>
<li>WebSocket: 50k clients occupy around 1.2 GiB, and 200k clients occupy 3.2 GiB.</li>
</ul>
<p>The benefits of WebSocket being a lighter weight protocol with respect to HTTP are clear in all cases.</p>
<h3><span style="text-decoration: underline;">Conclusions</span></h3>
<p>The conclusions are:</p>
<ul>
<li>The work the CometD project has done to improve performances and scalability were worth the effort, and CometD offers a truly scalable solution for server-side event driven web applications, for both HTTP and WebSocket.</li>
<li>As the WebSocket protocol gains adoption, CometD can leverage the new protocol without any change required to applications; they will just perform faster.</li>
<li>Server-to-server CometD communication can now be extremely fast by using WebSocket. We have already updated the CometD scalability cluster <a href="http://cometd.org/documentation/2.x/cometd-java/server/oort">Oort</a> to take advantage of these enhancements.</li>
</ul>
<h3><span style="text-decoration: underline;">Appendix–Benchmark Details</span></h3>
<p>The server was one EC2 instance of type &#8220;m2.4xlarge&#8221; (67 GiB RAM, 8 cores Intel(R) Xeon(R) X5550 @2.67GHz) running Ubuntu Linux 11.04 (2.6.38-11-virtual #48-Ubuntu SMP 64-bit).</p>
<p>The clients were 10 EC2 instances of type &#8220;c1.xlarge&#8221; (7 GiB RAM, 8 cores Intel Xeon E5410 @2.33GHz) running Ubuntu Linux 11.04 (2.6.38-11-virtual #48-Ubuntu SMP 64-bit).</p>
<p>The JVM used was Oracle&#8217;s Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode) version 1.7.0 for both clients and server.</p>
<p>The server was started with the following options:</p>
<pre style="white-space: pre-wrap">-Xmx32g -Xms32g -Xmn16g -XX:-UseSplitVerifier -XX:+UseParallelOldGC -XX:-UseAdaptiveSizePolicy -XX:+UseNUMA</pre>
<p>while the clients were started with the following options:</p>
<pre style="white-space: pre-wrap">-Xmx6g -Xms6g -Xmn3g -XX:-UseSplitVerifier -XX:+UseParallelOldGC -XX:-UseAdaptiveSizePolicy -XX:+UseNUMA</pre>
<p>The OS was tuned for allowing a larger number of file descriptors, as described <a href="http://cometd.org/documentation/2.x/howtos/loadtesting">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2011/09/cometd-2-4-0-websocket-benchmarks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CometD 2.4.0.beta1 Released</title>
		<link>http://webtide.intalio.com/2011/09/cometd-2-4-0-beta1-released/</link>
		<comments>http://webtide.intalio.com/2011/09/cometd-2-4-0-beta1-released/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 12:05:15 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Jetty]]></category>
		<category><![CDATA[cometd]]></category>
		<category><![CDATA[jackson]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[websocket]]></category>

		<guid isPermaLink="false">http://webtide.intalio.com/?p=746</guid>
		<description><![CDATA[CometD 2.4.0.beta1 has been released. This is a major release that brings in a few new Java API (see this issue) &#8211; client-side channels can now be released to save memory, along with an API deprecation (see this issue) &#8211; client-side publish() should not specify the message id. On the WebSocket front, the WebSocket transports have been overhauled and made &#8230; <a href="http://webtide.intalio.com/2011/09/cometd-2-4-0-beta1-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://cometd.org">CometD</a> 2.4.0.beta1 has been released.</p>
<p>This is a major release that brings in a few new Java API (see <a href="http://bugs.cometd.org/browse/COMETD-282">this issue</a>) &#8211; client-side channels can now be released to save memory, along with an API deprecation (see <a href="http://bugs.cometd.org/browse/COMETD-270">this issue</a>) &#8211; client-side publish() should not specify the message id.</p>
<p>On the WebSocket front, the WebSocket transports have been overhauled and made up-to-date with the latest WebSocket drafts (currently Jetty implements up to draft 13, while browsers are still a bit back on draft 7/8 or so), and made scalable as well in both threading and memory usage.</p>
<p>Following these changes, <a href="http://cometd.org/documentation/2.x/cometd-java/client">BayeuxClient</a> has been updated to negotiate transports with the server, and <a href="http://cometd.org/documentation/2.x/cometd-java/server/oort">Oort</a> has also been updated to use WebSocket by default for server-to-server communication, making server-to-server communication more efficient and with less latency.</p>
<p>WebSocket is now supported on Firefox 6 through the use of the Firefox-specific MozWebSocket object in the javascript library.</p>
<p>We have performed some <a href="http://webtide.intalio.com/2011/08/prelim-cometd-websocket-benchmarks">preliminary benchmarks</a> with WebSocket; they look really promising, although have been done before the latest changes to the CometD WebSocket transports.<br />
We plan to do a more accurate benchmarking in the next days/weeks.</p>
<p>The other major change is the pluggability of the JSON library to handle JSON generation and parsing (see <a href="http://webtide.intalio.com/2011/08/cometd-json-library-pluggability">this issue</a>).<br />
CometD has been long time based on Jetty&#8217;s JSON library, but now also <a href="http://jackson.codehaus.org">Jackson</a> can be used (the default will still be Jetty&#8217;s however, to avoid breaking deployed applications that were using the Jetty JSON classes).<br />
Jackson proved to be faster than Jetty in both parsing and generation, and will likely to become the default in few releases, to allow gradual migration of application that made use of Jetty JSON classes directly.<br />
The applications should be written independently of the JSON library used.<br />
Of course Jackson also brings in its powerful configurability and annotation processing so that your custom classes can be de/serialized from/to JSON.</p>
<p>Here you can find the <a href="http://bugs.cometd.org/secure/ReleaseNote.jspa?projectId=10000&#038;version=10071">release notes</a>.</p>
<p><a href="http://download.cometd.org/cometd-2.4.0.beta1-distribution.tar.gz">Download it</a>, use it, and report back, any feedback is important before the final 2.4.0 release.</p>
]]></content:encoded>
			<wfw:commentRss>http://webtide.intalio.com/2011/09/cometd-2-4-0-beta1-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

