[SqueakDBX] Re: Connection Pool for Glorp

Mariano Martinez Peck marianopeck at gmail.com
Mon Mar 29 19:21:13 UTC 2010


I am at #pharo-project

I am not sure which would be the better solution , thus. But we can discuss.


cheers

mariano

On Mon, Mar 29, 2010 at 1:59 PM, John Toohey <jt at parspro.com> wrote:

> Hey,
> Missed you yesterday, so let me know when you'll be around again. The
> remaining issue with the connection pool, is that I am pooling only
> DBXConnection objects, but perhaps I should be pooling DatabaseDriver
> objects. I'd prefer not to use the driver at all, but I know thats part of
> the DBX re-factoring that you did. Its really just that issue that I want to
> discuss.
>
>
> On Sun, Mar 28, 2010 at 17:33, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>> I am in #pharo-project under MarianoPeck...but for no more than one hour
>> :)
>>
>> http://webchat.freenode.net/?channels=pharo-project
>>
>> Cheers
>>
>> Mariano
>>
>>
>> On Sun, Mar 28, 2010 at 1:55 PM, John Toohey <jt at parspro.com> wrote:
>>
>>> Hey,
>>> Just wondering if you are around for a quick chat on IRC/Skype/Jabber.
>>> Dealing with some funny stuff here with the handing of the DBXConnection is
>>> the driver.
>>>
>>>
>>> On Sat, Mar 27, 2010 at 13:26, John Toohey <jt at parspro.com> wrote:
>>>
>>>> Great, I just want to make sure the ConnectionPool cleans up properly,
>>>> before returning the connection. Making good progress with the pool, at
>>>> least for reading. Lose the connection, when I do an insert or update
>>>> though, so need to track if that is happening in the Driver or my code.
>>>>
>>>>
>>>> On Sat, Mar 27, 2010 at 12:20, Mariano Martinez Peck <
>>>> marianopeck at gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Sat, Mar 27, 2010 at 1:04 PM, John Toohey <johnptoohey at gmail.com>wrote:
>>>>>
>>>>>> Is there a way to see if the DBXConnection is in the middle of a
>>>>>> transaction? If I am releasing a connection, I'd like to rollback if a
>>>>>> transaction is open.
>>>>>>
>>>>>>
>>>>> I answer you in SqueakDBX so that not to make noise in Glorp.
>>>>>
>>>>> No, there is no way right now, but it can be easily added (I think).
>>>>> You can add a boolean variable hasTransactionOpened to DBXConnection,
>>>>> initializated in false.
>>>>> Then, then calling DBXConnection >> startTransaction     you set that
>>>>> to true.
>>>>> Then, in messages commit, rollback you put that to false.
>>>>> Then in messsages finalize, close, and maybe some other place, you ask
>>>>> for the value, if it is true, then you rallback and put variable to false
>>>>>
>>>>> Of course we would need to write tests for that.
>>>>>
>>>>> I can give it a try this weekend.
>>>>>
>>>>> What do you think ?
>>>>>
>>>>> Cheers
>>>>>
>>>>> Mariano
>>>>>
>>>>>
>>>>>>
>>>>>> On Sat, Mar 27, 2010 at 10:02, Mariano Martinez Peck <
>>>>>> marianopeck at gmail.com> wrote:
>>>>>>
>>>>>>> Wait....let's calm down....too much misunderstands here.
>>>>>>>
>>>>>>> Glorp is maintained and developed in VW. There is a port to squeak
>>>>>>> from 2 years old or more. Then, we took that version and did several
>>>>>>> refactors to Glorp so that it uses an abstract DatabaseDriver. This only
>>>>>>> affects SqueakDatabaseAccessor. We called that GlorpDBX.
>>>>>>>
>>>>>>> Diogenes: don't worry. John is aware of GlorpDBX, what it is, how to
>>>>>>> install, etc. Check SqueakDBX mailing list. He even posted in OpenDBX
>>>>>>> mailing list ;)
>>>>>>>
>>>>>>> Now....regarding the Connection Pool, you have different things:
>>>>>>>
>>>>>>> - The package Alan told you about Seaside package. He was talking
>>>>>>> about the one that is in VW public store. To look at it, you should take a
>>>>>>> VW, go to store and look at it. And if you like it, I don't know how, export
>>>>>>> it and load in pharo.
>>>>>>> - There is a Seaside package in squeaksource, which is not the same,
>>>>>>> I think it has some kind of connection pool but I am not sure. Maybe Keithy
>>>>>>> did it.
>>>>>>> - There is a connection pool that Ramón León did some time ago. Check
>>>>>>> http://onsmalltalk.com/making-a-connection-pool-for-glorp-in-seaside
>>>>>>> - There is a connetion pool Esteban Lorenzano did directly for
>>>>>>> GlorpDBX
>>>>>>>
>>>>>>> Finally, if you plan to do a connection pool for GlorpDBX you have to
>>>>>>> possibilities:
>>>>>>> - be hardcoded to the SqueakDBX driver and use directly DBXConnection
>>>>>>> objects
>>>>>>> - not be hardcoded to SqueakDBX driver but use DatabaseDriver or
>>>>>>> DatabaseDriver >> connection instead. I am not sure if this is possible. But
>>>>>>> having a connection pool for Glorp, not hardcoding with the connection class
>>>>>>> would be cool.
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>> Mariano
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Mar 26, 2010 at 5:53 PM, John Toohey <johnptoohey at gmail.com>wrote:
>>>>>>>
>>>>>>>> Hang on, this is exactly what I load :-
>>>>>>>>
>>>>>>>> Gofer new
>>>>>>>> squeaksource: 'MetacelloRepository';
>>>>>>>>  package: 'ConfigurationOfGlorpDBX';
>>>>>>>>    load.
>>>>>>>> ((Smalltalk at: #ConfigurationOfGlorpDBX) project version: '1.0')
>>>>>>>> load.
>>>>>>>>
>>>>>>>> I need to get used to calling it GlorpDBX :-)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Mar 26, 2010 at 16:37, Diogenes Moreira <
>>>>>>>> diogenes.moreira at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Oki, please get the Glorp Package from Squeak DBX Project.. this
>>>>>>>>> package have change to adapt DBAccessor to SqueakDBX classes, an remove
>>>>>>>>> hiddens "IF" in the Squeak Glorp Version..
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Best Regards..
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Mar 26, 2010 at 5:34 PM, John Toohey <
>>>>>>>>> johnptoohey at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I'm using SqueakDBX on Pharo RC3.
>>>>>>>>>>
>>>>>>>>>> On Fri, Mar 26, 2010 at 16:32, Diogenes Moreira <
>>>>>>>>>> diogenes.moreira at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> from glorp or squeakdbx project....??
>>>>>>>>>>>
>>>>>>>>>>> take Care.
>>>>>>>>>>> The SqueakDBX version has a couple of refactorings and
>>>>>>>>>>> modifications to adapt to different platforms.
>>>>>>>>>>>
>>>>>>>>>>> the detail is on the web squeakdbx www.squeakdbx.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> an other question..? do you using pharo or squeak ???
>>>>>>>>>>>
>>>>>>>>>>> Best Regards..
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Mar 26, 2010 at 5:26 PM, John Toohey <
>>>>>>>>>>> johnptoohey at gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I took the one from squeaksource, latest update was Feb 22 2010.
>>>>>>>>>>>>  Where do I find the one you are looking at?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Mar 26, 2010 at 16:20, Alan Knight <knight at acm.org>wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>  I think you're looking at a different package than I am.
>>>>>>>>>>>>> Quite possibly it's the original work that Ramon did. I have no
>>>>>>>>>>>>> GSDescriptorSystem or GSPooledDatabaseAccessor. I suspect that might also be
>>>>>>>>>>>>> for an old version of Seaside.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> At 04:11 PM 2010-03-26, John Toohey wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I mean should my own Database class which is a sub-class of
>>>>>>>>>>>>> DescriptorSystem be changed to sub-class GSDescriptorSystem and then use
>>>>>>>>>>>>> GSPooledDatabaseAccessor instead of SqueakDatabaseAccessor?
>>>>>>>>>>>>>
>>>>>>>>>>>>> I don't see any specific VW code in here, so far anyhow.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I'll write this up and post it here, when I get it working.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Mar 26, 2010 at 16:03, Alan Knight <knight at acm.org>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>  I'm not sure what you mean by inheriting from these. Right
>>>>>>>>>>>>> now, this provides a VW-specific pooling accessor. You could make a
>>>>>>>>>>>>> SqueakDBX one, and it probably would be nice to try and abstract some of
>>>>>>>>>>>>> that stuff to reduce any code duplication. And documentation is good too.
>>>>>>>>>>>>> This is based on work that Ramon Leon did, back in 2007, I'm not sure if it
>>>>>>>>>>>>> was in Squeak or not.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> At 03:29 PM 2010-03-26, John Toohey wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> This looks great. Is the correct procedure to have all my class
>>>>>>>>>>>>> that inherit from Glorp, inherit from these instead? I'm using GlorpDBX. I
>>>>>>>>>>>>> had no idea this was available, so we should get it documented on the
>>>>>>>>>>>>> SqueakDBX site.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Mar 26, 2010 at 14:42, Alan Knight <knight at acm.org>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>  Take a look at the SeasideGlorp package.
>>>>>>>>>>>>>
>>>>>>>>>>>>> At 02:36 PM 2010-03-26, John Toohey wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I need to write a connection pool for Glorp and am thinking
>>>>>>>>>>>>> that the Database accessor is the place to do this. Is this correct, or has
>>>>>>>>>>>>> anyone any experience with this?
>>>>>>>>>>>>> -- -JT
>>>>>>>>>>>>>
>>>>>>>>>>>>> -- You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "glorp-group" group. To post to this group, send
>>>>>>>>>>>>> email to glorp-group at googlegroups.com. To unsubscribe from
>>>>>>>>>>>>> this group, send email to
>>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>.
>>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>>
>>>>>>>>>>>>> -- Alan Knight [|], Engineering Manager, Cincom Smalltalk
>>>>>>>>>>>>> knight at acm.org aknight at cincom.com
>>>>>>>>>>>>> http://www.cincom.com/smalltalk
>>>>>>>>>>>>> -- You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "glorp-group" group. To post to this group, send
>>>>>>>>>>>>> email to glorp-group at googlegroups.com. To unsubscribe from
>>>>>>>>>>>>> this group, send email to
>>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>.
>>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "glorp-group" group.
>>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>>> glorp-group at googlegroups.com.
>>>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>>>>> .
>>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Alan Knight [|], Engineering Manager, Cincom Smalltalk
>>>>>>>>>>>>> knight at acm.org
>>>>>>>>>>>>> aknight at cincom.com
>>>>>>>>>>>>>  http://www.cincom.com/smalltalk
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "glorp-group" group.
>>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>>> glorp-group at googlegroups.com.
>>>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>>>>> .
>>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "glorp-group" group.
>>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>>> glorp-group at googlegroups.com.
>>>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>>>>> .
>>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Alan Knight [|], Engineering Manager, Cincom Smalltalk
>>>>>>>>>>>>> knight at acm.org
>>>>>>>>>>>>> aknight at cincom.com
>>>>>>>>>>>>>  http://www.cincom.com/smalltalk
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "glorp-group" group.
>>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>>> glorp-group at googlegroups.com.
>>>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>>>>> .
>>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> -JT
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>  --
>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>> Google Groups "glorp-group" group.
>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>> glorp-group at googlegroups.com.
>>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>>>> .
>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  --
>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>> Google Groups "glorp-group" group.
>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>> glorp-group at googlegroups.com.
>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>>> .
>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> -JT
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  --
>>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>>> Groups "glorp-group" group.
>>>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com
>>>>>>>>>> .
>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>>> .
>>>>>>>>>> For more options, visit this group at
>>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "glorp-group" group.
>>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>>> .
>>>>>>>>> For more options, visit this group at
>>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> -JT
>>>>>>>>
>>>>>>>>
>>>>>>>>  --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "glorp-group" group.
>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "glorp-group" group.
>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>> .
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -JT
>>>>>>
>>>>>>
>>>>>>  --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "glorp-group" group.
>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>> .
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> SqueakDBX mailing list
>>>>> SqueakDBX at lists.squeakfoundation.org
>>>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> -JT
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> -JT
>>>
>>>
>>>
>>> _______________________________________________
>>> SqueakDBX mailing list
>>> SqueakDBX at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>
>>>
>>
>> _______________________________________________
>> SqueakDBX mailing list
>> SqueakDBX at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>
>>
>
>
> --
> -JT
>
>
>
> _______________________________________________
> SqueakDBX mailing list
> SqueakDBX at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20100329/23caa6a6/attachment.htm


More information about the SqueakDBX mailing list