Create a Zookeeper backed state repository#162
Conversation
…t due to single threadedness
|
Here are the various state repository benchmarks - I made an abstract base JMH class that will take a configured state repository and test the performance of pulling out state from the repo - one case for something where the state was not actually set in the state repository to measure that case. These tests are measuring the steady-state where the state is being actively changed - which is the most common case for something like feature togglz that tend to get changed infrequently. The Zookeeper state repository performance is better than the property based performance. It isn't as good as the performance of the straight in-memory state repository - but it's pretty close. It should be capable of gracefully handling connection problems with the zookeeper cluster. A change on one of the apps running with this state repository and the same path in the same zookeeper cluster should propagate almost instantly to the other instances using this state repository. |
|
Hey guys! That's VERY impressive! Great work I must be honest. I'm not familiar with Zookeeper, so reviewing the code is difficult for me. But it looks like you spent quite some time on working on this. And there is good test coverage, which is very important and the performance is awesome. So I'll merge this into master now. Thank you so much for this contribution! |
We have built a Zookeeper backed state repository. We store the FeatureState (minus Feature value) as JSON in the a ZNode that is named for the feature. If the feature state is changed in Zookeeper, the state repository will see that change automatically and update its internal cache of values.
We have also provided a few more benchmark tests around this state repository and the others that already existed.
@ryangardner can step in to post benchmark results