exar-db

Crates.ioexar-db
lib.rsexar-db
version0.1.0
sourcesrc
created_at2016-08-01 13:06:59.819338
updated_at2016-08-01 13:06:59.819338
descriptionExar DB's event store with streaming support
homepage
repositoryhttps://github.com/bfil/exar-db/tree/master/exar-db
max_upload_size
id5859
size7,396
Bruno Filippone (bfil)

documentation

https://bfil.github.io/exar-db/exar_db/index.html

README

Exar DB

An event store with streaming support, it uses flat-file based collections.

Crates.io

Documentation

Installation

Install Cargo, then run:

cargo install exar-db

Starting the database

Simply run exar-db.

Configuring the database

The database can be configured using a TOML configuration file, example below:

log4rs_path = "/path/to/log4rs.toml"
[database]
logs_path = "~/exar-db/data"
scanners = { nr_of_scanners = 2, sleep_time_in_ms = 10 }
[database.collections.my-collection]
routing_strategy = "Random"
scanners = { nr_of_scanners = 4, sleep_time_in_ms = 5 }
[server]
host = "127.0.0.1"
port = 38580
username = "my-username"
password = "my-secret"

Then run Exar DB by specifying the config file location: exar-db --config=/path/to/config.toml.

For more information about the database and server configuration sections, check the documentation about DatabaseConfig and ServerConfig.

Logging

Logging can be configured using a log4rs config file in TOML format, example below:

[appenders.console]
kind = "console"

[appenders.console.encoder]
pattern = "[{d(%+)(local)}] [{h({l})}] [{t}] {m}{n}"

[appenders.file]
kind = "file"
path = "exar-db.log"

[appenders.file.encoder]
pattern = "[{d(%+)(local)}] [{h({l})}] [{t}] {m}{n}"

[root]
level = "info"
appenders = ["console", "file"]
Commit count: 0

cargo fmt