SQLite on multiple images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLite on multiple images

HilaireFernandes
Hi,

I have a question regarding the use of the same SQLite DB from several
Pharo images (all running in the same host, but likely on different cores).

Is it safe in this scenario? I mean does lock on write operation
correctly work?

Thanks

Hilaire

--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: SQLite on multiple images

HilaireFernandes
I guess as long as the images are executed by a VM linked to the same
SQLite library, the SQLite lock mechanism will work. I will test that.

Le 16/06/2016 12:19, Hilaire a écrit :

> Hi,
>
> I have a question regarding the use of the same SQLite DB from several
> Pharo images (all running in the same host, but likely on different cores).
>
> Is it safe in this scenario? I mean does lock on write operation
> correctly work?
>
> Thanks
>
> Hilaire

--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: SQLite on multiple images

stepharo
In reply to this post by HilaireFernandes
Hi hilaire


I do not know if this is the anwser. Now I wanted to let you know that
Olivier developed a session pool for database connexion.


Stef


Le 16/6/16 à 12:19, Hilaire a écrit :

> Hi,
>
> I have a question regarding the use of the same SQLite DB from several
> Pharo images (all running in the same host, but likely on different cores).
>
> Is it safe in this scenario? I mean does lock on write operation
> correctly work?
>
> Thanks
>
> Hilaire
>


Reply | Threaded
Open this post in threaded view
|

Re: SQLite on multiple images

alistairgrant
In reply to this post by HilaireFernandes
On Sun, Jun 19, 2016 at 10:09:29AM +0200, Hilaire wrote:

> I guess as long as the images are executed by a VM linked to the same
> SQLite library, the SQLite lock mechanism will work. I will test that.
>
> Le 16/06/2016 12:19, Hilaire a écrit :
> > Hi,
> >
> > I have a question regarding the use of the same SQLite DB from several
> > Pharo images (all running in the same host, but likely on different cores).
> >
> > Is it safe in this scenario? I mean does lock on write operation
> > correctly work?

I don't think it even has to be the same library.  My understanding is
that sqlite relies on file locking for write access, so as long as the
file system is locking the file correctly, the db lock will work.

HTH,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: SQLite on multiple images

HilaireFernandes
In reply to this post by stepharo
Hi,

What is it exactly? A pool of pre-open connections to a database, to
save the connection time and make an application more responsive when
doing data operations?

Thanks for the update.

Hilaire


Le 19/06/2016 10:24, stepharo a écrit :
> Hi hilaire
>
>
> I do not know if this is the anwser. Now I wanted to let you know that
> Olivier developed a session pool for database connexion.
>
>
> Stef

--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: SQLite on multiple images

HilaireFernandes
In reply to this post by alistairgrant
Ah neat, make sense indeed.

Thanks for the update.

Hilaire

Le 19/06/2016 10:36, Alistair Grant a écrit :
> I don't think it even has to be the same library.  My understanding is
> that sqlite relies on file locking for write access, so as long as the
> file system is locking the file correctly, the db lock will work.
>
> HTH,
> Alistair
>
>

--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: SQLite on multiple images

stepharo
In reply to this post by HilaireFernandes
If i understand it correctly, you reuse your connexion instead of always
releasing and requesting new ones from the os

Stef


> What is it exactly? A pool of pre-open connections to a database, to
> save the connection time and make an application more responsive when
> doing data operations?
>
> Thanks for the update.
>
> Hilaire
>
>
> Le 19/06/2016 10:24, stepharo a écrit :
>> Hi hilaire
>>
>>
>> I do not know if this is the anwser. Now I wanted to let you know that
>> Olivier developed a session pool for database connexion.
>>
>>
>> Stef