Crates.io | exar-db |
lib.rs | exar-db |
version | 0.1.0 |
source | src |
created_at | 2016-08-01 13:06:59.819338 |
updated_at | 2016-08-01 13:06:59.819338 |
description | Exar DB's event store with streaming support |
homepage | |
repository | https://github.com/bfil/exar-db/tree/master/exar-db |
max_upload_size | |
id | 5859 |
size | 7,396 |
An event store with streaming support, it uses flat-file based collections.
Install Cargo
, then run:
cargo install exar-db
Simply run exar-db
.
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 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"]