Code Monkey home page Code Monkey logo

mem3's Introduction

mem3

Mem3 is the node membership application for clustered CouchDB. It is used in BigCouch and tracks two very important things for the cluster:

  1. member nodes
  2. node/shards mappings for each database

Both the nodes and shards are tracked in node-local couch databases. Shards are heavily used, so an ETS cache is also maintained for low-latency lookups. The nodes and shards are synchronized via continuous CouchDB replication, which serves as 'gossip' in Dynamo parlance. The shards ETS cache is kept in sync based on membership and database event listeners.

A very important point to make here is that BigCouch does not necessarily divide up each database into equal shards across the nodes of a cluster. For instance, in a 20-node cluster, you may have the need to create a small database with very few documents. For efficiency reasons, you may create your database with Q=4 and keep the default of N=3. This means you only have 12 shards total, so 8 nodes will hold none of the data for this database. Given this feature, we even shard use out across the cluster by altering the 'start' node for the database's shards.

Splitting and merging shards is an immature feature of the system, and will require attention in the near-term. We believe we can implement both functions and perform them while the database remains online.

Getting Started

Mem3 requires R13B03 or higher and can be built with rebar, which comes bundled in the repository. Rebar needs to be able to find the couch_db.hrl header file; one way to accomplish this is to set ERL_LIBS to point to the apps subdirectory of a bigcouch checkout, e.g.

ERL_LIBS="/usr/local/src/bigcouch/apps" ./rebar compile

License

Apache 2.0

Contact

mem3's People

Contributors

kocolosk avatar davisp avatar chewbranca avatar b20n avatar jaydoane avatar theburge avatar rnewson avatar boorad avatar iilyak avatar mikewallace1979 avatar sagelywizard avatar nickva avatar

Stargazers

 avatar Leonardo Rossi avatar hamlet avatar Angus H. avatar David.Gao avatar Love is the one thing that transcends time and space. avatar Martin Steinmann avatar Volodymyr Kyrylov avatar  avatar Bruce Xin avatar Jay Cheng avatar Huang Huang avatar Sunny Gleason avatar Anton Andonov avatar Gus Becciu avatar  avatar Benoit Chesneau avatar Mathias Meyer avatar

Watchers

 avatar  avatar edwardt avatar Mike Miller avatar  avatar Eric Avdey avatar Will Holley avatar Alan Hoffman avatar  avatar Sunny Gleason avatar Garren avatar Mike Holzinger avatar Henning Diedrich avatar PÁLI Gábor János avatar Martin Steinmann avatar Dan DeMichele avatar  avatar George Lewis avatar Mike Elsmore avatar Cleto Martín avatar James Cloos avatar David Tyler avatar Sean Hudgston avatar Andy Ellicott avatar Joshua McBride avatar Kyle Snavely avatar Rhys Short avatar Derek Schoettle avatar Paul Szczypka avatar Harmanas Chopra avatar Anthony Abdulla avatar Chris Glew avatar Stefan Kruger avatar  avatar Yang Lei avatar Kevin Wolf avatar John Harrison avatar  avatar Dan Cheeseman avatar chinajuanbob avatar David Taieb avatar Eric Appelt avatar Jake Epstein avatar Srdjan Jendruh avatar Michael Breslin avatar  avatar Emil Czajka avatar Ryan Millay avatar Aaron Nelson avatar Asim Singh avatar Tony Sun avatar Riccardo Brognara avatar Christopher J Quinones avatar Justin Campbell avatar  avatar Dwight Ford avatar Sean Conway avatar Kent Kjaer avatar Robert Mckenzie avatar Wayne Deleo avatar Joe Cavanaugh avatar Aruna Kolluru avatar Vincent Ong avatar Vincent Kelly avatar Bessenyei Balázs Donát avatar Marc Suesser avatar Becky Wright avatar  avatar  avatar nierui avatar Esteban Laver avatar Rohit Agarwal avatar Andrew-Rombach avatar Paul Tinagbedia avatar  avatar Todd Shulman avatar Ben Perlmutter avatar TS avatar Darek Czapinski avatar Brian Wilkins avatar  avatar Yali Wang avatar Scott Davidson avatar Lakshmi Palaniappan avatar Jozef de Vries avatar David J Schlegel avatar Dr Doug Cowie avatar  avatar  avatar Yusuf Khan avatar liujjcdl avatar Keerthi Sukumaran avatar Paul Nightingale avatar  avatar SEF MUTARI avatar Sajish Rama krishnan avatar Graham Thackrah avatar Mercy Ilade avatar coughlan@uk.ibm.com avatar Ram Maganti 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.