Skip to content
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.

Simple key-value store #78

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Simple key-value store #78

wants to merge 10 commits into from

Conversation

abailly
Copy link
Collaborator

@abailly abailly commented Jul 14, 2014

The purpose of barge-store is to make it easy to test barge with jepsen. By exposing a simple put/get interface we can implement a simple client that will be used by jepsen to check linearizability of barge.

Main program is now barge-store.jar (replacing barge-http.jar) which launches server in the background. Server can be stopped by POSTing empty string to URI /control/shutdown. Store is available under namespace /store and is dead simple:

  • Use PUT /store/my/key with arbitrary byte input to store data. This must be sent to current leader and waits for Raft protocol synchronisation before returning to client,
  • Use GET /store/my/key to retrieve stored data or a 404 error. Data is read from current state machine so reading from non-Leader might provide stale data.

Arnaud Bailly added 10 commits July 14, 2014 19:07
this should make it easier to inject custom resources, providers and binders into the context
in effect the RaftApplication acts as a container
* moved main application from barge-jax-rs to barge-store
* extracted Leaders class to encapsulate enquiring stabilization of the cluster
* moved script packagers (for demo purpose) to barge-store
when committing to raft instance, returned Future itself encapsulates a future. We need some flatMap here...
…iles

only way to stop server now is sending kill -TERM! Need to implement proper stop...
@mgodave
Copy link
Owner

mgodave commented Jul 14, 2014

Looks good. Since this is a new module I'm not going to nit-pick. Feel free to merge when you're ready or point out places you'd like me to take a harder look at.

@abailly
Copy link
Collaborator Author

abailly commented Jul 14, 2014

Well, on the contrary, given this is a new module, better nitpick when there are few lines of code! If there are things that looked suspicious or with which you are not at ease with, I would greatly appreciate your comments. Bear in mind however the overall idea is not to provide a full-fledged DB but merely a simple tool to exercise barge. But simple does not mean simplistic of course.

@mgodave
Copy link
Owner

mgodave commented Jul 14, 2014

OK, fair enough. I'll give it a more thorough look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants