jnp commented on a change in pull request #60: RATIS-846: create simplest 
possible example, a replicated counter
URL: https://github.com/apache/incubator-ratis/pull/60#discussion_r409321712
 
 

 ##########
 File path: ratis-examples/README.md
 ##########
 @@ -114,7 +118,24 @@ Continue the server command example,
     ${BIN}/client.sh arithmetic assign --name c --value a+b --peers ${PEERS}
     ${BIN}/client.sh arithmetic get --name c --peers ${PEERS}
 
+## Example 3: Counter
+This example designed to be the simplest possible example and because of that 
+this example does not follow the scripts and command line parameters of 
previous
+examples.
+The Goal of this example is to maintain and replicate a counter value across 
+a cluster.
+`CounterServer` class contains the main method to run the server and you can 
run it 
+three times with three different parameters(1,2 and 3).
+all address and ports of the peers hardcoded in `CounterCommon`, so you don't 
+need any extra configuration to run this example on your localhost.
+`CounterClient` class contains the main method to run the client,the client 
sends 
+several INCREMENT command and after that, it sends a GET command and prints 
the 
+result which should be the value of the counter.
+'Counter State Machine' implemented in `CounterStateMachine` class.
+You can find more detail by reading these classes javaDocs.
+
 
 Review comment:
   Lets move the above example to run server and client in this section. i.e.
   java -cp "target/*" org.apache.ratis.examples.counter.server.CounterServer 3

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to