chronicledb-cloud

Distributed deployment of ChronicleDB, a high-throughput event store, using the Raft consensus algorithm, implemented with Spring Boot and Apache Ratis.

https://github.com/christian-konrad/chronicledb-cloud

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Distributed deployment of ChronicleDB, a high-throughput event store, using the Raft consensus algorithm, implemented with Spring Boot and Apache Ratis.

Basic Info
  • Host: GitHub
  • Owner: christian-konrad
  • Language: JavaScript
  • Default Branch: master
  • Homepage:
  • Size: 19.2 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 3
Created over 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme Citation

README.md

ChronicleDB on a Raft

DOI

Build

mvn clean mvn frontend:yarn mvn frontend:webpack mnv package

Compile protos after change

mvn clean mnv package

Package may fail as generated java classes change after protos are compiled, but they should be indexed by the IDE regardless.

Configuration

Either via the application.properties or run arguments.

Cluster Startup

```shell PEERS=n1:localhost:6000,n2:localhost:6001,n3:localhost:6002 ID=n0 HTTPPORT=8080 METAPORT=6000 REPLICATION_PORT=6050

./mvnw spring-boot:run -Dspring-boot.run.arguments="\ --node-id={ID} \ --server.address=localhost \ --server.port={HTTPPORT} \ --metadata-port={METAPORT} \ --replication-port={REPLICATION_PORT} \ --storage=/tmp/raft-demo/{ID} \ --peers={PEERS}" ```

Example

shell ./mvnw spring-boot:run -Dspring-boot.run.arguments="\ --node-id=n1 \ --server.address=localhost \ --server.port=8080 \ --metadata-port=6000 \ --replication-port=6050 \ --storage=/tmp/raft-demo/n1 \ --peers=n0:localhost:6000,n1:localhost:6001,n2:localhost:6002"

From JAR

shell java -jar target/raft-log-replication-demo-0.0.1-SNAPSHOT.jar \ --node-id={ID} \ --server.address=localhost \ --server.port={HTTP_PORT} \ --metadata-port={META_PORT} \ --replication-port={REPLICATION_PORT} \ --storage=/tmp/raft-demo/{ID} \ --peers={PEERS}"

Example Cluster

```shell PEERS=n1:localhost:6000,n2:localhost:6001,n3:localhost:6002

ID=n1 java -jar target/raft-log-replication-demo-0.0.1-SNAPSHOT.jar \ --node-id=${ID} \ --server.address=localhost \ --server.port=8080 \ --metadata-port=6000 \ --replication-port=6050 \ --storage=/tmp/raft-demo/${ID} \ --peers=${PEERS}

ID=n2 java -jar target/raft-log-replication-demo-0.0.1-SNAPSHOT.jar \ --node-id=${ID} \ --server.address=localhost \ --server.port=8081 \ --metadata-port=6001 \ --replication-port=6051 \ --storage=/tmp/raft-demo/${ID} \ --peers=${PEERS}

ID=n3 java -jar target/raft-log-replication-demo-0.0.1-SNAPSHOT.jar \ --node-id=${ID} \ --server.address=localhost \ --server.port=8082 \ --metadata-port=6002 \ --replication-port=6052 \ --storage=/tmp/raft-demo/${ID} \ --peers=${PEERS} ```

Docker

See the docker-compose as well as the Dockerfile.

Provisioning a partition

In general, a new partition of any state machine (any that implements the StateMachine interface) can be instantiated using the REST API:

```sh POST http://localhost:8080/api/cluster-manager/partitions Content-Type: application/json

{ "stateMachineClassName": "de.umr.raft.raftlogreplicationdemo.replication.impl.statemachines.EventStoreStateMachine", "partitionName": "events", "replicationFactor": 3 } ```

For event stores, there is a convenience method to instantiate a new stream on its own partition:

```sh POST http://localhost:8080/api/event-store/streams Content-Type: application/json

{ "streamName": "demo-event-store", "schema": [ { "name": "SYMBOL", "type": "STRING", "properties": {} }, { "name": "SECURITYTYPE", "type": "INTEGER", "properties": {} }, { "name": "LASTTRADEPRICE", "type": "FLOAT", "properties": {} } ] } ```

Note that the schema is currently ignored, since it is hardcoded. The implementation of the dynamic schema invocation is currently pending.

Roadmap

Make a library out of the Apache Ratis on-top abstractions

One sub-goal is to create a standalone, high-level abstraction of Apache Ratis to enable developers to build high available applications with strong consistent replication in record time.

Test coverage

There is currently little to no test coverage. We want everything to be tested.

Owner

  • Name: Christian Konrad
  • Login: christian-konrad
  • Kind: user
  • Location: Frankfurt, Germany
  • Company: @camunda

Product manager and software engineer living near Frankfurt am Main, Germany. My specialization is generalization.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: ChronicleDB on a Raft
message: 'If you use this software, please cite it as below.'
doi: 10.5281/zenodo.6991168
type: software
authors:
  - given-names: Christian
    family-names: Konrad
    email: konradch@mathematik.uni-marburg.de
    orcid: 'https://orcid.org/0000-0002-2387-9412'
repository-code: >-
  https://github.com/christian-konrad/chronicledb-cloud
abstract: >-
  Distributed deployment of ChronicleDB, a
  high-throughput event store, using the Raft
  consensus algorithm, implemented with Spring Boot
  and Apache Ratis.

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 3
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • christian-konrad (3)
Pull Request Authors
  • christian-konrad (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

Dockerfile docker
  • amazoncorretto 11 build
docker-compose-debug.yml docker
  • raft-log-replication-demo latest
docker-compose.yml docker
  • raft-log-replication-demo latest
pom.xml maven
  • de.umr.chronicledb:chronicledb-event 0.2.0-prealpha
  • de.umr.event:event-data-model 0.1.0-prealpha
  • de.umr.lambda:lambda-jepc-ql 0.2.0-prealpha
  • de.umr.lambda:lambda-ql 0.2.0-prealpha
  • io.dropwizard.metrics:metrics-core 3.2.2
  • org.apache.commons:commons-collections4 4.4
  • org.apache.ratis:ratis-client 2.1.0
  • org.apache.ratis:ratis-common 2.1.0
  • org.apache.ratis:ratis-grpc 2.1.0
  • org.apache.ratis:ratis-server 2.1.0
  • org.projectlombok:lombok
  • org.springframework.boot:spring-boot-starter-web
  • org.thymeleaf:thymeleaf 3.0.11.RELEASE
  • org.thymeleaf:thymeleaf-spring5 3.0.11.RELEASE
  • org.springframework.boot:spring-boot-starter-test test
package.json npm
  • @babel/core ^7.15.0 development
  • @babel/plugin-proposal-decorators ^7.14.5 development
  • @babel/preset-env ^7.15.0 development
  • @babel/preset-react ^7.14.5 development
  • @carbon/icons-react ^10.37.0 development
  • babel-loader ^8.2.2 development
  • webpack ^5.49.0 development
  • webpack-cli ^4.7.2 development
  • @carbon/icons-react ^10.37.0
  • @fontsource/ibm-plex-sans ^4.5.1
  • @material-ui/core ^4.12.3
  • @material-ui/icons ^4.11.2
  • @material-ui/lab ^4.0.0-alpha.60
  • @popperjs/core ^2.9.3
  • @testing-library/jest-dom ^5.11.4
  • @testing-library/react ^11.1.0
  • @testing-library/user-event ^12.1.10
  • bootstrap ^5.1.0
  • carbon-components ^10.41.0
  • carbon-components-react ^7.41.0
  • carbon-icons ^7.0.7
  • core-js ^3.16.0
  • css-loader ^6.2.0
  • inflection ^1.13.1
  • less ^4.1.1
  • less-loader ^10.0.1
  • normalize.css ^8.0.1
  • notistack latest-mui-v4
  • plotly.js ^2.6.2
  • react ^17.0.2
  • react-cookie ^4.0.3
  • react-dom ^17.0.2
  • react-json-view ^1.21.3
  • react-plotly.js ^2.5.1
  • react-router-dom ^5.2.0
  • react-scripts 4.0.3
  • reactstrap ^8.9.0
  • regenerator-runtime ^0.13.9
  • rest ^2.0.0
  • sass-loader ^12.1.0
  • style-loader ^3.2.1
  • web-vitals ^1.0.1
yarn.lock npm
  • 1899 dependencies