Home

Awesome

JC

Erlang, Distributable, In-Memory Cache

Featuring: Pub/Sub, JSON-query, and mechanisms to support consistency without transactoins.

Build Status hex.pm version

Features

   {jc_bridge, Any_Cache_Node} ! {self(), {locus, Key}},
   NOR = receive
       {error, _} -> error
             Node -> Node
   after
       1000 -> error
   end,
   {jc_bridge, NOR} ! {self, {put, benchtest, 10203, "{\"Key\":\"Value\"}
Because data is everywhere, a lookup will always find a key irrespective of 
the node of responsibility. The way to best use this is to configure jc_sequence
to not be a singleton and then use the Node of Responsibility feature to chose
the node to do the inserts/deletes using the jc_s API.

Cache Functions (jc)

Consistency Support Functions (jc_s)

Identical to the Create and Evict family of functions of the jc module (see above), except:

Eviction Manager Functions (jc_eviction_manager)

Pub/Sub Functions (jc_psub)

Indexing Functions (jc_store)

Interoperability: Bridge (jc_bridge)

Configuration

Application Modules

Net Split/Join Strategy

Mnesia does not merge on its own when a node joins (returns) to a mesh of nodes. There are two situations where this is relevant:

To handle these situations, whenever a cluster is created by a Node (node@123.45.67, for example), it creates a ClusterId - its Node name (node@123.45.67), for that cluster.

Given this ClusterId, we have the following strategy:

  1. Cluster Creation: creates an initial ClusterId;
  2. Nodedown: If the Node that created the cluster dissapears, a surviving Node changes the ClusterId such that ClusterId is now this new Node's name. In the case of a disconnected newtwork, one of the islands will have the original ClusterId Node dissapear, and it will create a new one as described.
  3. Nodeup Whenever a Node appears, an arbitary Node ensures that any Nodes that report a different ClusterId (different than the arbitrary Node's ClusterId) are killed to be restarted by the hearbeat application. If any Nodes required restarting, the entire cache is flushed or not per policy in config.sys.

Build Instructions

Documentation

[root@dbo1] ./rebar3 edoc

Component and Sequence Diagrams

Components

Sequence Diagrams