Concurrent and Event-Based Programming
Laboratory classes

Authors: Dan Cosma, Petru Mierlutiu, (c)2008-2015
Updated: September 27, 2016

Welcome to the CEBP lab classes!

Announcement

Because of a timetable conflict, the lab has been moved to Wednesday, 16:00. We meet in B528, then go to an available room.

Registration

[The registration form is online] Registering to the laboratory classes is mandatory.

Please read the details regarding the lab assignment below, then register using this form. The registration must be completed before the beginning of Week 2.

The current registration status is available here .

Projects

During the lab classes, students must develop two medium-sized projets, 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 1

The project can be implemented as alocal 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
  8. Logging service

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

Resources

  1. Programare concurenta
  2. Programare bazata pe evenimente

Informatii

For questions please contact the lab supervisors by e-mail:
  • Dan Cosma, la adresa danc at cs -dot- upt dot ro.

Please contact the authors by e-mail for any questions or suggestions you may have.