confluo
confluo copied to clipboard
Java pub-sub Implementation
What changes were proposed in this pull request?
- provide a producer and consumer implement for confluo as a pub/sub system in java
- also include a simple produce/consume benchmark test
How was this patch tested?
TestPubSub class provide unit tests
related issue #123 ,#125
Can one of the admins verify this patch?
Jenkins test this please.
Test FAILed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/confluo-prb/360/ Test FAILed.
Jenkins test this please.
Jenkins test this please.
Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/confluo-prb/361/ Test PASSed.
thanks for your code review, i'll try to optimize my implementation following your advices in next few days @anuragkh
Thanks for submitting the PR! Look forward to your changes.
@anuragkh you may review this PR again
Most of the changes look great! I left some minor comments on formatting, it will make the code much more readable if we can get those in.
add ConfluoProducer/Cosumer pub-sub test,hope my changes make my PR more readable
Hi @rudy2steiner, sorry I was traveling for the past few days. I think this patch still needs better tests -- please see the relevant comments on the test.
removed non-unit test
Hi @rudy2steiner, thanks for that change. What I meant was we need to add tests that assert the correctness of the implementation. Currently the existing tests do not assert anything. We should update the tests to make sure we are checking for correctness using asserts.
Have you notice the major change in the class TestPubSub in the commit: https://github.com/ucbrise/confluo/pull/135/commits/7f9e0cbd41f625a9b37e6b0b7df035ccc74627f9; And the newest TestPubSub.java contains the testConfluoPubSub function, in that i have 4 steps to assert the correctness of the implements(produce/consume) as following:
- record the current offset,named mq_offset_mark, in target topic,eg mq_001
- produce some of messages(pMeesages) to mq_001,
- starting consume from the old offset mq_offset_mark
- assert consume messages(cMessages) with pMessages in order
https://github.com/ucbrise/confluo/blob/7f9e0cbd41f625a9b37e6b0b7df035ccc74627f9/javaclient/src/test/java/TestPubSub.java
Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/confluo-prb/387/