<?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"
	>
<channel>
	<title>Comments on: Making a Connection Pool for Glorp in Seaside</title>
	<atom:link href="http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/feed/" rel="self" type="application/rss+xml" />
	<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/</link>
	<description>thoughts on Smalltalk and programming in general...</description>
	<pubDate>Fri, 16 May 2008 05:30:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-6770</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Fri, 26 Oct 2007 21:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-6770</guid>
		<description>The within Smalltalk approach is necessary so that Glorp is always served up the same connection, otherwise transactions won't work.</description>
		<content:encoded><![CDATA[<p>The within Smalltalk approach is necessary so that Glorp is always served up the same connection, otherwise transactions won&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MK</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-6767</link>
		<dc:creator>MK</dc:creator>
		<pubDate>Fri, 26 Oct 2007 19:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-6767</guid>
		<description>Perhaps you could use pgpool or sqlrelay for pooling, although I like your within-Smalltalk approach better.</description>
		<content:encoded><![CDATA[<p>Perhaps you could use pgpool or sqlrelay for pooling, although I like your within-Smalltalk approach better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-2525</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Wed, 04 Apr 2007 23:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-2525</guid>
		<description>I'm guessing mine will work fine with any version of Glorp, I'm not doing anything overly fancy, just swapping out the current database accessor on a Glorp session.</description>
		<content:encoded><![CDATA[<p>I&#8217;m guessing mine will work fine with any version of Glorp, I&#8217;m not doing anything overly fancy, just swapping out the current database accessor on a Glorp session.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick F.</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-2523</link>
		<dc:creator>Rick F.</dc:creator>
		<pubDate>Wed, 04 Apr 2007 22:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-2523</guid>
		<description>Ramon -- 

I'll have to give this a shot on VW and see what I might run into on that platform.. Obviously I've got a different Glorp backend to deal with (no SequakDatabaseAccessor -- it's a VWDatabaseAccessor IIRC) which I know has a different "look" to it.. I had a connection pool I got from someone else that was written for Squeak and gave up on getting it to work w/ Glorp on VW -- too much down in the bowels of Glorp and my infamiliarity with those bowels.. (8-</description>
		<content:encoded><![CDATA[<p>Ramon &#8212; </p>
<p>I&#8217;ll have to give this a shot on VW and see what I might run into on that platform.. Obviously I&#8217;ve got a different Glorp backend to deal with (no SequakDatabaseAccessor &#8212; it&#8217;s a VWDatabaseAccessor IIRC) which I know has a different &#8220;look&#8221; to it.. I had a connection pool I got from someone else that was written for Squeak and gave up on getting it to work w/ Glorp on VW &#8212; too much down in the bowels of Glorp and my infamiliarity with those bowels.. (8-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-883</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Sat, 13 Jan 2007 23:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-883</guid>
		<description>One would never, in a web context, hold a transaction open between requests, so you're correct, this isn't an issue. 

I've already been lurking on the Glorp mailing list for a while, even posted once or twice, and I'll post more about my experiences as I find time.  Right now, I'm busy working on my own ActiveRecord derived from Magritte meta data.  If I run into any serious problems, you can bet I'll post questions to the list.</description>
		<content:encoded><![CDATA[<p>One would never, in a web context, hold a transaction open between requests, so you&#8217;re correct, this isn&#8217;t an issue. </p>
<p>I&#8217;ve already been lurking on the Glorp mailing list for a while, even posted once or twice, and I&#8217;ll post more about my experiences as I find time.  Right now, I&#8217;m busy working on my own ActiveRecord derived from Magritte meta data.  If I run into any serious problems, you can bet I&#8217;ll post questions to the list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin J. Laubach</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-882</link>
		<dc:creator>Martin J. Laubach</dc:creator>
		<pubDate>Sat, 13 Jan 2007 22:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-882</guid>
		<description>Oh, I see, indeed you are pooling the backend database connections. I still see a problem with this approach should one ever hold a transaction open - but in conjunction with Seaside, this is a bad thing to do anyway.

Thanks for the idea, I'll have a go at retrofitting some older applications of mine to see how that pooling interferes with unusual user interactions.

Also. it would be cool if you could join us on the glorp mailing list, I'm sure Alan would be more than interested in hearing from your experiences.

Regards, mjl</description>
		<content:encoded><![CDATA[<p>Oh, I see, indeed you are pooling the backend database connections. I still see a problem with this approach should one ever hold a transaction open - but in conjunction with Seaside, this is a bad thing to do anyway.</p>
<p>Thanks for the idea, I&#8217;ll have a go at retrofitting some older applications of mine to see how that pooling interferes with unusual user interactions.</p>
<p>Also. it would be cool if you could join us on the glorp mailing list, I&#8217;m sure Alan would be more than interested in hearing from your experiences.</p>
<p>Regards, mjl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-855</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Fri, 12 Jan 2007 21:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-855</guid>
		<description>Of course, I'm not concerned with what "could" be done in Rails, only what "is" done in Rails, and that's passing strings.  Glorp does it better, that was my point.</description>
		<content:encoded><![CDATA[<p>Of course, I&#8217;m not concerned with what &#8220;could&#8221; be done in Rails, only what &#8220;is&#8221; done in Rails, and that&#8217;s passing strings.  Glorp does it better, that was my point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronaldo</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-850</link>
		<dc:creator>Ronaldo</dc:creator>
		<pubDate>Fri, 12 Jan 2007 17:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-850</guid>
		<description>The code above is slightly incorrect (possibly due to a "less than" sign). It would be like this:

matches =
    SomeClass.find :all,
        :limit =&#62; 15,
        :conditions =&#62; proc { &#124;each&#124; each.timestamp !=  DateTime.now },
        :order =&#62; proc { &#124;each&#124; each.timestamp.descending }</description>
		<content:encoded><![CDATA[<p>The code above is slightly incorrect (possibly due to a &#8220;less than&#8221; sign). It would be like this:</p>
<p>matches =<br />
    SomeClass.find :all,<br />
        :limit =&gt; 15,<br />
        :conditions =&gt; proc { |each| each.timestamp !=  DateTime.now },<br />
        :order =&gt; proc { |each| each.timestamp.descending }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronaldo</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-840</link>
		<dc:creator>Ronaldo</dc:creator>
		<pubDate>Fri, 12 Jan 2007 11:58:34 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-840</guid>
		<description>Nice example. I'd argue that using small pieces of SQL is not a deviation from the basic style of the language, but I see your point. The fact that Ruby doesn't accept more than one block as a parameter to a method without resorting to an unusual parameter passing strategy is a bummer. It's would certainly be possible to replicate the above syntax in Ruby, but not without using an extra keyword.

&lt;pre&gt;
matches =
    SomeClass.find :all,
        :limit =&#62; 15,
        :conditions =&#62; proc { &#124;each&#124; each.timestamp  proc { &#124;each&#124; each.timestamp.descending }
&lt;/pre&gt;

Of course, Rails doesn't support that as of today (as far as I know), but It would be possible. In fact, part of the Rails validation protocol uses something similar for validation.</description>
		<content:encoded><![CDATA[<p>Nice example. I&#8217;d argue that using small pieces of SQL is not a deviation from the basic style of the language, but I see your point. The fact that Ruby doesn&#8217;t accept more than one block as a parameter to a method without resorting to an unusual parameter passing strategy is a bummer. It&#8217;s would certainly be possible to replicate the above syntax in Ruby, but not without using an extra keyword.</p>
<pre>
matches =
    SomeClass.find :all,
        :limit =&gt; 15,
        :conditions =&gt; proc { |each| each.timestamp  proc { |each| each.timestamp.descending }
</pre>
<p>Of course, Rails doesn&#8217;t support that as of today (as far as I know), but It would be possible. In fact, part of the Rails validation protocol uses something similar for validation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-831</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Fri, 12 Jan 2007 00:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-831</guid>
		<description>Look closer, I'm not pooling Glorp sessions, I'm pooling the database accessor on the Glorp session.  Each Seaside session maintains one single Glorp session throughout its lifetime, but as far as I can tell, I can change the accessor for that session with no ill effect, it's just an adapter that contains a connection (which we want to pool) and translates to a specific sql dialect.</description>
		<content:encoded><![CDATA[<p>Look closer, I&#8217;m not pooling Glorp sessions, I&#8217;m pooling the database accessor on the Glorp session.  Each Seaside session maintains one single Glorp session throughout its lifetime, but as far as I can tell, I can change the accessor for that session with no ill effect, it&#8217;s just an adapter that contains a connection (which we want to pool) and translates to a specific sql dialect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin J. Laubach</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-830</link>
		<dc:creator>Martin J. Laubach</dc:creator>
		<pubDate>Fri, 12 Jan 2007 00:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-830</guid>
		<description>Doesn't that break object identity in Glorp? AFAIK, Glorp database objects are identical when they refer to the same underlying database object -- however, this identity is tied to the Glorp session.

So I think it's going to confuse Glorp a lot if you read object X from session A, modify it and write it on session B.

Also, you'll lose identity, the same object will be instanciated several times from different sessions, so what happens when you change instance 1 of object X but later on use instance 2?

Regards, mjl</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t that break object identity in Glorp? AFAIK, Glorp database objects are identical when they refer to the same underlying database object &#8212; however, this identity is tied to the Glorp session.</p>
<p>So I think it&#8217;s going to confuse Glorp a lot if you read object X from session A, modify it and write it on session B.</p>
<p>Also, you&#8217;ll lose identity, the same object will be instanciated several times from different sessions, so what happens when you change instance 1 of object X but later on use instance 2?</p>
<p>Regards, mjl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-826</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 11 Jan 2007 18:35:45 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-826</guid>
		<description>Cédrick,

&#62;Just a question, is Glorp only on squeakmap ?

Alan Knight develops Glorp on Cincom VisualWorks and it will eventually (soon) become Cincom's official persistence framework. So if you install a current version of VisualWorks (for download of non commercial version see www.cincomsmalltalk.com) you will also get Glorp along with it. Additionally, the most up-to-date code for VisualWorks can be found on the Cincom Public Store Repository (for setting up access see also www.cincomsmalltalk.com).

Hope this helps,
Paul</description>
		<content:encoded><![CDATA[<p>Cédrick,</p>
<p>&gt;Just a question, is Glorp only on squeakmap ?</p>
<p>Alan Knight develops Glorp on Cincom VisualWorks and it will eventually (soon) become Cincom&#8217;s official persistence framework. So if you install a current version of VisualWorks (for download of non commercial version see <a href="http://www.cincomsmalltalk.com" rel="nofollow">http://www.cincomsmalltalk.com</a>) you will also get Glorp along with it. Additionally, the most up-to-date code for VisualWorks can be found on the Cincom Public Store Repository (for setting up access see also <a href="http://www.cincomsmalltalk.com" rel="nofollow">http://www.cincomsmalltalk.com</a>).</p>
<p>Hope this helps,<br />
Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-823</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Thu, 11 Jan 2007 17:07:19 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-823</guid>
		<description>Ronaldo, It may be unqualified, but it is a fact.  Rails only works well when the database follows its assumptions, that's well known, but Glorp will map to anything.  Glorp is a "full blown" OR Mapper, Rails is a "lite" OR mapper.  Glorp is far more capable, but a bit heavier on configuration.

Nor does Rails use native Ruby syntax (I should have said "style") for its queries.

&lt;pre&gt;
matches = 
    SomeClass.find(:all, 
        :limit =&gt; 15, 
        :conditions =&gt; "timestamp &lt; now()", 
        : order =&gt; "timestamp desc")
&lt;/pre &gt;

That's not native, that's passing pieces of sql in strings as associations, not at all how you'd query a collection in memory using the each method and a block.

Glorp actually uses native Smalltalk syntax, i.e. blocks, not sql in strings.  In Glorp, I could write like this...

&lt;pre&gt;
matches := session execute: 
    (SomeClass findAll 
        limit: 15;
        where:[:each &#124; each timestamp &lt; TimeStamp now];
        orderBy: [:each &#124; each timestamp descending])
&lt;/pre&gt;

And in Glorp, queries are actually composable objects, so I can compose complicated queries, unions, joins, sub-queries, all in Smalltalk without dropping into sql, Rails makes you drop into sql.</description>
		<content:encoded><![CDATA[<p>Ronaldo, It may be unqualified, but it is a fact.  Rails only works well when the database follows its assumptions, that&#8217;s well known, but Glorp will map to anything.  Glorp is a &#8220;full blown&#8221; OR Mapper, Rails is a &#8220;lite&#8221; OR mapper.  Glorp is far more capable, but a bit heavier on configuration.</p>
<p>Nor does Rails use native Ruby syntax (I should have said &#8220;style&#8221;) for its queries.</p>
<pre>
matches =
    SomeClass.find(:all,
        :limit => 15,
        :conditions => "timestamp < now()",
        : order => &#8220;timestamp desc&#8221;)
</pre>
<p>That&#8217;s not native, that&#8217;s passing pieces of sql in strings as associations, not at all how you&#8217;d query a collection in memory using the each method and a block.</p>
<p>Glorp actually uses native Smalltalk syntax, i.e. blocks, not sql in strings.  In Glorp, I could write like this&#8230;</p>
<pre>
matches := session execute:
    (SomeClass findAll
        limit: 15;
        where:[:each | each timestamp < TimeStamp now];
        orderBy: [:each | each timestamp descending])
</pre>
<p>And in Glorp, queries are actually composable objects, so I can compose complicated queries, unions, joins, sub-queries, all in Smalltalk without dropping into sql, Rails makes you drop into sql.</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronaldo</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-818</link>
		<dc:creator>Ronaldo</dc:creator>
		<pubDate>Thu, 11 Jan 2007 15:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-818</guid>
		<description>One thing that always strikes me about Smalltalk code is how beautiful it is. Going back to .NET or something else is always hard to do after coding on it for a while. GLORP is really nice. 

"It’ll do things Rails couldn’t dream of as far as mapping and querying goes, and it does it in native Smalltalk syntax."

That, however, is misleading and unqualified. It would be interesting to see at least one example of it, especially considering that Rails uses Ruby syntax in the same way Glorp uses Smalltalk syntax.</description>
		<content:encoded><![CDATA[<p>One thing that always strikes me about Smalltalk code is how beautiful it is. Going back to .NET or something else is always hard to do after coding on it for a while. GLORP is really nice. </p>
<p>&#8220;It’ll do things Rails couldn’t dream of as far as mapping and querying goes, and it does it in native Smalltalk syntax.&#8221;</p>
<p>That, however, is misleading and unqualified. It would be interesting to see at least one example of it, especially considering that Rails uses Ruby syntax in the same way Glorp uses Smalltalk syntax.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-816</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Thu, 11 Jan 2007 14:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-816</guid>
		<description>No problem, I'm not posting as often these days, but I'm trying to do quality posts on topics relevant to me, and hopefully to everyone else.  As for Glorp, yea, as far as I know, I haven't seen it anywhere else.</description>
		<content:encoded><![CDATA[<p>No problem, I&#8217;m not posting as often these days, but I&#8217;m trying to do quality posts on topics relevant to me, and hopefully to everyone else.  As for Glorp, yea, as far as I know, I haven&#8217;t seen it anywhere else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cédrick</title>
		<link>http://onsmalltalk.com/programming/smalltalk/seaside/making-a-connection-pool-for-glorp-in-seaside/#comment-811</link>
		<dc:creator>cédrick</dc:creator>
		<pubDate>Thu, 11 Jan 2007 10:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/general/making-a-connection-pool-for-glorp-in-seaside/#comment-811</guid>
		<description>Thank you a lot Ramon for these excellent posts, I really enjoy reading them !
Glorp seems cool too , I'll definitively have a look at it soon !!!

Just a question, is Glorp only on squeakmap ?

See you

Cédrick</description>
		<content:encoded><![CDATA[<p>Thank you a lot Ramon for these excellent posts, I really enjoy reading them !<br />
Glorp seems cool too , I&#8217;ll definitively have a look at it soon !!!</p>
<p>Just a question, is Glorp only on squeakmap ?</p>
<p>See you</p>
<p>Cédrick</p>
]]></content:encoded>
	</item>
</channel>
</rss>
