Distributed System Publisher-Broker-Subscriber model, and Android frontend
A university project to create a distributed system following the pub-sub model using in-between brokers and an android app frontend.
The deliverable is a distributed messaging system (including image and video files), following the pub-sub model and using at least 3 intermediate brokers. Each broker is responsible for its topics. The topics are distributed to the brokers by hashing(SHA-1) the topic String and assigning it to the corresponding broker by applying mod(numberOfBrokers) to the resulting hash.
The project is delivered in 2 parts. The first part is the Event Delivery System which implements the Broker, the UserNode (Publisher, Consumer), as well as the required functionality for sending/receiving images and videos in a fragmented fashion. The second part is the Android messaging app which is going to be the frontend for the UserNode of the first part.
The project was implemented in collaboration with Despoina Papadopoulou and Alexandros Athanasiou.
Part 1 : Event Delivery System
Main Classes:
- Broker
- UserNode
Inner Classes:
- Broker
- BrokerPublisherConnection
- BrokerConsumerConnection
- BrokerBrokerConnection
- UserNode
- Publisher
- Consumer
Part 2 : Android application
In the second part, the UserNode class is transformed into a Singleton pattern in order to be used by the two activities of the Android app. The main activity contains the available topics list and the creation of a new topic, while the second activity (TopicActivity) corresponds to the messages of the currently selected topic.