[ZODB-Dev] asyncore vs Connection.sync()
Nicholas Henke
henken@seas.upenn.edu
Fri, 8 Nov 2002 14:24:10 -0500
Hey guys~
Here is the senario ( please feel free to tell me I am off my rocker),
I have a ZEO server, a 'resource_manager', and a 'scheduler'. Both the
resource_manager and the scheduler open up one connection to the ZEO
server for their lifetimes, aka a long running connection. The
resource_manager polls machines and updates their info into the ZEO db.
The scheduler polls periodically and dumps the current state to a file.
So what I usually see is that there are some oid's that change, and a
ConflictError is tossed to the scheduler. As it sits now, I need to
catch all of the conflict errors by hand and retry the function. I
remember someone saying that if the program used asyncore, the
invalidate messages would be handled, and I would not have to catch
conflict errors, connection.sync(), and try again.
1) Is this true, if not how much of it is true?
2) Can you show me an example of a _simple_ program that uses asyncore
and connects to a ZEO server?
Thanks a ton!
Nic
--
Nicholas Henke
Linux Cluster Systems Programmer
Liniac Project - Univ. of Pennsylvania