Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread ducasse
Amazing experience! This is the power of Pharo at work. Thanks a lot Sven. S > On 10 Feb 2020, at 21:24, Petter Egesund wrote: > > Perfect, this is exactly what I needed. Thank so much!! > > Petter > > On Mon, Feb 10, 2020 at 8:44 PM Sven Van Caekenberghe > wrote: > Hi P

Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread Petter Egesund
Perfect, this is exactly what I needed. Thank so much!! Petter On Mon, Feb 10, 2020 at 8:44 PM Sven Van Caekenberghe wrote: > Hi Petter, > > > On 10 Feb 2020, at 16:46, Petter Egesund > wrote: > > > > Yes, I see - that sounds sensible. > > > > Could it be an idea to subclass the pool-class and

Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread Sven Van Caekenberghe
Hi Petter, > On 10 Feb 2020, at 16:46, Petter Egesund wrote: > > Yes, I see - that sounds sensible. > > Could it be an idea to subclass the pool-class and to prepare statements in > this method, if there is a kind of init-method in the class? What do you > think? That would have indeed been

Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread Petter Egesund
Yes, I see - that sounds sensible. Could it be an idea to subclass the pool-class and to prepare statements in this method, if there is a kind of init-method in the class? What do you think? Petter On Mon, Feb 10, 2020 at 4:36 PM Sven Van Caekenberghe wrote: > > > > On 10 Feb 2020, at 16:30, P

Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread Sven Van Caekenberghe
> On 10 Feb 2020, at 16:30, Petter Egesund wrote: > > Hi and thanks for an answer above my expectations to our problem. > > This is really awesome, I was just about to start coding a pool myself, but > getting it directly from the author of the base library is off course way > better :) >

Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread Petter Egesund
Hi and thanks for an answer above my expectations to our problem. This is really awesome, I was just about to start coding a pool myself, but getting it directly from the author of the base library is off course way better :) I will try out and get back as soon as we have tested. One quick quest

Re: [Pharo-users] P3 and concurrenty

2020-02-10 Thread Sven Van Caekenberghe
Hi Petter, https://github.com/svenvc/P3/commit/a6b409d0d92cb92bf9b44452908bb9033523b863 adds a connection pool. Here is the class comment: == I am P3ConnectionPool. I offer a pool of shared PSQL connections (P3Client instances) as a resource. After configuring me with at least a url, you

Re: [Pharo-users] P3 and concurrenty

2020-02-09 Thread Petter Egesund
Yes, thanks for good feedback. I will try the pooled way, I think - not primarily because of speed, but due to that our library is built around prepared connections. Petter On Sun, Feb 9, 2020 at 6:01 PM Sven Van Caekenberghe wrote: > Hi Petter, > > > On 9 Feb 2020, at 17:27, Petter Egesund >

Re: [Pharo-users] P3 and concurrenty

2020-02-09 Thread Sven Van Caekenberghe
Hi Petter, > On 9 Feb 2020, at 17:27, Petter Egesund wrote: > > Hi Sven and thanks for answering! > > I use Teapot with one common sql-connecton, not one for each user session. At > startup I create several sql statements and these does not seem to be usable > from different Teapot request at

Re: [Pharo-users] P3 and concurrenty

2020-02-09 Thread Petter Egesund
Hi Sven and thanks for answering! I use Teapot with one common sql-connecton, not one for each user session. At startup I create several sql statements and these does not seem to be usable from different Teapot request at the same time. I could create one connection pr. session and then close the

Re: [Pharo-users] P3 and concurrenty

2020-02-09 Thread Sven Van Caekenberghe
Hi Petter, [ CC-ing the Pharo Users list ] P3Client is not built/designed to be used by multiple processes concurrently. Each database connection is represented by an instance of P3Client and holds some state both at the client as well as at the server side. Typically, in a multi user server a