Exocore
Warning: Exocore is at a very early development stage, hence incomplete, unstable and probably totally unsafe. Use at your own risk.
Exocore is a distributed applications framework with private and encrypted data storage. It can be used as a computing and storage backend for web and mobile applications, and is extensible via WebAssembly. It is designed to be resilient to failures, allow offline usage (ex: on mobile). Exocore exposes SDKs for web/WebAssembly, Mobile (Android/iOS) and Rust.
The primary concept in Exocore is a Cell, which is a unique container for a user's applications and data.
A cell consists of:
- Data nodes managing replication and storage by using a blockchain data structure.
- Index nodes managing indexation, querying and mutation of the data (collocated with data node).
- Applications nodes run applications written in WebAssembly (that can be collocated with index nodes)
- Clients (fat or thin) that can also act as index, data and partially run applications' WebAssembly.
Development status
- Data storage and replication layer: Proof of concept
- Transport layer: Proof of concept
- Index layer: Proof of concept
- SDKs: In development
- Security: In development
- Applications layer: Not yet started
- Cell management layer: Not yet started
- Nodes discovery: Not yet started
- Blob storage (IPFS): Not yet started
Dependencies
General
-
Build dependencies
- On MacOS: Install Xcode and command lines tools
- On Ubuntu:
apt install build-essential pkg-config libssl-dev
-
- Install using rustup
- Clippy and Rustfmt:
rustup component add clippy rustfmt
-
- On MacOS:
brew install capnp
- On Ubuntu:
apt install capnproto
- On MacOS:
-
- On MacOS:
brew install protobuf
- On Ubuntu:
snap install protobuf
- On MacOS:
WASM (optional)
Android (optional)
iOS (optional)
Usage & configuration
-
CLI:
- Using Cargo:
cargo run --package exo -- <cli option>
- Using the latest Docker image:
docker run --rm -it -v "$PWD:/volume" docker.pkg.github.com/appaquet/exocore/cli <cli options>
- Using Cargo:
-
Configuration
- Most command requires a
config.yaml
file, for which an example can be found in here: [./examples/config.yaml
] - At minimum, the config requires 2 keypair: one for the node, one for the cell.
- The node keypair is unique per server/node, while the cell keypair is shared among servers that host the cell.
- Most command requires a
Quick start
Create a Cell hosted on 2 nodes
cp ./examples/config.yaml node1.yaml
cp ./examples/config.yaml node2.yaml
- For each node's config:
- Generate keypair for the node:
./utils/cli.sh keys generate
- Change the
node_keypair
andnode_public_key
config with this keypair. - Change
listen_addresses
with unique port per node. - Change
data_dir
with unique data directory per node. - Put the other node
public_key
andaddresses
in thecells/nodes
section.
- Generate keypair for the node:
- Generate keypair for the cell:
./utils/cli.sh keys generate
- Add this keypair in both
node1.yaml
andnode2.yaml
in thecells
section. - Initialize chain one first node:
./utils/cli.sh cell --config node1.yaml --public_key <cell_public_key> create_genesis_block
- Start both nodes:
- Node 1:
./utils/cli.sh server --config ./node1.yaml start
- Node 2:
./utils/cli.sh server --config ./node2.yaml start
- Node 1:
Launch sample web project
-
Run the web example:
- Start development server which will watch files and rebuild automatically:
cd ./examples/web && npm install && npm run start
- Open browser to http://127.0.0.1:8080
- Start development server which will watch files and rebuild automatically:
-
Or build manually:
cd ./clients/wasm && wasm-pack build
- This will create a NPM module at ./clients/wasm/pkg