{"id":13629853,"url":"https://github.com/eBay/Gringofts","last_synced_at":"2025-04-17T13:30:34.879Z","repository":{"id":40693881,"uuid":"247857064","full_name":"eBay/Gringofts","owner":"eBay","description":"Gringofts makes it easy to build a replicated, fault-tolerant, high throughput and distributed event-sourced system.","archived":false,"fork":false,"pushed_at":"2024-03-21T02:43:46.000Z","size":8883,"stargazers_count":100,"open_issues_count":9,"forks_count":27,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-14T13:06:50.469Z","etag":null,"topics":["cpp","distributed","event-sourcing","fault-tolerance","raft-consensus"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eBay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-17T02:01:55.000Z","updated_at":"2024-05-28T17:05:22.234Z","dependencies_parsed_at":"2023-12-13T10:42:04.265Z","dependency_job_id":"3dfca769-1ed3-4e04-8682-ff751ccd2dc0","html_url":"https://github.com/eBay/Gringofts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FGringofts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FGringofts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FGringofts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FGringofts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eBay","download_url":"https://codeload.github.com/eBay/Gringofts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223757035,"owners_count":17197487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","distributed","event-sourcing","fault-tolerance","raft-consensus"],"created_at":"2024-08-01T22:01:21.708Z","updated_at":"2024-11-08T21:30:17.907Z","avatar_url":"https://github.com/eBay.png","language":"C++","readme":"![CI](https://github.com/eBay/Gringofts/workflows/CI/badge.svg)\n[![codecov](https://codecov.io/gh/eBay/Gringofts/branch/master/graph/badge.svg)](https://codecov.io/gh/eBay/Gringofts)\n\n# Table of Contents\n- [Introduction](#introduction)\n- [Features](#features)\n- [Get Started](#get-started)\n- [Core Developers](#core-developers)\n- [License Information](#license-information)\n- [Use of 3rd Party Code](#use-of-3rd-party-code)\n\n# Introduction\n\nGringofts makes it easy to build a replicated, fault-tolerant, high throughput and distributed event-sourced system. \nThis type of system can process and store critical transaction data which is valuable for an entity.\n\nIndustries and typical applications that can benefit from Gringofts (but not limited to):\n- Finance - Payment processing system\n- Government - Civic Engagement system\n- Healthcare - Electronic medical records (EMR) software\n- Retail - Orders and sales management system\n- Transport - Logistics and order management system\n- ...\n\n# Features\n\n## Dependable Data\n1. Data is highly available\u003cbr/\u003e\nGringofts enables data to be stored in multiple replicas across data centers. \nDifferent deployment models are supported to achieve various levels of availability. \nFor example, in a typical 2-2-1 setup (two replicas in each of the first two data centers and one replica in the third) \ndata is still available even if two data centers are down.\n\n1. Data is bit-level accurate across all replicas\u003cbr/\u003e\nWhichever replica you access, you get the exact same data. \nThis is a top requirement for some applications such as a payment processing system, \nwhere each transaction must be accurately recorded.\n\n1. Data is secure and tamper-proof\u003cbr/\u003e\nIndustry-tested and accepted standards are used to encrypt the data \nand a blockchain-like technology is applied to avoid data being changed.\n\n## High Throughput\nInternal experiments show that a single cluster with a 2-1 setup (three replicas across two data centers) can process 8,000 transactions per second. \nSince the framework is designed to be linear-scalable, throughput can be increased with the increase of clusters. Below is a test result of a 667-cluster setup. \n\n![Benchmark](images/benchmark.png)\n\n## Full Audit-ability\nThis is another must-have feature in most critical enterprise systems. \nEvery write operation to a Gringofts-powered application is persisted by default and is immutable. \nA comprehensive toolset is also available to access this type of information.\n\n## Easy to Use\nGringofts users are usually domain experts. They only need to focus on two things which they are very good at and Gringofts will take care of the rest:\n1. Domain model\u003cbr/\u003e\nThis defines objects required to solve the target business problem. For example, in an Order Management system, Order is a domain object.\n2. Domain object interaction\u003c/br\u003e\nThis defines how domain objects interact with each other. \nThe interaction is usually modeled as two special objects called Command and Event, \nfor example PlaceOrderCommand and OrderPlacedEvent.\n\n## 100% State Reproducibility\nApplication state at any point of time in history is reproducible. \nThis feature is especially useful when an application recovers after a crash or if users want to debug an issue.\n\n# Get Started\n\n## Supported Platforms\nCurrently the only recommended platform is Ubuntu 16.04. We plan to support more platforms in the near future.\n\n## Set up Source Dependencies\n```bash\nbash ./scripts/addSubmodules.sh\n```\n\n## Build\n### Build via Docker (Recommended)\nThis approach requires minimum dependencies on the target OS as all of the dependencies are encapsulated in a docker image.\n1. Build docker image for compiling the project (one-time setup)\n   ```bash\n   sudo docker build --rm -t gringofts/dependencies:v1 -f dockers/dependencies/download.Dockerfile .\n   sudo docker build --rm -t gringofts/compile:v1 -f dockers/dependencies/install.Dockerfile .\n   ```\n1. Build binaries\n   ```bash\n   sudo docker run --workdir \"$(pwd)\" --mount type=bind,source=\"$(pwd)\",target=\"$(pwd)\" --user \"$(id -u)\":\"$(id -g)\" gringofts/compile:v1 hooks/pre-commit\n   ```\n\n### Build directly on local OS\n1. Install external dependencies (one-time setup)\n   ```bash\n   sudo bash ./scripts/setupDevEnvironment.sh\n   if ! grep 'export PATH=/usr/local/go/bin:$PATH' ~/.profile; then echo 'export PATH=/usr/local/go/bin:$PATH' \u003e\u003e ~/.profile; fi \u0026\u0026 \\\n   source ~/.profile\n   ```\n1. Build binaries\n   ```bash\n   hooks/pre-commit-build\n   ```\n\n## Run Demo App\n1. Backed by a single-cluster setup\n   ```bash\n   examples/run_demo_backed_by_single_cluster.sh\n   ```\n   You can use [grpc_cli](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md#list-services) to verify:\n   ```bash\n   ./grpc_cli call 0.0.0.0:50055 ringofts.demo.protos.DemoService.Execute \"value:1\"\n   ```\n   Sample output:\n   ```bash\n   connecting to 0.0.0.0:50055\n   code: 200\n   message: \"Success\"\n\n   Rpc succeeded with OK status\n   ```\n3. Backed by a three-nodes-cluster setup\n   ```bash\n   examples/run_demo_backed_by_three_nodes_cluster.sh\n   ```\n4. Backed by SQLite3\n   ```bash\n   examples/run_demo_backed_by_sqlite.sh\n   ```\n\n## Development Environment Setup\nPlease refer to this [doc](docs/C++%20Development%20Environment.pdf) for details.\n\n# Core Developers\n- Bin (Glen) Geng \u003cbigeng@ebay.com\u003e\n- Qi (Jacky) Jia \u003cjqi1@ebay.com\u003e\n\nPlease see [here](CONTRIBUTORS.md) for all contributors.\n\n# Acknowledgements\nSpecial thanks to [people](ACKNOWLEDGEMENTS.md) who give your support on this project.\n\n# License Information\nCopyright 2019-2020 eBay Inc.\n\nAuthors/Developers: Bin (Glen) Geng, Qi (Jacky) Jia\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n# Use of 3rd Party Code\nSome parts of this software include 3rd party code licensed under open source licenses (in alphabetic order):\n\n1. OpenSSL\u003cbr/\u003e\n   URL: https://www.openssl.org/\u003cbr/\u003e\n   License: https://www.openssl.org/source/license.html\u003cbr/\u003e\n   Originally licensed under the Apache 2.0 license.\n\n1. RocksDB\u003cbr/\u003e\n   URL: https://github.com/facebook/rocksdb\u003cbr/\u003e\n   License: https://github.com/facebook/rocksdb/blob/master/LICENSE.Apache\u003cbr/\u003e\n   Apache 2.0 license selected.\n\n1. SQLite\u003cbr/\u003e\n   https://www.sqlite.org/index.html\u003cbr/\u003e\n   License: https://www.sqlite.org/copyright.html\u003cbr/\u003e\n   SQLite Is Public Domain\n\n1. abseil-cpp\u003cbr/\u003e\n   URL: https://github.com/abseil/abseil-cpp\u003cbr/\u003e\n   License: https://github.com/abseil/abseil-cpp/blob/master/LICENSE\u003cbr/\u003e\n   Originally licensed under the Apache 2.0 license.\n\n1. cpplint\u003cbr/\u003e\n   URL: https://github.com/google/styleguide\u003cbr/\u003e\n   License: https://github.com/google/styleguide/blob/gh-pages/LICENSE\u003cbr/\u003e\n   Originally licensed under the Apache 2.0 license.\n\n1. inih\u003cbr/\u003e\n   URL: https://github.com/benhoyt/inih\u003cbr/\u003e\n   License: https://github.com/benhoyt/inih/blob/master/LICENSE.txt\n   Originally licensed under the New BSD license.\n\n1. gRPC\u003cbr/\u003e\n   URL: https://github.com/grpc/grpc\u003cbr/\u003e\n   License: https://github.com/grpc/grpc/blob/master/LICENSE\u003cbr/\u003e\n   Originally licensed under the Apache 2.0 license.\n\n1. googletest\u003cbr/\u003e\n   URL: https://github.com/google/googletest\u003cbr/\u003e\n   License: https://github.com/google/googletest/blob/master/LICENSE\u003cbr/\u003e\n   Originally licensed under the BSD 3-Clause \"New\" or \"Revised\" license.\n\n1. prometheus-cpp\u003cbr/\u003e\n   URL: https://github.com/jupp0r/prometheus-cpp\u003cbr/\u003e\n   License: https://github.com/jupp0r/prometheus-cpp/blob/master/LICENSE\n   Originally licensed under the MIT license.\n\n1. spdlog\u003cbr/\u003e\n   URL: https://github.com/gabime/spdlog\u003cbr/\u003e\n   License: https://github.com/gabime/spdlog/blob/master/LICENSE\u003cbr/\u003e\n   Originally licensed under the MIT license.\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeBay%2FGringofts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FeBay%2FGringofts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeBay%2FGringofts/lists"}