/record-store

A light, multi-model, user-defined place for your data.

Primary LanguageJavaApache License 2.0Apache-2.0

record-store status record-store java-client testcontainers-foundationdb

Logo

A light, multi-model, user-defined place for your data.

Features

  • Light We created the notion of RecordSpace, which can be viewed as a Collection. Start a RecordSpace for any kind of data than you need to manage. With it, you can imagine start some RecordSpaces for each integrations tests. Or per environment. The choice is yours.

  • Multi-tenant A tenant can create as many RecordSpace as we want, and we can have many tenants.

  • Standard API We are exposing the record-store with standard technologies:

  • Scalable We are based on the same tech behind CloudKit called the Record Layer. CloudKit uses the Record Layer to host billions of independent databases. The name of this project itself is a tribute to the Record Layer as we are exposing the layer within a gRPC interface.

  • Transactional We are running on top of FoundationDB. FoundationDB gives you the power of ACID transactions in a distributed database.

  • Encrypted Data are encrypted by default.

  • Multi-model For each RecordSpace, you can define a schema, which is in-fact only a Protobuf definition. You need to store some users, or a more complicated structure? If you can represent it as Protobuf, you are good to go!

  • Index-defined queries Your queries's capabilities are defined by the indexes you put on your schema.

Test it

# deploy your fdb cluster, or use docker
docker run -d --name fdb -p 4500:4500 foundationdb/foundationdb:6.2.19

# init fdb
docker exec fdb fdbcli --exec "configure new single memory"

# wait until it is ready
docker exec fdb fdbcli --exec "status"

# generate cluster file
echo "docker:docker@127.0.0.1:4500" > fdb.cluster

# retrieve latest version
wget https://github.com/PierreZ/record-store/releases/download/v0.0.1/record-store-v0.0.1-SNAPSHOT-fat.jar

# retrieve config file example, don't forget to edit it if necessary
wget https://raw.githubusercontent.com/PierreZ/record-store/master/config.json

# run fat jar
java -jar record-store-v0.0.1-SNAPSHOT-fat.jar -conf ./config.json

Building the Record-Layer

Requirements

Configure IntelliJ

Please enable annotation processing and obtain them from project classpath.

Gradle cheat-sheet

To launch your tests:

./gradlew :record-store:test

To package your application:

./gradlew :record-store:assemble

To run your application:

./gradlew :record-store:run