On Sun, Feb 8, 2009 at 6:51 AM, sol <
s...@sr-research.com> wrote:
>
> I setup a separate thread in my cherrypy + sqlite app that only
> handles the DB actions. I have a python Queue (thread safe) that
> passes messages from cherrypy threads to the db thread and another for
> the other direction.
>
> For low activity sites I think this works fine (does for me) but the
> serialization that the Queue use results in would likely / definitely
> start falling apart for high activity sites.
>
> On Feb 7, 7:15 pm, daniels <
daniels0...@gmail.com> wrote:
>> Thank you for the quick answer.
>>
>> On Feb 8, 1:31 am, "Robert Brewer" <
fuman...@aminus.org> wrote:
>>
>> > daniels wrote:
>> > > I'm working on an app that will gather data through http from several
>> > > places, cache the data locally and then serve it through http.
>> > > So I was looking at the following. My app will first create several
>> > > threads that will gather data at a specified interval and cache that
>> > > data locally into a sqlite database.
>> > > Then in the main thread start a CherryPy app that will query that
>> > > sqlite db and serve the data.
>>
>> > > My problem is how do i handle connections to sqlite db from my threads
>> > > and from the cherrypy app?
>> > > If I'd do a connection per thread to db will I also be able to create/
>> > > use in memory db?
>>
use an external process for writing. In my case I only have on