https://github.com/dheeraj135/publisher-subscriber-pattern
Implementation of Publisher Subscriber message passing pattern and Master-Slave replication pattern.
https://github.com/dheeraj135/publisher-subscriber-pattern
java master-slave publisher-subscriber-pattern
Last synced: 3 months ago
JSON representation
Implementation of Publisher Subscriber message passing pattern and Master-Slave replication pattern.
- Host: GitHub
- URL: https://github.com/dheeraj135/publisher-subscriber-pattern
- Owner: dheeraj135
- Created: 2020-11-21T06:52:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-29T14:58:31.000Z (over 4 years ago)
- Last Synced: 2025-01-04T20:17:04.805Z (5 months ago)
- Topics: java, master-slave, publisher-subscriber-pattern
- Language: Java
- Homepage:
- Size: 501 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Publisher Subscriber Pattern
### How to Run and test?
- Compile all source files using ```javac *.java```
- The ShardCoord is responsible for running all ShardRegion instances.
- Run RMI registry using ```rmiregistry```.
- Create a new terminal tab using Ctrl+Shift+T for each of the below commands.
- Run Server using ```java Server```. Run Publisher using ```java Publisher```. Run Subscribers using ```java Subscriber``` multiple times. You can subscribe to a topic in a server using "S topic_name" and unsubscribe using "U topic_name". To send to a particular topic from Publisher, use "topic_name message".
- Alternatively, you can also create and run the test cases using ```java Verifier```. This will create the test cases in ```tests/input.txt```. It will also then run the test cases using our code and produce the output in ```logs/``` directory. It will also create expected_output for the test cases in ```tests/expected_output/``` directory. It will then diff the contents of files in ```logs/``` and ```tests/expected_output/``` to see if correct result is being produced and will prompt if all test cases have passed or not.### UML Class Diagram
UML Diagram is in uml.png.
