Git Product home page Git Product logo

cockroach-multiregion-demo's Introduction

Cockroach Multiregion Demo

An electron app to showcase various locality modes of CockroachDB.

Features

  • Two locality modes (GLOBAL and REGIONAL BY TABLE) with 3 possible regions table regions (us-east1, us-west1, europe-west1)
  • Simulate a client connecting in different regions
  • Continuously poll the database for a color value
  • Show off SELECT (from the polling) and UPDATE (changing colors) latency
  • Support follower reads

Setup

  1. Install CockroachDB
  2. Run the multi region demo
    cockroach demo --global --nodes 9 --no-example-database --insecure
  3. Edit src/connections.json to match your database connection info. To get the database info, you can visit CockroachDB Network Page to figure out which nodes correspond to a region and run \demo ls on the cockroach console to get the connection strings.
  4. Install project dependencies (only need to run once)
    yarn
  5. Run the electron app
    yarn start

Screenshots

Main Window

Main Window

Client Window

Client Window

Notes

CockroachDB demo mode

Cockroach has a demo mode that can simulate the latency of a multi region cluster.

Database setup

There are 4 separate tables with different locality modes. It is much faster to switch which table is being queried vs altering the locality of a table.

Technologies Used

cockroach-multiregion-demo's People

Contributors

adriel-m avatar dependabot[bot] avatar

Watchers

 avatar

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.