Skip to content

WIP: Elixir distributed database with optimistic locking and data synchronization

License

Notifications You must be signed in to change notification settings

micartey/elixir-distributed-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eddb

eddb is a distributed (unstructured) database

Functions

get

get will retrive the data from all neighbors and check which update is the newest. After finding the newest change, the data will be shared.

Note

This has no affect on the data on the current node. If you want the data to be merged, call the sync function

get_local

get_local will only retrive data from the current node. Thus, this operation is significantly faster.

put

put will store the data on the current node. Data with the same key in the same topic will be overwritten, but the old data will be kept in the history.

put (With optimistic locking)

put with optimistic locking is similar to the normal put operation. However, you can specify the expected current state and only if the expection matches with the data on the node, the new data will be stored.

Note

In some cases you want the data to be expected on all nodes, this can currently only be somewhat archived by calling the sync function before

sync

sync will merge the data from all neighbors. The data with the newest timestamp is considered the current state.

About

WIP: Elixir distributed database with optimistic locking and data synchronization

Topics

Resources

License

Stars

Watchers

Forks