<?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: FastSessions Rails Plugin Released</title>
	<atom:link href="http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/</link>
	<description>Yet Another Admin&#039;s blog</description>
	<lastBuildDate>Thu, 04 Feb 2010 07:58:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrew Watkins</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-230724</link>
		<dc:creator>Andrew Watkins</dc:creator>
		<pubDate>Fri, 19 Mar 2010 02:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-230724</guid>
		<description>We&#039;re using postgresql and actually ported it over, except for one problem:  Postgresql does have crc32 as a function.  You can kind of get there by either writing your own or installing the one with ltree.  Postgresql does however have md5.  What we did is setup tests against unique(md5_session_string, session_id), unique(crc32, session_id), and unique(md5_session_byte,session_id).  The last one is a byte representation of the md5 hash.  For random queries, the 1st two implementations ran at about the same speed, which was basically instantaneous.  The byte one definitely showed a little lag, and so would not recommend it.  Finally we created a stored procedure to actually handle the insert/update as postgresql doesn&#039;t have a &quot;ON DUPLICATE KEY UPDATE&quot;.  The question is whether or not this is faster than just indexing the session_id itself or is something screwy is going on where postgresql is optimizing against the hashed values.</description>
		<content:encoded><![CDATA[<p>We&#8217;re using postgresql and actually ported it over, except for one problem:  Postgresql does have crc32 as a function.  You can kind of get there by either writing your own or installing the one with ltree.  Postgresql does however have md5.  What we did is setup tests against unique(md5_session_string, session_id), unique(crc32, session_id), and unique(md5_session_byte,session_id).  The last one is a byte representation of the md5 hash.  For random queries, the 1st two implementations ran at about the same speed, which was basically instantaneous.  The byte one definitely showed a little lag, and so would not recommend it.  Finally we created a stored procedure to actually handle the insert/update as postgresql doesn&#8217;t have a &#8220;ON DUPLICATE KEY UPDATE&#8221;.  The question is whether or not this is faster than just indexing the session_id itself or is something screwy is going on where postgresql is optimizing against the hashed values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paolo Montrasio</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-230485</link>
		<dc:creator>Paolo Montrasio</dc:creator>
		<pubDate>Fri, 19 Mar 2010 10:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-230485</guid>
		<description>There is a plugin called SmartSessionStore that does more or less the same and works also with PostgreSQL. I&#039;ve been using it for almost an year in production with no problems at all.</description>
		<content:encoded><![CDATA[<p>There is a plugin called SmartSessionStore that does more or less the same and works also with PostgreSQL. I&#8217;ve been using it for almost an year in production with no problems at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-227149</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 19 Mar 2010 17:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-227149</guid>
		<description>What would the impact be for using fast_sessions with MySQL and MyISAM tables as opposed to InnoDB (table vs. row level locking)? Any thoughts?</description>
		<content:encoded><![CDATA[<p>What would the impact be for using fast_sessions with MySQL and MyISAM tables as opposed to InnoDB (table vs. row level locking)? Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-225701</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 19 Mar 2010 20:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-225701</guid>
		<description>What about using MyISAM for the sessions table. Implications, like for instance, table locking during updates/additions? 
Unfortunately, my MySQL database was not compiled with InnoDB.</description>
		<content:encoded><![CDATA[<p>What about using MyISAM for the sessions table. Implications, like for instance, table locking during updates/additions?<br />
Unfortunately, my MySQL database was not compiled with InnoDB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrey</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-218209</link>
		<dc:creator>Andrey</dc:creator>
		<pubDate>Fri, 19 Mar 2010 10:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-218209</guid>
		<description>Of course, it&#039;s a little bit artificial case, but when session size exceed 70kb I become error (code 500). Log says that sql connection lost during update operation. 
After that application don&#039;t get back alive, until I delete session record.</description>
		<content:encoded><![CDATA[<p>Of course, it&#8217;s a little bit artificial case, but when session size exceed 70kb I become error (code 500). Log says that sql connection lost during update operation.<br />
After that application don&#8217;t get back alive, until I delete session record.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Interesting Rails Tidbits #4</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-215911</link>
		<dc:creator>Interesting Rails Tidbits #4</dc:creator>
		<pubDate>Fri, 19 Mar 2010 21:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-215911</guid>
		<description>[...] FastSessions (official project page) is a Rails plugin that performs some interesting tricks on the way that Rails handles session storage. It appears only to work on MySQL and no hard performance numbers are given yet (though a &#8220;10-15% performance gain&#8221; is suggested), but I&#8217;ve seen quite a few people linking to it, so it might be worth a look. Scribd.com (YouTube-for-PDFs) supposedly uses this in production. [...]</description>
		<content:encoded><![CDATA[<p>[...] FastSessions (official project page) is a Rails plugin that performs some interesting tricks on the way that Rails handles session storage. It appears only to work on MySQL and no hard performance numbers are given yet (though a &#8220;10-15% performance gain&#8221; is suggested), but I&#8217;ve seen quite a few people linking to it, so it might be worth a look. Scribd.com (YouTube-for-PDFs) supposedly uses this in production. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew Blas</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-215815</link>
		<dc:creator>Drew Blas</dc:creator>
		<pubDate>Fri, 19 Mar 2010 15:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-215815</guid>
		<description>You mentioned turning off sessions from bot requests, but didn&#039;t mention how.  Here&#039;s my method:

[application.rb]
# turn off sessions if this is a request from a robot
  session :off, :if =&gt; proc { &#124;request&#124; request.user_agentuser_agent =~ /\b(Baidu&#124;Gigabot&#124;Googlebot&#124;libwww-perl&#124;lwp-trivial&#124;msnbot&#124;SiteUptime&#124;Slurp&#124;WordPress&#124;ZIBB&#124;ZyBorg)\b/i }</description>
		<content:encoded><![CDATA[<p>You mentioned turning off sessions from bot requests, but didn&#8217;t mention how.  Here&#8217;s my method:</p>
<p>[application.rb]<br />
# turn off sessions if this is a request from a robot<br />
  session <img src='http://kovyrin.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ff, :if =&gt; proc { |request| request.user_agentuser_agent =~ /\b(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg)\b/i }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-214122</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Fri, 19 Mar 2010 12:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-214122</guid>
		<description>&lt; UNIX_TIMESTAMP(NOW()) - #{seconds}&quot;

Note the UNIX_TIMESTAMP around (updated_at) in first part of the comment</description>
		<content:encoded><![CDATA[<p>&lt; UNIX_TIMESTAMP(NOW()) &#8211; #{seconds}&#8221;</p>
<p>Note the UNIX_TIMESTAMP around (updated_at) in first part of the comment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-214120</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Fri, 19 Mar 2010 12:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-214120</guid>
		<description>the self.delete_old! method did not work for me. I changed it to:

@@connection.execute &quot;DELETE FROM #{table_name} WHERE UNIX_TIMESTAMP(updated_at) </description>
		<content:encoded><![CDATA[<p>the self.delete_old! method did not work for me. I changed it to:</p>
<p>@@connection.execute &#8220;DELETE FROM #{table_name} WHERE UNIX_TIMESTAMP(updated_at)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/comment-page-1/#comment-211302</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 19 Mar 2010 05:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/#comment-211302</guid>
		<description>Why don&#039;t you just use the cookiestore in rails 2.0? That way you don&#039;t need to store sessions in the database at all!</description>
		<content:encoded><![CDATA[<p>Why don&#8217;t you just use the cookiestore in rails 2.0? That way you don&#8217;t need to store sessions in the database at all!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
