What about a separate process (a daemon, let's say) that runs in the
background? If both this process and the pylons process with it's
multiple threads read and write to the database, is explicit locking
required?

I am looking to have pylons control/monitor the work, but the work
will be done by the daemon. Pylons and the daemon would communicate
via the database. For example, at various intervals, the daemon will
wake up, look at certain records, decide what to do, do it, and update
the records. And pylons, via a user, will make changes to certain
records as well.

What I really need is periodic processing of the data, with control/
monitoring by a user via  pylons. And I am wondering about the locking/
deadlock implications....

Thanks!

On May 6, 8:07 pm, Michael Bayer <[email protected]> wrote:
> On May 6, 2009, at 6:43 PM, Jeremy Burton wrote:
>
>
>
> > Pylons works superbly out-of-the-box with SQLAlchemy if your web
> > application solely responds to HTTP requests.
>
> > However, it seems to me that most non-trivial web applications
> > (including mine) will inevitably need to have additional threads
> > performing other tasks, e.g. mail send/receive, that also need to
> > access the database.
>
> yes.
>
>
>
> > As soon as this happens, you run into the database locking issue.
>
> why is that ?   the paster application already runs many threads to
> serve many requests simultaneously - the transactional capabilities of
> the database handle that concurrency.    Additional "worker" threads
> need not be any different in their transactional behavior, and can
> still be good neighbors (i.e. no long running transactions, commit
> well-defined units of work).   Explicit locking is not implied by this
> use case.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to