About
Pod is the open-source backend for Memri project.
It's written in Rust and provides an HTTP interface for use by the clients.
Run in docker
To run Pod inside docker:
docker-compose build
docker-compose up
Local build/install
In order to build Pod locally, you need to install rust
and sqlcipher
:
- On MacOS:
brew install rust sqlcipher
- On Ubuntu:
apt-get install rust libsqlcipher-dev
- On ArchLinux:
pacman -S --needed rust sqlcipher
- Submit pull requests for your other OS :)
After this, you can build Pod with:
cargo build --release
Or install it with:
cargo install --force
Development
During development, you might want to have faster build turn-around.
Use this to incrementally compile the project (after installing cargo-watch):
cargo watch
To build (debug version):
cargo build
Run:
RUST_LOG=pod=debug,info cargo run
You can read about various components of the server:
- Memri project: blog.memri.io
- SQLite: sqlite.org
- Rusqlite database driver: github.com/rusqlite/rusqlite
- Warp HTTP engine: github.com/seanmonstar/warp
- Rust language: rust-lang.org
Database
Pod uses SQLite database as its storage mechanism.
When running Pod, a file named pod.db
will be created. You can use sqlite3 pod.db
to browse the database locally. For example, .schema
will display the current database schema.
Note that the current version of Pod DOES NOT use encryption. This part will be changed, and a manual import will be needed in the future.