Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Exar DB

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

## Modules

The database is split into the following modules:

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"]

Interacting with the database from Rust

To interact with the database from a rust application use exar-client.

Basic connect/publish/subscribe examples are available at the exar-client section of the documentation.

Interacting with the database via TCP

To interact with the database a very simple TCP protocol can be used even via telnet.

telnet 127.0.0.1 38580

Once the TCP connection has been established, you can use the commands defined in the exar-net section of the documentation.

Exar UI

A simple user interface, built with Electron, useful to interact with the database is available here, but it currently needs to be run from source.

About

ExarDB - An event store with streaming support built with Rust

Resources

License

Packages

No packages published
You can’t perform that action at this time.