Name Last Update
neo Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
BUGS Loading commit data...
CHANGES Loading commit data...
COPYING Loading commit data... Loading commit data...
README Loading commit data...
TESTS.txt Loading commit data...
TODO Loading commit data...
UPGRADE Loading commit data...
ZODB3.patch Loading commit data...
importer.conf Loading commit data...
neo.conf Loading commit data...
neoadmin Loading commit data...
neoctl Loading commit data...
neolog Loading commit data...
neomaster Loading commit data...
neomigrate Loading commit data...
neostorage Loading commit data... Loading commit data...
NEO is a distributed, redundant and scalable implementation of ZODB API.
NEO stands for Nexedi Enterprise Object.


A NEO cluster is composed of the following types of nodes:

- "master" nodes (mandatory, 1 or more)

  Takes care of transactionality. Only one master node is really active
  (the active master node is called "primary master") at any given time,
  extra masters are spares (they are called "secondary masters").

- "storage" nodes (mandatory, 1 or more)

  Stores data, preserving history. All available storage nodes are in use
  simultaneously. This offers redundancy and data distribution.
  Available backends: MySQL, SQLite

- "admin" nodes (mandatory for startup, optional after)

  Accepts commands from neoctl tool and transmits them to the
  primary master, and monitors cluster state.

- "client" nodes

  Well... Something needing to store/load data in a NEO cluster.

ZODB API is fully implemented except:

- pack: only old revisions of objects are removed for the moment
        (full implementation is considered)
- blobs: not implemented (not considered yet)

Any ZODB like FileStorage can be converted to NEO instanteously,
which means the database is operational before all data are imported.
There's also a tool to convert back to FileStorage.

See also for more detailed information about
features related to scalability.


In addition of the disclaimer contained in the licence this code is
released under, please consider the following.

NEO does not implement any authentication mechanism between its nodes, and
does not encrypt data exchanged between nodes either.
If you want to protect your cluster from malicious nodes, or your data from
being snooped, please consider encrypted tunelling (such as openvpn).


- Linux 2.6 or later

- Python 2.7.x

- For storage nodes using MySQL backend:

  - MySQLdb:

- For client nodes: ZODB 3.10.x


a. NEO can be installed like any other egg (see Or you can simply
   make `neo` directory available for Python to import (for example, by
   adding its container directory to the PYTHONPATH environment variable).

b. Write a neo.conf file like the example provided. If you use MySQL,
   you'll also need create 1 database per storage node.

c. Start all required nodes::

    $ neomaster -f neo.conf
    $ neostorage -f neo.conf -s storage1
    $ neostorage -f neo.conf -s storage2
    $ neoadmin -f neo.conf

d. Tell the cluster to initialize storage nodes::

    $ neoctl -a <admin> start

e. Clients can connect when the cluster is in RUNNING state::

    $ neoctl -a <admin> print cluster

f. See `importer.conf` file to import an existing database,
   or `neoctl` command for more administrative tasks.

Alternatively, you can use `neosimple` command to quickly setup a cluster for

How to use

First make sure Python can import 'neo.client' package.

In zope

a. Edit your zope.conf, add a neo import and edit the `zodb_db` section by
   replacing its filestorage subsection by a NEOStorage one.
   It should look like::

    %import neo.client
    <zodb_db main>
            name <cluster name>
        mount-point /

b. Start zope

In a Python script

Just create the storage object and play with it::

  from neo.client.Storage import Storage
  s = Storage(master_nodes="", name="main")

"name" and "master_nodes" parameters have the same meaning as in
configuration file.

Shutting down

Before shutting down NEO, all clients like Zope instances should be stopped,
so that cluster become idle. This is required for multi-DB setups, to prevent
critical failures in second phase of TPC.

A cluster (i.e. masters+storages+admin) can be stopped gracefully by putting it
in STOPPING state using neoctl::

  neoctl -a <admin> set cluster STOPPING

This can also be done manually, which helps if your cluster is in bad state:

- Stop all master nodes first with a SIGINT or SIGTERM, so that storage nodes
   don't become in OUT_OF_DATE state.
- Next stop remaining nodes with a SIGINT or SIGTERM.

Master-slave asynchronous replication

This is the recommanded way to backup a NEO cluster.
Once a cluster with appropriate `upstream_cluster` & `upstream_masters`
configuration is started, you can switch it into backup mode

  neoctl -a <admin> set cluster STARTING_BACKUP

It remembers it is in such mode when it is stopped, and it can be put back into
normal mode (RUNNING)  by setting it into STOPPING_BACKUP state.

Packs are currently not replicated, which means packing should always be done
up to a TID that is already fully replicated, so that the backup cluster has a
full history (and not random holes).


NEO has no built-in deployment features such as process daemonization. We use
`supervisor <>`_ with configuration like below::


  command=neostorage -s storage_01 -f /neo/neo.conf

  command=neomaster -s master_01 -f /neo/neo.conf

  command=neoadmin -s admin -f /neo/neo.conf


Developers interested in NEO may refer to
`NEO Web site <>`_ and subscribe to following mailing

- `neo-users <>`_:
  users discussion
- `neo-dev <>`_:
  developers discussion
- `neo-report <>`_:
  automated test results (read-only list)

Commercial Support

Nexedi provides commercial support for NEO: