mario-renau-alstom commented on code in PR #53: URL: https://github.com/apache/incubator-pekko-samples/pull/53#discussion_r1280156827
########## pekko-sample-persistence-dc-scala/README.md: ########## @@ -6,14 +6,14 @@ to run a replica per datacenter. ## How to run -1. In terminal 1: `sbt "runMain sample.persistence.multidc.ThumbsUpApp cassandra"` +1. In terminal 1: `sbt "runMain sample.persistence.res.MainApp cassandra"` -1. In terminal 2: `sbt "runMain sample.persistence.multidc.ThumbsUpApp 7345 eu-west"` +1. In terminal 2: `sbt "runMain sample.persistence.res.MainApp 7345 eu-west"` -1. In terminal 3: `sbt "runMain sample.persistence.multidc.ThumbsUpApp 7355 eu-central"` +1. In terminal 3: `sbt "runMain sample.persistence.res.MainApp 7355 eu-central"` 1. In terminal 4: - * To add a thumbs-up for resource `pekko` from user `u1` in DC `eu-west`: `curl -X POST http://127.0.0.1:17356/thumbs-up/pekko/u1` - * To add a thumbs-up for resource `pekko` from user `u2` in DC `eu-west`: `curl -X POST http://127.0.0.1:17357/thumbs-up/pekko/u2` - * To get the users that gave thumbs-up for resource `pekko`: `curl http://127.0.0.1:17357/thumbs-up/pekko` - * Note the port numbers 17356 for eu-west and 17357 for eu-central + * To add a thumbs-up for resource `pekko` from user `u1` in DC `eu-west`: `curl -X POST http://127.0.0.1:27355/thumbs-up/pekko/u1` + * To add a thumbs-up for resource `pekko` from user `u2` in DC `eu-west`: `curl -X POST http://127.0.0.1:27345/thumbs-up/pekko/u2` + * To get the users that gave thumbs-up for resource `pekko`: `curl http://127.0.0.1:27355/thumbs-up/pekko` Review Comment: The http port is set in the code as follows: `val httpPort = 20000 + port` in Scala. `ThumbsUpHttp.startServer(system, "0.0.0.0", 20000 + port, new ReplicaId(cluster.selfMember().dataCenter()), replicatedSharding);` in Java. That's why it has to be 27355 and 27345. Another option is to modify the code so we add 10000 instead of 20000. As there are no tests, the only impact is on the documentation. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
