A simple distributed messenger app.
Authors; Georgios E. Syros, Anastasios Toumazatos, Nikos Christodoulou, Evgenios Gkritsis
Collaborators; Fotios Bistas
The objective was to develop a communication system that supports multimedia content in Java. Text, photo or video content is published by one or more users and is delivered to a set of one or more subscribers. Due to the large amount of users that we want to serve, we implemented a clever system that is capable of content delivery to the correct receivers.
In order to distribute the content, we need to know:
- who is interested (subscribers)
- how how can they express interest (topic subscription) and
- how can they receive it.
The system is divided in two parts:
- Multimedia Streaming Framework
- Front End Android App
This repoisotory accommodates the implementation of the multimedia streaming framework (Event Delivery System) which is responsible to support the forwarding and receiving (streaming) of multimedia conent.
The Event Delivery System is a programming framework that allows sending and receiving data that fulfill specific criteria. The advantage of the Event Delivery System is the immediate forwarding of data in real time via two fundamental functions; push
and pull
. These two functions are independent of each other.
During each push
call, the intermediate system node (broker) should;
- be able to handle data incoming from different publishers concurrently (in our case users) and
- be able to deliver the results to the subscribers (also called consumers as they "consume" the data)
Concurrency is inevitable because the system is required to offer simultaneous data delivery from publishers to brokers and from brokers to subscribers. All subscribed users must simultaneously receive the same content.
The aforementioned model is backed backed by the two core functions that can be described by the following figure;
Figure 1. A basic prototype of the system.
A brief description follows.
The sole role of the push
function is to forward to a broker a value which is stored in a data structure (e.g. queue), so that the value can be delivered upon requested. This intermediate data structure plays the role of the topic's chat history. As a result, once a new user subscribes to the topic, they will be able to see the previous messages. In our case, push
takes as input the information required for the immaculate delivery of the content (ex. username, topic name/id, video data, etc.).
A significant software requirement that needs to be addressed for better comprehension of the model's functionality is multimedia chunking; a photo or a video streamed to and from the framework is never sent wholly. On the contrary, multimedia content is cut down to smaller, equal in size, fragments (chunks) in order to achieve higher communication efficiency1.
The role of pull
is to deliver all the data of an intermediate node that concern the user (subscriber) that calls the function. Values from each topic are collected and delivered to the subscriber that issued the request.
Footnotes
-
This mechanism might be redundant due to the usage of TCP, which handles data fragmentation on its own, for nearly all communication purposes. ↩