Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   More ZEO/ZODB issues (http://www.velocityreviews.com/forums/t319574-more-zeo-zodb-issues.html)

drs 07-12-2003 12:41 AM

More ZEO/ZODB issues
 
I don't seem to be getting any bites on the earlier post ...

so here is my problem in a nutshell. I started a ZEO server on one computer
(\\camus) using

C:\>python C:\Python22\Lib\site-packages\ZEO\start.py -p 9000 C:\db\tmp.fs

that is fine

on another computer I typed the following from a python prompt:
>>> from ZEO import ClientStorage
>>> from ZODB import DB
>>> addr = ('camus', 9000)
>>> storage = ClientStorage.ClientStorage(addr)
>>> db = DB(storage)
>>> conn = db.open()
>>> d = conn.root()


I went to a third computer and did the same.

from either of the clients, I can manipulate d by doing
>>> d[key] = value

but the other client can't see the change. I have also tried using
>>> get_transaction().begin()
>>> d['0'] = 0
>>> get_transaction().commit()


and
>>> storage.sync()


but the other client still does not see changes. If, however, the other
client does
>>> get_transaction().begin()
>>> d[key] = value
>>> get_transaction().commit()

it will throw an error, but d will contain the changes from the first
client.

Obviously I am not getting something. The only ZEO examples I can find use
BTrees which is not what I want. So, can someone show me how to use a ZEO
server as a simple dictionary?

Thanks,

-doug





All times are GMT. The time now is 01:02 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.