GithubHelp home page GithubHelp logo

ashwin153 / beaker Goto Github PK

View Code? Open in Web Editor NEW
64.0 7.0 1.0 2.37 MB

A distributed, transactional key-value store.

Home Page: https://madavan.me/projects/beaker.html

License: Apache License 2.0

Python 3.94% Scala 87.11% Shell 8.95%
beaker distributed-database transactions

beaker's Introduction

Logo

Build Status Maven Central Docker

Beaker is a distributed, transactional key-value store. Beaker is N/2 fault tolerant but assumes that failures are fail-stop and that messages are received in order. Beaker is strongly consistent; conflicting transactions are linearized. Beaker features monotonic reads, read-your-write consistency, and tunable availability and partition tolerance.

Structure

# Database
beaker/                             https://github.com/ashwin153/beaker
+---beaker-assets/                  Documentation, results, and graphics.
+---beaker-benchmark/               Performance tests.
+---beaker-client/                  Client library.
+---beaker-common/                  Tools.
+---beaker-server/                  Database server.
+---build-support/                  Pants plugins and configuration.

Requirements

  • Java 1.8
  • Python 2.7 (build-only)
  • Scala 2.12

beaker's People

Contributors

ashwin153 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jjayadeep06

beaker's Issues

Partial Scan

Allow ranges of keys to be specified to the scan method to the Client that allows for ranges of keys to be scanned. Right now we may only scan the entire key-space.

Tunable Consistency

Use Ballot instead of version in Revisions. In a consistent system, they are equivalent. However, if we use Ballots instead of versions we could tune the consistency of the system as well. This would allow different partitions to simultaneously commit conflicting transactions and repair them when they reconnect, because each partition will write different versions of the key.

Benchmarking

Performance testing is lacking. Integrate with YCSB, TCP-C/E, etc.

Consensus Memory Footprint

Right now the Paxos state for a transactions cannot be cleared until a newer, conflicting transaction is proposed. For example, an accepted transaction will continue to be stored in memory until another conflicting transaction is accepted. Over time, the memory footprint of the program could become massive.

At this point in time, I'm not sure of an elegant solution to this problem. One solution might be to introduce timeouts, after which the Paxos state for a transaction is automatically cleared. However, synchronizing timeouts across the cluster is a consensus problem in and of itself.

Rust Rewrite

Rust's performance is on par with C, and its expressiveness and elegance are on par with Scala. Unfortunately, it doesn't look like Pants supports Rust yet (even though its engine is written in Rust?!). However, there are Bazel rules for both Scala and Rust. Switching to Bazel shouldn't be too challenging, and might even improve build times.

Clear Linux Support

Benchmarks and features make it sound promising for our workloads. AWS runs exclusively on Intel hardware, so we'll be able to make use of the CPU-specific optimizations in Clear Linux. We'll need to verify that Pants supports Clear Linux.

Cap'n Proto

GRPC is over HTTP/2, while Cap'n Proto is over TCP. This should significantly improve network performance.

Logging

Right now there is no visibility into server instances. Only way to debug is to add print statements and run in a REPL.

Multithreading Race Condition

Beakers are vulnerable to race conditions because they use default collections. Therefore, concurrent requests on a beaker can lead to indeterminate behavior. Instead, use the equivalent concurrent collections to store state.

Performance

  • Lower consensus backoff duration to slightly more than the 99% latency.
  • Fail-fast if a proposal conflicts with a proposal on the same beaker.
  • SortedMap to ConcurrentSkipListMap.
  • Network and memory optimized EC2 instances.
  • Increase JVM heap size to reduce GC pressure.
  • EC2 Placement Groups to reduce latency.
  • Do not perform consensus if there is only one beaker in the cluster.
  • Allow prepare and learn to occur simultaneously.
  • Executor look for latest conflicting transaction from right-to-left, not left-to-right.
  • Return if a majority accept the proposal; don't wait for the proposal to be learned.

Tail Recursive Consensus

Consensus is already tail recursive; however, the Scala compiler isn't smart enough to know it. If we replace the various flatMap calls with match expressions, the Scala compiler will recognize the function as tail-call optimizable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.