Skip to content

Commit 89ea184

Browse files
committed
Updated READMEs
1 parent f422fcb commit 89ea184

File tree

6 files changed

+126
-64
lines changed

6 files changed

+126
-64
lines changed

README.md

+90-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,90 @@
1-
# exar-db
2-
ExarDB - An event store with basic streaming support built with Rust
1+
# Exar DB
2+
3+
An event store with streaming support, it uses flat-file based collections.
4+
5+
## Modules
6+
7+
The database is split into the following modules:
8+
9+
- [exar-core](https://github.com/bfil/exar-db/tree/master/exar-core): the core engine of Exar DB
10+
- [exar-net](https://github.com/bfil/exar-db/tree/master/exar-net): a TCP protocol for Exar DB
11+
- [exar-server](https://github.com/bfil/exar-db/tree/master/exar-server): a TCP server built on top of `exar-net`
12+
- [exar-client](https://github.com/bfil/exar-db/tree/master/exar-client): a TCP client built on top of `exar-net`
13+
- [exar-db](https://github.com/bfil/exar-db/tree/master/exar-db): the main executable of Exar DB
14+
15+
## Installation
16+
17+
Install [`Cargo`](https://crates.io/install), then run:
18+
19+
```
20+
cargo install exar-db
21+
```
22+
23+
## Starting the database
24+
25+
Simply run `exar-db`.
26+
27+
## Configuring the database
28+
29+
The database can be configured using a `TOML` configuration file, example below:
30+
31+
```toml
32+
log4rs_path = "/path/to/log4rs.toml"
33+
[database]
34+
logs_path = "~/exar-db/data"
35+
scanners = { nr_of_scanners = 2, sleep_time_in_ms = 10 }
36+
[database.collections.my-collection]
37+
routing_strategy = "Random"
38+
scanners = { nr_of_scanners = 4, sleep_time_in_ms = 5 }
39+
[server]
40+
host = "127.0.0.1"
41+
port = 38580
42+
username = "my-username"
43+
password = "my-secret"
44+
```
45+
46+
Then run Exar DB by specifying the config file location: `exar-db --config=/path/to/config.toml`.
47+
48+
For more information about the `database` and `server` configuration sections,
49+
check the documentation about
50+
[DatabaseConfig](https://bfil.github.io/exar-db/exar/struct.DatabaseConfig.html) and
51+
[ServerConfig](https://bfil.github.io/exar-db/exar_server/struct.ServerConfig.html).
52+
53+
## Logging
54+
55+
Logging can be configured using a [log4rs](https://github.com/sfackler/log4rs) config file in `TOML` format, example below:
56+
57+
```toml
58+
[appenders.console]
59+
kind = "console"
60+
61+
[appenders.console.encoder]
62+
pattern = "[{d(%+)(local)}] [{h({l})}] [{t}] {m}{n}"
63+
64+
[appenders.file]
65+
kind = "file"
66+
path = "exar-db.log"
67+
68+
[appenders.file.encoder]
69+
pattern = "[{d(%+)(local)}] [{h({l})}] [{t}] {m}{n}"
70+
71+
[root]
72+
level = "info"
73+
appenders = ["console", "file"]
74+
```
75+
76+
## Interacting with the database via TCP
77+
78+
To interact with the database a very simple TCP protocol can be used even via `telnet`.
79+
80+
```
81+
telnet 127.0.0.1 38580
82+
```
83+
84+
Once the TCP connection has been established, you can use the commands defined in the
85+
[exar-net](https://bfil.github.io/exar-db/exar_net/index.html)
86+
section of the documentation
87+
88+
## Exar UI
89+
90+
A simple user interface, built with Electron, useful to interact with the database is available [here](https://github.com/bfil/exar-db/tree/master/exar-ui), but it currently needs to be run from source.

exar-client/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Exar DB's Client
2+
3+
A client implementation that uses Exar DB's TCP protocol.
4+
5+
[![Crates.io](https://img.shields.io/crates/v/exar-client.svg)](https://crates.io/crates/exar-client)
6+
7+
[Documentation](https://bfil.github.io/exar-db/exar_client/index.html)

exar-core/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Exar DB's Core
2+
3+
An event store with streaming support, it uses flat-file based collections.
4+
5+
[![Crates.io](https://img.shields.io/crates/v/exar.svg)](https://crates.io/crates/exar)
6+
7+
[Documentation](https://bfil.github.io/exar-db/exar/index.html)

exar-net/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Exar DB's TCP protocol
2+
3+
Defines the TCP protocol used by Exar DB.
4+
5+
[![Crates.io](https://img.shields.io/crates/v/exar-net.svg)](https://crates.io/crates/exar-net)
6+
7+
[Documentation](https://bfil.github.io/exar-db/exar_net/index.html)

exar-server/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Exar DB's Server
2+
3+
A server implementation that uses Exar DB's TCP protocol.
4+
5+
[![Crates.io](https://img.shields.io/crates/v/exar-server.svg)](https://crates.io/crates/exar-server)
6+
7+
[Documentation](https://bfil.github.io/exar-db/exar_server/index.html)

exar-ui/README.md

+8-62
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Exar UI
22

3-
Exar UI
3+
A basic Exar DB's user interface, built with [Aurelia](http://aurelia.io), [Electron](http://electron.atom.io) and [TypeScript](https://www.typescriptlang.org)
44

55
## Running The App
66

@@ -36,25 +36,12 @@ To run the app, follow these steps.
3636
gulp build
3737
```
3838

39-
7. To run the app, execute the following command:
40-
41-
```shell
42-
gulp watch
43-
```
44-
8. Browse to [http://localhost:9000](http://localhost:9000) to see the app. You can make changes in the code found under `src` and the browser should auto-refresh itself as you save files.
45-
46-
> The Skeleton App uses [BrowserSync](http://www.browsersync.io/) for automated page refreshes on code/markup changes concurrently accross multiple browsers. If you prefer to disable the mirroring feature set the [ghostMode option](http://www.browsersync.io/docs/options/#option-ghostMode) to false.
47-
48-
## Running The App under Electron
49-
50-
To run the app under [Electron](http://electron.atom.io), follow these steps.
51-
52-
1. Install [Electron](http://electron.atom.io)
39+
7. Install [Electron](http://electron.atom.io)
5340

5441
```shell
5542
npm install electron-prebuilt -g
5643
```
57-
2. To start the app, execute the following command:
44+
8. To start the app, execute the following command:
5845

5946
```shell
6047
electron index.js
@@ -70,25 +57,19 @@ To start the app, execute the following command:
7057
electron .
7158
```
7259

73-
## Bundling
60+
## Development
7461

75-
Bundling is performed by [Aurelia Bundler](http://github.com/aurelia/bundler). A gulp task is already configured for that. Use the following command to bundle the app:
62+
1. Run the app in watch mode, execute the following command:
7663

7764
```shell
78-
gulp bundle
65+
gulp watch
7966
```
8067

81-
You can also unbundle using the command bellow:
68+
2. Then start the app in electron in a separate terminal, execute the following command:
8269

8370
```shell
84-
gulp unbundle
71+
electron index.js
8572
```
86-
#### Configuration
87-
88-
The configuration is done by ```bundles.json``` file.
89-
90-
##### Optional
91-
Under ```options``` of ```dist/aurelia``` add ```rev: true``` to add bundle file revision/version.
9273

9374
## Running The Unit Tests
9475

@@ -111,38 +92,3 @@ jspm install aurelia-router
11192
```shell
11293
karma start
11394
```
114-
115-
## Running The E2E Tests
116-
Integration tests are performed with [Protractor](http://angular.github.io/protractor/#/).
117-
118-
1. Place your E2E-Tests into the folder ```test/e2e/src```
119-
2. Install the necessary webdriver
120-
121-
```shell
122-
gulp webdriver-update
123-
```
124-
125-
3. Configure the path to the webdriver by opening the file ```protractor.conf.js``` and adjusting the ```seleniumServerJar``` property. Typically its only needed to adjust the version number.
126-
127-
4. Make sure your app runs and is accessible
128-
129-
```shell
130-
gulp watch
131-
```
132-
133-
5. In another console run the E2E-Tests
134-
135-
```shell
136-
gulp e2e
137-
```
138-
139-
## Exporting bundled production version
140-
A gulp task is already configured for that. Use the following command to export the app:
141-
142-
```shell
143-
gulp export
144-
```
145-
The app will be exported into ```export``` directory preserving the directory structure.
146-
#### Configuration
147-
The configuration is done by ```bundles.json``` file.
148-
In addition, ```export.json``` file is available for including individual files.

0 commit comments

Comments
 (0)