Skip to content

A very simple lbm_kv sample service providing distributed sequence numbers.

Notifications You must be signed in to change notification settings

lindenbaum/sequencer_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sequencer_sample

A very simple lbm_kv sample service providing distributed sequence numbers. To build it use

rebar3 do clean, compile, release

Now you have a release which can be started using the start.sh script. The script will start a node and drop you on the console of the running node.

The application comes with a simple process that periodically queries the next available sequence number and logs in using error_logger. Ideally, you'll now start a few nodes on different shells and look at the logged output.

The bootstrap project is used to automatically discover and connect the different nodes (may take up to 10s). The current (bootstrap) configuration allows up to three nodes to be started on one host simultaneously. If you use multiple machines there's no limitation.

What you should see is that lbm_kv distributes the sequence number among the different nodes as soon as they connect. When a new node starts it's initial sequence number is 0, so you will see duplicates on these nodes. These will disappear, when the nodes get connected. Feel free to kill/restart random nodes.

About

A very simple lbm_kv sample service providing distributed sequence numbers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published