An experiment to provide ETCD layer on top of FoundationDB, built with Record-Layer and Vert.x.
- etcd protobuf was imported and exposed with Vert.x,
- Record-layer is used. As etcd is also using protobuf, we are directly storing the KeyValue message,
- Integrations test using a real FDB spawned with testcontainers and official Java etcd client,
- Tests are backported from jetcd test cases
- Supported operations:
- put,
- get,
- scan,
- delete,
- compact,
- leases,
- watches,
- ETCD MVCC simulated using FDB's read version
- multi-tenancy (soon back by the AuthService)
For TODO's, please have a look to the Github issues.
- JDK 11 or more
- Docker (for testing)
- gradle 6.2.2
- FoundationDB Client Packages
To launch your tests:
./gradlew clean test
To package your application:
./gradlew clean assemble
To run your application:
./gradlew clean run
# 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:[email protected]:4500" > fdb.cluster
# retrieve latest version
wget https://github.com/PierreZ/fdb-etcd/releases/download/v0.0.1/fdb-etcd-v0.0.1-SNAPSHOT-fat.jar
# retrieve config file example, don't forget to edit it if necessary
wget https://raw.githubusercontent.com/PierreZ/fdb-etcd/master/config.json
# run fat jar
java -jar fdb-etcd-v0.0.1-SNAPSHOT-fat.jar -conf ./config.json
Pull requests are very welcome. I will try to keep as Github issues what needs to be done if you want to jump in!
For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.