<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>PaulBarry.com - Do we really need multi-threaded web applications?</title>
  <subtitle type="html">My thoughts, ideas, questions and concerns on technology, sports, music and life</subtitle>
  <id>tag:paulbarry.com,2007:Paulbarry.com</id>
  <generator uri="http://www.paulbarry.com" version="3.0">PaulBarry.com</generator>
  <link href="http://paulbarry.com/xml/atom/article/4881/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="http://paulbarry.com/articles/2008/04/17/do-we-really-need-multi-threaded-web-applications" rel="alternate" type="text/html"/>

  <updated>2009-01-06T01:11:09-05:00</updated>
  <entry>
    <author>
      <name>Paul Barry</name>
      <email>mail@paulbarry.com</email>
    </author>
    <id>urn:uuid:2f988dad-4245-4d8c-a071-6d11769e1570</id>

    <published>2008-04-17T21:14:20-04:00</published>
    <updated>2008-04-17T21:14:20-04:00</updated>
    <title type="html">Do we really need multi-threaded web applications?</title>
    <link href="http://paulbarry.com/articles/2008/04/17/do-we-really-need-multi-threaded-web-applications" rel="alternate" type="text/html"/>

    <category term="technology" scheme="http://paulbarry.com/articles/category/technology" label="Technology"/>
        <category term="Rails" scheme="http://paulbarry.com/articles/tag/rails"/>
    <category term="Ruby" scheme="http://paulbarry.com/articles/tag/ruby"/>
    <category term="merb," scheme="http://paulbarry.com/articles/tag/merb"/>
        <summary type="html">&lt;p&gt;I&apos;ve given a few presentations on Merb now and had the chance to discuss Merb with several different people.  One point people have mentioned is that Rails is single threaded by design, not as a limitation as I&apos;ve sort of implied in the talks I&apos;ve given.  Rails being single threaded relieves the developer from thinking about threading issues, which can cause bugs that hard to track down and test for.  Sure, this makes it theoretically less efficient than a multi-threaded app, but that may be a small price to pay.&lt;/p&gt;

&lt;p&gt;On the other hand, before doing Rails I was doing multi-threaded web applications in Java/J2EE for years and I never ran into threading issues.  Most MVC frameworks made it pretty easy to avoid those types of problems and it was easy enough to just make sure that any servlets that I would write wouldn&apos;t use any shared data.  Threading issues were something you had to kind in the back of your mind, but I never really had any problems.&lt;/p&gt;

&lt;p&gt;So do we need multi-threaded web applications or do the potential complexities introduced by threading outweigh that benefit?  And how much resource utilization/performance benefit is there to be gained by making our Ruby web apps multi-threaded?&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I&apos;ve given a few presentations on Merb now and had the chance to discuss Merb with several different people.  One point people have mentioned is that Rails is single threaded by design, not as a limitation as I&apos;ve sort of implied in the talks I&apos;ve given.  Rails being single threaded relieves the developer from thinking about threading issues, which can cause bugs that hard to track down and test for.  Sure, this makes it theoretically less efficient than a multi-threaded app, but that may be a small price to pay.&lt;/p&gt;

&lt;p&gt;On the other hand, before doing Rails I was doing multi-threaded web applications in Java/J2EE for years and I never ran into threading issues.  Most MVC frameworks made it pretty easy to avoid those types of problems and it was easy enough to just make sure that any servlets that I would write wouldn&apos;t use any shared data.  Threading issues were something you had to kind in the back of your mind, but I never really had any problems.&lt;/p&gt;

&lt;p&gt;So do we need multi-threaded web applications or do the potential complexities introduced by threading outweigh that benefit?  And how much resource utilization/performance benefit is there to be gained by making our Ruby web apps multi-threaded?&lt;/p&gt;
</content>
  </entry>
  </feed>