This repository has been archived by the owner on Jan 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Simple key-value store #78
Open
abailly
wants to merge
10
commits into
mgodave:master
Choose a base branch
from
foldlabs:kv-store
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basic PUT interface
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...
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. |
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. |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
(replacingbarge-http.jar
) which launches server in the background. Server can be stopped byPOST
ing empty string to URI/control/shutdown
. Store is available under namespace/store
and is dead simple: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,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.