Documentation and tests
This commit is contained in:
parent
e2debf5f04
commit
d0fcdf4299
6 changed files with 59 additions and 15 deletions
|
|
@ -23,7 +23,8 @@ All command line flags take precedence over the configuration file.
|
|||
|
||||
* `mem`: An in-memory store, based on an initial N-Quads file. Loses all changes when the process exits.
|
||||
* `leveldb`: A persistent on-disk store backed by [LevelDB](http://code.google.com/p/leveldb/).
|
||||
* `mongodb`: Stores the graph data and indices in a [MongoDB](http://mongodb.org) instance. Slower, as it incurs network traffic, but multiple Cayley instances can disappear and reconnect at will, across a potentially horizontally-scaled store.
|
||||
* `bolt`: Stores the graph data on-disk in a [Bolt](http://github.com/boltdb/bolt) file. Uses more disk space and memory than LevelDB for smaller stores, but is often faster to write to and comparable for large ones, with faster average query times.
|
||||
* `mongo`: Stores the graph data and indices in a [MongoDB](http://mongodb.org) instance. Slower, as it incurs network traffic, but multiple Cayley instances can disappear and reconnect at will, across a potentially horizontally-scaled store.
|
||||
|
||||
#### **`db_path`**
|
||||
|
||||
|
|
@ -32,9 +33,10 @@ All command line flags take precedence over the configuration file.
|
|||
|
||||
Where does the database actually live? Dependent on the type of database. For each datastore:
|
||||
|
||||
* `mem`: Path to a triple file to automatically load
|
||||
* `leveldb`: Directory to hold the LevelDB database files
|
||||
* `mongodb`: "hostname:port" of the desired MongoDB server.
|
||||
* `mem`: Path to a triple file to automatically load.
|
||||
* `leveldb`: Directory to hold the LevelDB database files.
|
||||
* `bolt`: Path to the persistent single Bolt database file.
|
||||
* `mongo`: "hostname:port" of the desired MongoDB server.
|
||||
|
||||
#### **`listen_host`**
|
||||
|
||||
|
|
@ -103,8 +105,16 @@ The size in MiB of the LevelDB write cache. Increasing this number allows for mo
|
|||
|
||||
The size in MiB of the LevelDB block cache. Increasing this number uses more memory to maintain a bigger cache of triple blocks for better performance.
|
||||
|
||||
### Bolt
|
||||
|
||||
### MongoDB
|
||||
#### **`nosync`**
|
||||
|
||||
* Type: Boolean
|
||||
* Default: false
|
||||
|
||||
Optionally disable syncing to disk per transaction. Nosync being true means much faster load times, but without consistency guarantees.
|
||||
|
||||
### Mongo
|
||||
|
||||
|
||||
#### **`database_name`**
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ You can set up a full [configuration file](/docs/Configuration) if you'd prefer,
|
|||
Examples for each backend:
|
||||
|
||||
* `leveldb`: `./cayley init --db=leveldb --dbpath=/tmp/moviedb` -- where /tmp/moviedb is the path you'd like to store your data.
|
||||
* `mongodb`: `./cayley init --db=mongodb --dbpath="<HOSTNAME>:<PORT>"` -- where HOSTNAME and PORT point to your Mongo instance.
|
||||
* `bolt`: `./cayley init --db=bolt --dbpath=/tmp/moviedb` -- where /tmp/moviedb is the filename where you'd like to store your data.
|
||||
* `mongo`: `./cayley init --db=mongo --dbpath="<HOSTNAME>:<PORT>"` -- where HOSTNAME and PORT point to your Mongo instance.
|
||||
|
||||
Those two options (db and dbpath) are always going to be present. If you feel like not repeating yourself, setting up a configuration file for your backend might be something to do now. There's an example file, `cayley.cfg.example` in the root directory.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue