More ZEO/ZODB issues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • drs

    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\st art.py -p 9000 C:\db\tmp.fs

    that is fine

    on another computer I typed the following from a python prompt:[color=blue][color=green][color=darkred]
    >>> from ZEO import ClientStorage
    >>> from ZODB import DB
    >>> addr = ('camus', 9000)
    >>> storage = ClientStorage.C lientStorage(ad dr)
    >>> db = DB(storage)
    >>> conn = db.open()
    >>> d = conn.root()[/color][/color][/color]

    I went to a third computer and did the same.

    from either of the clients, I can manipulate d by doing[color=blue][color=green][color=darkred]
    >>> d[key] = value[/color][/color][/color]
    but the other client can't see the change. I have also tried using[color=blue][color=green][color=darkred]
    >>> get_transaction ().begin()
    >>> d['0'] = 0
    >>> get_transaction ().commit()[/color][/color][/color]

    and[color=blue][color=green][color=darkred]
    >>> storage.sync()[/color][/color][/color]

    but the other client still does not see changes. If, however, the other
    client does[color=blue][color=green][color=darkred]
    >>> get_transaction ().begin()
    >>> d[key] = value
    >>> get_transaction ().commit()[/color][/color][/color]
    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



Working...