<?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>Butler Press &#187; Programming</title>
	<atom:link href="http://butlerpress.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://butlerpress.com</link>
	<description>Scott Willson's website. Professional software development and some non-professional bits, too.</description>
	<lastBuildDate>Tue, 15 Dec 2009 19:52:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Capistrano via Cron or FreeBSD Periodic</title>
		<link>http://butlerpress.com/2009/05/05/capistrano-via-cron-or-freebsd-periodic/</link>
		<comments>http://butlerpress.com/2009/05/05/capistrano-via-cron-or-freebsd-periodic/#comments</comments>
		<pubDate>Tue, 05 May 2009 18:58:24 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2009/05/05/capistrano-via-cron-or-freebsd-periodic/</guid>
		<description><![CDATA[Running Capistrano from cron or FreeBSD&#8217;s periodic can be tricky—both (wisely) limit your environment. Scripts may run just fine in a SSH session, but fail when run by cron.A couple of standard gotchas:

Command not found: your PATH is usually chopped down. Either explicitly set PATH to include you commands, or execute commands with their full [...]]]></description>
			<content:encoded><![CDATA[<p>Running Capistrano from cron or FreeBSD&#8217;s periodic can be tricky—both (wisely) limit your environment. Scripts may run just fine in a SSH session, but fail when run by cron.A couple of standard gotchas:
<ul>
<li>Command not found: your PATH is usually chopped down. Either explicitly set PATH to include you commands, or execute commands with their full paths.</li>
<li>No terminal. On Linux, try sudo&#8217;s -i option.</li>
</ul>
<p>More puzzling:connection failed for: example.com (RuntimeError: can&#8217;t get terminal parameters (Inappropriate ioctl for device))I assumed this was a tty/SSH/login session problem. Turns out it was a permissions problem. The current user couldn&#8217;t login to the remote server via SSH, and the remote server was prompting for a password. Of course, it worked when running this script by hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2009/05/05/capistrano-via-cron-or-freebsd-periodic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 2.3 Plugin Routes</title>
		<link>http://butlerpress.com/2009/03/19/rails-23-plugin-routes/</link>
		<comments>http://butlerpress.com/2009/03/19/rails-23-plugin-routes/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 22:40:05 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2009/03/19/rails-23-plugin-routes/</guid>
		<description><![CDATA[As noted here http://guides.rubyonrails.org/2_3_release_notes.html and here http://rails.lighthouseapp.com/projects/8994/tickets/329-add-an-api-for-plugins-to-register-routes, Rails 2.3 will load routes from a plugin. If the plugin is considered an engine. A blank &#8220;app&#8221; directory in your plugin&#8217;s root is enough for the plugin loader.
]]></description>
			<content:encoded><![CDATA[<p>As noted here http://guides.rubyonrails.org/2_3_release_notes.html and here http://rails.lighthouseapp.com/projects/8994/tickets/329-add-an-api-for-plugins-to-register-routes, Rails 2.3 will load routes from a plugin. <em>If</em> the plugin is considered an engine. A blank &#8220;app&#8221; directory in your plugin&#8217;s root is enough for the plugin loader.</p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2009/03/19/rails-23-plugin-routes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Group for Racing on Rails</title>
		<link>http://butlerpress.com/2008/07/29/google-group-for-racing-on-rails/</link>
		<comments>http://butlerpress.com/2008/07/29/google-group-for-racing-on-rails/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 19:49:31 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[OBRA]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2008/07/29/google-group-for-racing-on-rails/</guid>
		<description><![CDATA[There was a burst of interest in WSBA website development on their mailing list—enough to annoy a few non-coders at any rate. So Racing on Rails has its own Google Group for development. Here&#8217;s hoping it&#8217;s the tip of the volunteer Rails coder cyclist iceberg.
For those late to the party or too lazy to click the link above, Racing on [...]]]></description>
			<content:encoded><![CDATA[<p>There was a burst of interest in <a href="http://www.wsbaracing.com/">WSBA</a> website development on their mailing list—enough to annoy a few non-coders at any rate. So <a href="http://trac.butlerpress.com/racing_on_rails">Racing on Rails</a> has its own <a href="http://groups.google.com/group/racing-on-rails">Google Group for development</a>. Here&#8217;s hoping it&#8217;s the tip of the volunteer Rails coder cyclist iceberg.</p>
<p>For those late to the party or too lazy to click the link above, Racing on Rails is the Ruby on Rails application behind several bike racing association websites like the WSBA and <a href="http://www.obra.org/">OBRA</a>. It&#8217;s all open source (except for the association-specific parts), and it pretty much works OK at this point.</p>
<p>I&#8217;ve put a lot of time into this code in the last few years. Plenty of cool ideas abound for these sites—it would be great to have more developers to make those ideas happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2008/07/29/google-group-for-racing-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We&#8217;re Hiring Another Rails Developer</title>
		<link>http://butlerpress.com/2008/02/06/were-hiring-another-rails-developer/</link>
		<comments>http://butlerpress.com/2008/02/06/were-hiring-another-rails-developer/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 20:10:40 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Analog Analytics]]></category>
		<category><![CDATA[Jobs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2008/02/06/were-hiring-another-rails-developer/</guid>
		<description><![CDATA[&#8220;We&#8221; means Analog Analytics. It&#8217;s fun, personally, to be hiring now instead of trying to be hired. Here&#8217;s the job description:
&#8220;Terrific opportunity for talented developer to join an exciting team helping to change the advertising industry.&#8221;
It&#8217;s a remote position &#8212; Pacific time zone strongly preferred &#8212; I&#8217;m in Portland, the CTO is in Los Angeles, [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;We&#8221; means <a href="http://www.analoganalytics.com/">Analog Analytics</a>. It&#8217;s fun, personally, to be hiring now instead of trying to be hired. Here&#8217;s the job description:</p>
<p>&#8220;Terrific opportunity for talented developer to join an exciting team helping to change the advertising industry.&#8221;</p>
<p>It&#8217;s a remote position &#8212; Pacific time zone strongly preferred &#8212; I&#8217;m in Portland, the CTO is in Los Angeles, and the CEO is in San Diego. There&#8217;s no home office. We deploy and develop Rails (and a little C) on OS X, Linux, and Solaris.</p>
<p>Light on the details? Sure. We&#8217;re not hung up on any many specific qualifications. Want to earn your salary coding in Rails? Email me at scott.willson@analoganalytics.com</p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2008/02/06/were-hiring-another-rails-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 2 upgrade: .rhtml to .html.erb Script</title>
		<link>http://butlerpress.com/2008/01/16/rails-2-upgrade-rhtml-to-htmlerb-script/</link>
		<comments>http://butlerpress.com/2008/01/16/rails-2-upgrade-rhtml-to-htmlerb-script/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 15:30:02 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2008/01/16/rails-2-upgrade-rhtml-to-htmlerb-script/</guid>
		<description><![CDATA[This is less a post, than a note to myself, but anyway, here&#8217;s a handy script to change your view extensions while preserving Subversion history.
#! /usr/bin/env ruby
require 'pathname'
for path in Dir['app/views/**/*.rhtml']
pathname = Pathname.new(path)
p `svn mv #{path}#{pathname.dirname}/#{pathname.basename.to_s.split('.').first}.html.erb`
end

]]></description>
			<content:encoded><![CDATA[<p>This is less a post, than a note to myself, but anyway, here&#8217;s a handy script to change your view extensions while preserving Subversion history.</p>
<p><code>#! /usr/bin/env ruby</code><br />
<code>require 'pathname'</code><br />
<code>for path in Dir['app/views/**/*.rhtml']<br />
pathname = Pathname.new(path)<br />
p `svn mv #{path}#{pathname.dirname}/#{pathname.basename.to_s.split('.').first}.html.erb`<br />
end<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2008/01/16/rails-2-upgrade-rhtml-to-htmlerb-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Obscure Oracle JDBC Exception du Jour</title>
		<link>http://butlerpress.com/2007/12/06/obscure-oracle-jdbc-exception-du-jour/</link>
		<comments>http://butlerpress.com/2007/12/06/obscure-oracle-jdbc-exception-du-jour/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 20:13:32 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[free_c_state]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[oci]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[UnsatisfiedLinkError]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2007/12/06/obscure-oracle-jdbc-exception-du-jour/</guid>
		<description><![CDATA[I ran across this exception again today, and Google didn&#8217;t anything useful until I dug in a bit. Hopefully, this will help someone else searching for UnsatisfiedLinkError and free_c_state exceptions.
Your JDBC URL syntax is wrong.
You need something like jdbc:oracle:oci:@RPTD
java.lang.UnsatisfiedLinkError: free_c_statejava.lang.UnsatisfiedLinkError: free_c_state
at oracle.jdbc.oci8.OCIDBAccess.logoff(OCIDBAccess.java:616)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:409)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
...
]]></description>
			<content:encoded><![CDATA[<p>I ran across this exception again today, and Google didn&#8217;t anything useful until I dug in a bit. Hopefully, this will help someone else searching for UnsatisfiedLinkError and free_c_state exceptions.</p>
<p>Your JDBC URL syntax is wrong.</p>
<p>You need something like jdbc:oracle:oci:@RPTD</p>
<p><code>java.lang.UnsatisfiedLinkError: free_c_statejava.lang.UnsatisfiedLinkError: free_c_state<br />
at oracle.jdbc.oci8.OCIDBAccess.logoff(OCIDBAccess.java:616)<br />
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:409)<br />
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)<br />
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)<br />
...</code></p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2007/12/06/obscure-oracle-jdbc-exception-du-jour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>undefined method `dbman&#8217;</title>
		<link>http://butlerpress.com/2007/11/18/undefined-method-dbman/</link>
		<comments>http://butlerpress.com/2007/11/18/undefined-method-dbman/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 02:31:54 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2007/11/18/undefined-method-dbman/</guid>
		<description><![CDATA[Upgrading to a Rails app to 2.0 and seeing this error?
&#8216;undefined method `dbman' for #&#60;ActionController::TestSession
You need to add this line to config/environments/test.rb:
config.action_controller.allow_forgery_protection    = false
Obvious to you, maybe, but not to me.
]]></description>
			<content:encoded><![CDATA[<p>Upgrading to a Rails app to 2.0 and seeing this error?</p>
<p>&#8216;<code>undefined method `dbman' for #&lt;ActionController::TestSession</code></p>
<p>You need to add this line to config/environments/test.rb:<br />
config.action_controller.allow_forgery_protection    = false</p>
<p>Obvious to you, maybe, but not to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2007/11/18/undefined-method-dbman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dumb Thing I Did Recently With Rails</title>
		<link>http://butlerpress.com/2007/10/30/dumb-thing-i-did-with-rails/</link>
		<comments>http://butlerpress.com/2007/10/30/dumb-thing-i-did-with-rails/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 19:05:07 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2007/10/30/dumb-thing-i-did-with-rails/</guid>
		<description><![CDATA[Turns out that dashes are not really valid hostnames in URLs. So, &#8216;cyclinglog.butlepress.com&#8217; is valid, but &#8216;cycling_log.butlepress.com&#8217; is not.
Now, Apache virtual hosting will work with underscores just fine, as did 1.1 versions of Rails and Safari 2.0. I think IE never liked it. By &#8220;worked&#8221; and &#8220;liked,&#8221; I mean that the browser accepted cookies from [...]]]></description>
			<content:encoded><![CDATA[<p>Turns out that dashes are not really valid hostnames in URLs. So, &#8216;cyclinglog.butlepress.com&#8217; is valid, but &#8216;cycling_log.butlepress.com&#8217; is not.</p>
<p>Now, Apache virtual hosting will work with underscores just fine, as did 1.1 versions of Rails and Safari 2.0. I think IE never liked it. By &#8220;worked&#8221; and &#8220;liked,&#8221; I mean that the browser accepted cookies from the host. If the browser doesn&#8217;t accept the cookies, then Rails creates a new session for each request, and that prevents you from logging in to sites like cycling_log.butlepress.com.</p>
<p>Safari 3 show the same behavior. In fact, with Rails 1.2, the only browser that &#8220;works&#8221; is Firefox.</p>
<p>Anyway, long story short: don&#8217;t use underscores in hostnames.</p>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2007/10/30/dumb-thing-i-did-with-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Spring by Rod Johnson</title>
		<link>http://butlerpress.com/2007/08/08/advanced-spring-by-rod-johnson/</link>
		<comments>http://butlerpress.com/2007/08/08/advanced-spring-by-rod-johnson/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 23:06:16 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[OSCON]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2007/08/08/advanced-spring-by-rod-johnson/</guid>
		<description><![CDATA[The Spring man himself, Rod Johnson, gave this talk. He looks better in person than he does on this book cover.
O&#8217;Reilly-mandated audience poll:
Using Spring: 90%
Strong knowledge: 50%
Written a BeanPostProcesser: Me + someone else (not that I remember what it was for)
33% of the audience use Spring for data access.
Use Spring version 2: 40%
Use Spring version [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://springframework.com/">Spring</a> man himself, <a href="http://springframework.com/people/rjohnson.html">Rod Johnson</a>, gave this talk. He looks better in person than he does on <a href="http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764543857.html">this book cover</a>.</p>
<p>O&#8217;Reilly-mandated audience poll:<br />
Using Spring: 90%<br />
Strong knowledge: 50%<br />
Written a BeanPostProcesser: Me + someone else (not that I remember what it was for)<br />
33% of the audience use Spring for data access.<br />
Use Spring version 2: 40%<br />
Use Spring version 1: 10%</p>
<p>Rod says: Spring is easy to customize because of its component model.</p>
<p>What is Spring? Well, it&#8217;s a Java framework that makes it easier to work with J2EE, and offers  alternatives to the weak spots or omissions in J2EE. That&#8217;s my description. Since this was an &#8220;advanced&#8221; talk, the presenter offered:<br />
Core components with <a href="http://en.wikipedia.org/wiki/Inversion_of_Control">Inversion of Control</a> (IoC), but IoC is really just an enabler.<br />
The triad:</p>
<ol>
<li>Consistent patterns</li>
<li>Integration</li>
<li>Portable (decouples your business logic from infrastructure)</li>
</ol>
<p>Gives you: <strong>Universal POJO programming model</strong></p>
<p>Spring uses good APIs abstractions like <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html">DataSource</a>, and replace bad ones like <a href="http://java.sun.com/j2ee/transactions/index.jsp">JTA</a>. and Spring uses configuration meta-data to wire together <a href="http://en.wikipedia.org/wiki/POJO">POJOs</a>.</p>
<p>Rod shows us an example of using <a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming">AOP</a> pointcut using matching rule. Man, I don&#8217;t know. Pointcuts makes sense when I really stare at them, but they are nasty looking.</p>
<p>With Spring and AOP, you can add remoting to any POJO without forcing the POJO to know about it. Likewise, you are not forced to make all service classes remote. Nasty magic AOP and XML config aside, this really is pretty cool. A big practical advantage when you are working with code or writing tests.</p>
<p>Now we talk about FactoryBeans. Rod asks: &#8220;who can tell me what a Spring FactoryBean does?&#8221; Weak audience response. Uh oh, Rod can tell that we&#8217;re not really <em>advanced</em> Spring users. Contempt. (A FactoryBean creates other beans.)</p>
<p>Back to our feature tour programming. You can add the <a href="http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/">JMX</a> API to you Spring beans. &#8220;Very cool.&#8221; Of course, only 5% of the audience use JMX.</p>
<p>Spring can use weave any bean with aspects. Example: can audit calls to particular method. Yikes, another pointcut example. I still find the syntax confusing as hell. But, the EJB interception model &#8220;sucks&#8221; because it&#8217;s not typesafe.</p>
<p>We start to pick up to whirlwind tour pace. Rod is cramming his 90-minute JavaOne presentation into 45 minutes.</p>
<p>There are (will be?) new extension points:</p>
<ul>
<li>New XML tags to produce zero or note Spring bean definitions</li>
<li>Properties</li>
<li>Tags for transactions</li>
</ul>
<p>What&#8217;s coming in Spring 2.1;</p>
<ul>
<li>increased use of annotations for config. and can mix XML and annotations</li>
<li>JCA 1.5</li>
<li>Improved JPA support</li>
<li>Aims: Make Spring still easier to use</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2007/08/08/advanced-spring-by-rod-johnson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bayeux and CometD: Open Source Comet Infrastructure by Alex Russell</title>
		<link>http://butlerpress.com/2007/08/08/bayeux-and-cometd-open-source-comet-infrastructure-by-alex-russell/</link>
		<comments>http://butlerpress.com/2007/08/08/bayeux-and-cometd-open-source-comet-infrastructure-by-alex-russell/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 22:20:09 +0000</pubDate>
		<dc:creator>scott</dc:creator>
				<category><![CDATA[OSCON]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://butlerpress.com/2007/08/08/bayeux-and-cometd-open-source-comet-infrastructure-by-alex-russell/</guid>
		<description><![CDATA[Bayeux and CometD: Open Source Comet Infrastructure
Alex Russell, Project Lead, SitePen 
OK, this is a hard one to explain without going into a lot of background. And I felt a bit sorry for the presenter, because it appeared that half of the (small) audience was already familiar with the topic. Part of the social networking/CometD/Dojo [...]]]></description>
			<content:encoded><![CDATA[<p>Bayeux and CometD: Open Source Comet Infrastructure<br />
Alex Russell, Project Lead, SitePen </p>
<p>OK, this is a hard one to explain without going into a lot of background. And I felt a bit sorry for the presenter, because it appeared that half of the (small) audience was already familiar with the topic. Part of the social networking/CometD/Dojo &#8220;community.&#8221;</p>
<p>The presenter works on <a href="http://dojotoolkit.org/" target="_top">Dojo</a>, and he&#8217;s got a great summary of <a href="http://alex.dojotoolkit.org/?p=573" target="_top">CometD and Bayeaux</a>.</p>
<p>Essentially, he&#8217;s trying to solve a fundamental problem of social networking websites. Each users has a page from the website in their browser. They need to send messages to each other &#8212; to each others&#8217; browsers &#8212; but they can&#8217;t do this directly with peer-to-peer networking. Everything must go through a central server and the browsers must poll for messages. </p>
<p>This network architecture is difficult to scale and has high latency. High latency is bad. Users notice latency and they stop using the site.</p>
<p>So, what to do? Responsiveness matters, but the total amount of data isn&#8217;t a big deal.</p>
<p>There&#8217;s a protocol called Comet that keeps an HTTP connection open, but it relies on &#8220;brittle hacks.&#8221; (I think. Sorry if I muffed this bit.)</p>
<p>Bayeux is a new replacement protocol. It&#8217;s goals:</p>
<ul>
<li>Browser native, no plugins</li>
<li>Easy to digest (simplicity is key, so that anybody can do use it)</li>
</ul>
<p>What it is:</p>
<ul>
<li><a href="http://www.json.org/" target="_top">JSON</a>-based</li>
<li>Hierarchical channels with simple globbing</li>
<li>Transport negotiated in handshake</li>
<li>Explicitly extensible</li>
<li>Stateless</li>
<li>Small number of verbs: handshake, connect, &#8230;</li>
</ul>
<p>What it is not:</p>
<ul>
<li>Authentication</li>
<li>Guranteed delivery</li>
</ul>
<p>The client API <em>is</em> simple:<br />
<code>dojox.comet.publish("topic", { /* payload */});</code></p>
<p>CometD is the reference server implementation of Bayeaux, but there are more:</p>
<ul>
<li>Jetty
<li>WebSphere
<li>Tomcat
</ul>
]]></content:encoded>
			<wfw:commentRss>http://butlerpress.com/2007/08/08/bayeux-and-cometd-open-source-comet-infrastructure-by-alex-russell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
