Skip to content

eGkritsis/simplegram

Repository files navigation

simplegram

A simple distributed messenger app.

Authors; Georgios E. Syros, Anastasios Toumazatos, Nikos Christodoulou, Evgenios Gkritsis

Introdction

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 intersted (subscribers)
  • how how can they express interest (topic subscription) and
  • how can they receive it.

Event Delivery System

This repoisotory accomodates 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 fulfil 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.

- push

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 delievery 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.

- pull

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

  1. This mechanism might be redundant due to the usage of TCP, which handles data fragmentation on its own, for nearly all communication purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages