[Zope3-dev] Atomic reads w ZEO and ZODB

2005-08-31 Thread David Huttleston Jr
I'm exploring moving our job queue system into z3.  But, I'm running
into a conceptual problem.

As I envision it, I'd have three zope zeo clients working to get the job
done.  One is the queue manager taking submissions and reporting on the
status of current jobs.  Another is a queue worker which walks the job
through it's workflow.  These jobs are usually reports which take from 1
to 120 seconds to build and 50k to 500k in size.  The third process is a
job delivery service which takes the completed report and delivers it
via smtp or via http using a page template.  A squid proxy server hides
the fact that the job manager and job delivery component are served from
different processes (ie different ports).

Here's my question:

I know how the zodb prevents inconsistent writes using ConflictErrors.
But, I'm fuzzy on how the zodb prevents inconsistent reads.  The reason
I'm concerned is the job objects are polled by the queue manager on
behalf of the client's browser (using a AJAX style javascript function).
During this time a queue worker will be changing the object according to
the workflow.  Can ZEO and ZODB handle this kind of reading in an atomic
fashion?  Also, consistent reads would be key for more than one worker
to cooperate on a job.

Thanks, in advance, for educating me,

David Huttleston Jr
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Atomic reads w ZEO and ZODB

2005-08-31 Thread Gary Poster


On Aug 31, 2005, at 12:07 PM, David Huttleston Jr wrote:
...

But, I'm fuzzy on how the zodb prevents inconsistent reads.

...

Hi David.  A quick answer is that the ZODB implements optimistic  
multi-version concurrency control, similar to the default PostgreSQL  
behavior.  This link describes the proposal, which is pretty close to  
the way it turned out, as far as I know.


http://www.zope.org/Wikis/ZODB/MultiVersionConcurrencyControl

Gary
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com