README 1.47 KB
Newer Older
Yoshinori Okuji's avatar
Yoshinori Okuji committed
1
This is the second prototype of NEO. The design is described in:
Yoshinori Okuji's avatar
Yoshinori Okuji committed
2

Yoshinori Okuji's avatar
Yoshinori Okuji committed
3
    http://www.nexedi.org/workspaces/neo
Yoshinori Okuji's avatar
Yoshinori Okuji committed
4

Yoshinori Okuji's avatar
Yoshinori Okuji committed
5 6 7 8 9
TODO

    - Handling connection timeouts.

    - Handling write timeouts.
Yoshinori Okuji's avatar
Yoshinori Okuji committed
10 11 12 13

    - IdleEvent for a certain message type as well as a message ID

    - Flushing write buffers only without reading packets
14 15 16 17 18

    - Garbage collection of unused nodes

    - Stopping packet processing by returning a boolean value from
      a handler, otherwise too tricky to exchange a handler with another
19 20

    - Replication.
Aurel's avatar
Aurel committed
21

22 23 24 25 26 27 28 29 30 31
Requirements

    - Python 2.4 or later

    - ctypes http://python.net/crew/theller/ctypes/

    - MySQLdb http://sourceforge.net/projects/mysql-python

    - Zope 2.8 or later

Aurel's avatar
Aurel committed
32 33 34 35 36 37 38 39 40 41 42 43 44
Installation

1. In zope:

   a. Copy neo directory to /path/to/your/zope/lib/python

   b. Edit your zope.conf,  remove the `zodb_zb` section that refers to
      FileStorage, and replace it with :

      %import neo
      <zodb_db main>
          # Main FileStorage database
          <NEOStorage>
45 46
                master_nodes 127.0.0.1:10010 127.0.0.1:10011
                name main
Aurel's avatar
Aurel committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
          </NEOStorage>
          mount-point /
      </zodb_db>

   c. Start zope

2. In a python script:

   a. Set your PYTHONPATH in order to be able to import Zope lib:

     $ export PYTHONPATH=/path/to/your/zope/lib/python:$PYTHONPATH

   b. Just create the storage object and play with it:

   from neo.client.NEOStorare import NEOStorage
   s = NEOStorage(master_addr="127.0.0.1", master_port=10010, name="main")
63
   ...