In the spirit of the Replicated-Map (RATIS-51), I tried my hand at making a simple StateMachine that could give some basic List-like functionality.

Client/test: https://github.com/joshelser/incubator-ratis/blob/rlist/ratis-replicated-list/src/test/java/org/apache/ratis/rlist/RListTest.java

StateMachine: https://github.com/joshelser/incubator-ratis/blob/rlist/ratis-replicated-list/src/main/java/org/apache/ratis/rlist/RListStateMachine.java

Is something like this useful for new developers in the core codebase? I was pretty much copy-pasting stuff from other examples (arithmetic, filestore, rmap), so I am worried that I might contribute to "death by example" :)

Let me know what you think of it and if you see any problems with it. My unit test passes, but that's the only amount of testing I've done with it! I tried to leave comments for myself (and others), but there's some more I want to start digging into now to better understand it all.

- Josh

Reply via email to