Concurrent and Event-Based Programming

Laboratory page

Authors: Dan Cosma, Petru Mierlutiu, (c) 2008-2020
Updated: 21 September 2020

Links for connecting to the online labs

  • The lab on Tuesday at 16:00 will be held at the same conference link as the course (available on the Lectures page). The link will be reused when the allocated time expires.
  • For Tuesday's CEBP lab starting at 18:00 please use the following connection URL. After the allowed 40 minutes have elapsed, the same url shall be used to reconnect.


During the lab classes, students must develop two medium-sized projects, working in teams of at most 4 persons

Team leaders must announce the chosen project by writing an email to the lab supervisor, no later than the end of the second week of the semester.

Students will attend the lab and submit the project with their time, at the date they were registered to.

Projects must be written in Java. The lab supervisor may approve using other platforms in special cases. Projects must be designed to deal with all concurrency problems specific to the chosen subject, such as deadlock, livelock, starvation, visibility, etc. Project submission after the deadline leads to penalties.

Project 1

The project can be implemented as a local application or a distributed one. It starts in the 3rd week of the semester and must be submitted no later than Week 8.

Students can choose the specification of projects, which has to be approved by the lab supervisor.

Examples of projects (only partially translated from Romanian, for now):

  1. Workflow Simulator
  2. Bureaucratic System
  3. Messaging Server
  4. Strategy game
  5. Stock exchange
  6. Chemistry game
  7. Game of life

Project 2

The project deadline is Week 12.

The project must be implemented in one of the following two ways:

Project Type A:

The application consists of a set of components (java classes), as follows: * a set of event producers and consumers

  • a dispatcher implemented as an event loop or as a separate service (a class featuring methods as sendEvent(type, source)). The dispatcher will provide methods like registerListener(type, class) which can be used by classes that need to register as event consumers.

Events have a type attribute, reprezented through an identifier (character string), and consumers will register to the dispatcher by specyfiyng the type of events they are interested in, A class may be interested in more than one event types.

The events generated by producers are sent to the dispatcher, which in turn sends them to the classes interested in the respective event types. Evenimentele generate sunt trimise dispecerului, care le trimite mai

The code that deals with the receipt and dispatching of events (the dispatcher) must be independent in design and concept from the particular specification of the project. (It must be reusable in other projects)

Project Type B:

The architecture is similar to Project Type A, with the exception that the dispatcher will not be implemented in the application. Instead, the students must use an existing software infrastructure (service) that provide dispatching functionality. The technology of choice in this respect is Java Message Service (JMS), by using Topic resources to model the dispatcher, with events being represented by asynchronous JMS messages.

As above, events have types represented by a character string ID, and the event consumers register to the JMS server by specifying the types of events they are interested in. A consumer can register to more than one event types.

For both types of projects, event consumers are specific classes that receive the events sent by the dispatcher, and take actions according to the project specification.

Examples of projects that can be chosen (in Romanian, for now):

  1. Joc de strategie
  2. Bursa online
  3. Sistem de stiri

Course page

All information about the course, including slides, exam dates and grades are available on the course site.


Programare concurenta

Programare bazata pe evenimente


For questions please contact the lab supervisors by e-mail:

  • Dan Cosma, at adress danc at cs -dot- upt dot ro.