<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: latest news from Merbland (Nov 30)</title>
	<atom:link href="http://merbist.com/2008/11/30/latest-news-from-merbland-nov-30/feed/" rel="self" type="application/rss+xml" />
	<link>http://merbist.com/2008/11/30/latest-news-from-merbland-nov-30/</link>
	<description>Rails 3, Ruby &#38; MacRuby news - tutorials - consulting - training</description>
	<lastBuildDate>Tue, 16 Feb 2010 18:50:31 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Yehuda Katz</title>
		<link>http://merbist.com/2008/11/30/latest-news-from-merbland-nov-30/comment-page-1/#comment-277</link>
		<dc:creator>Yehuda Katz</dc:creator>
		<pubDate>Mon, 01 Dec 2008 18:05:29 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=290#comment-277</guid>
		<description>@pratik come on man :(

Can we please, please keep the level of discourse relatively civil, especially on matters on fact?

As Matt said, the mutexes used by Merb are used at bootup and once when things are logged (which doesn&#039;t happen per request). 

We&#039;re not diametrically opposed to the idea of mutexing other things. In fact, I would expect us to add a few mutexes to our codebase over time for caches in which a clear performance benefit could be demonstrated (i.e. the savings of the cache exceeds the cost of the mutex over many threads).

The difference I believe Matt was trying to point out was just that Merb was designed to be threadsafe from the beginning, which reduces our need for mutexes as well as increases the likelihood that we haven&#039;t missed something important.

As a side note, I&#039;m curious how you were able to make the Rails dependency code threadsafe.

Again, take it easy :-D We&#039;re all on the same (Ruby) side.</description>
		<content:encoded><![CDATA[<p>@pratik come on man <img src='http://merbist.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Can we please, please keep the level of discourse relatively civil, especially on matters on fact?</p>
<p>As Matt said, the mutexes used by Merb are used at bootup and once when things are logged (which doesn&#8217;t happen per request). </p>
<p>We&#8217;re not diametrically opposed to the idea of mutexing other things. In fact, I would expect us to add a few mutexes to our codebase over time for caches in which a clear performance benefit could be demonstrated (i.e. the savings of the cache exceeds the cost of the mutex over many threads).</p>
<p>The difference I believe Matt was trying to point out was just that Merb was designed to be threadsafe from the beginning, which reduces our need for mutexes as well as increases the likelihood that we haven&#8217;t missed something important.</p>
<p>As a side note, I&#8217;m curious how you were able to make the Rails dependency code threadsafe.</p>
<p>Again, take it easy <img src='http://merbist.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  We&#8217;re all on the same (Ruby) side.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Aimonetti</title>
		<link>http://merbist.com/2008/11/30/latest-news-from-merbland-nov-30/comment-page-1/#comment-276</link>
		<dc:creator>Matt Aimonetti</dc:creator>
		<pubDate>Mon, 01 Dec 2008 17:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=290#comment-276</guid>
		<description>@pratik As a matter of fact, I know what I&#039;m talking about, at least this time ;) 
I&#039;m glad you are reading our source code, but maybe you should have checked how it&#039;s being used.

However, I did edit the sentence you highlighted for what I meant was not really clear:

  &quot;by default, Merb requests don&#039;t go through any locks&quot;

Let me explain that, the mutex you found in the router is only used once when the routes get prepared/compiled, meaning that requests don&#039;t go through them.

The second mutex in on the memory session which is not Merb&#039;s default session store.

Finally, the last mutex is the only mutex you might have to deal with in your app: the logger. However, by default we are only logging errors in production, meaning that the mutex is only used in case of problems. Normal requests don&#039;t get logged and therefore we don&#039;t synchronize the mutex on every single request.

With all due respect, I have to say I was a bit surprised to see what I consider being an insult from a Rails core member. As a frequent reader of your blog though, I guess I should not take offense ;)</description>
		<content:encoded><![CDATA[<p>@pratik As a matter of fact, I know what I&#8217;m talking about, at least this time <img src='http://merbist.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
I&#8217;m glad you are reading our source code, but maybe you should have checked how it&#8217;s being used.</p>
<p>However, I did edit the sentence you highlighted for what I meant was not really clear:</p>
<p>  &#8220;by default, Merb requests don&#8217;t go through any locks&#8221;</p>
<p>Let me explain that, the mutex you found in the router is only used once when the routes get prepared/compiled, meaning that requests don&#8217;t go through them.</p>
<p>The second mutex in on the memory session which is not Merb&#8217;s default session store.</p>
<p>Finally, the last mutex is the only mutex you might have to deal with in your app: the logger. However, by default we are only logging errors in production, meaning that the mutex is only used in case of problems. Normal requests don&#8217;t get logged and therefore we don&#8217;t synchronize the mutex on every single request.</p>
<p>With all due respect, I have to say I was a bit surprised to see what I consider being an insult from a Rails core member. As a frequent reader of your blog though, I guess I should not take offense <img src='http://merbist.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pratik</title>
		<link>http://merbist.com/2008/11/30/latest-news-from-merbland-nov-30/comment-page-1/#comment-273</link>
		<dc:creator>Pratik</dc:creator>
		<pubDate>Mon, 01 Dec 2008 09:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=290#comment-273</guid>
		<description>&quot;Merb doesnâ€™t use any locks when running with the mutex off&quot;

You have no idea what you&#039;re saying, do you ;-) ?

merb-core/lib/merb-core/dispatch/router.rb:  # Compilation is synchronized by mutex.
merb-core/lib/merb-core/dispatch/router.rb:    @compiler_mutex  = Mutex.new
merb-core/lib/merb-core/dispatch/router.rb:        @compiler_mutex.synchronize do
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex = Mutex.new
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex.synchronize {
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex.synchronize {
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex.synchronize {
merb-core/lib/merb-core/logger.rb:    @@mutex = {}
merb-core/lib/merb-core/logger.rb:      @mutex = (@@mutex[@log] &#124;&#124;= Mutex.new)
merb-core/lib/merb-core/logger.rb:      @mutex.synchronize do</description>
		<content:encoded><![CDATA[<p>&#8220;Merb doesnâ€™t use any locks when running with the mutex off&#8221;</p>
<p>You have no idea what you&#8217;re saying, do you <img src='http://merbist.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ?</p>
<p>merb-core/lib/merb-core/dispatch/router.rb:  # Compilation is synchronized by mutex.<br />
merb-core/lib/merb-core/dispatch/router.rb:    @compiler_mutex  = Mutex.new<br />
merb-core/lib/merb-core/dispatch/router.rb:        @compiler_mutex.synchronize do<br />
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex = Mutex.new<br />
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex.synchronize {<br />
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex.synchronize {<br />
merb-core/lib/merb-core/dispatch/session/memory.rb:      @mutex.synchronize {<br />
merb-core/lib/merb-core/logger.rb:    @@mutex = {}<br />
merb-core/lib/merb-core/logger.rb:      @mutex = (@@mutex[@log] ||= Mutex.new)<br />
merb-core/lib/merb-core/logger.rb:      @mutex.synchronize do</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Motte</title>
		<link>http://merbist.com/2008/11/30/latest-news-from-merbland-nov-30/comment-page-1/#comment-272</link>
		<dc:creator>Scott Motte</dc:creator>
		<pubDate>Mon, 01 Dec 2008 08:03:40 +0000</pubDate>
		<guid isPermaLink="false">http://merbist.com/?p=290#comment-272</guid>
		<description>cool. thanks Matt. this is exciting for me. first time I&#039;ve ever been linked to.</description>
		<content:encoded><![CDATA[<p>cool. thanks Matt. this is exciting for me. first time I&#8217;ve ever been linked to.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
