17628 - Concurrent and Distributed Programming

Academic Year 2023/2024

  • Teaching Mode: Traditional lectures
  • Campus: Cesena
  • Corso: Second cycle degree programme (LM) in Computer Science and Engineering (cod. 8614)

Learning outcomes

The course introduces the principles, methods and techniques concerning concurrent and distributed programming involved in modern software development. Upon completing this course, a student will have a solid conceptual and practical knowledge about:
- the spectrum of concurrent programming: multi-threaded programming, task-oriented modeling and design, message-based communication models, actor-based programming, asynchronous and reactive programming
- from concurrent to distributed programming: distributed algorithms, service-oriented computing.

Course contents

The course is organized in four main parts:

1) Concurrent programming - basic concepts and models
- introduction - main concepts and aspects
- modelling a concurrent program/system
-- specifying liveness and safety properties in LTL
-- verifying properties with model-checking - pragmatics
- design and development of concurrent programs
-- methods, architectures
- interaction models and mechanisms
-- shared memory
--- semaphores, monitors
- visual formalism - Petri Nets, Statecharts, Activity Diagrams
In lab:
- multi-threaded programming in Java
-- basic mechanisms and libraries
-- implementing monitors in Java
- verification of concurrent programs in JPF and TLA+/PlusCal

2) Asynchronous programming models and techniques
- async programming based on task-oriented approaches
-- future mechanism
- async programming based on events and event-loop architecture
-- mechanisms and design styles (Continuation Passing style (CPS), promises, asynch/await)
- async programming based on Reactice Programming
-- reactive extensions (Rx)
In lab:
- task-oriented framework in Java - Executors
- asynchronous programming in JavaScript/Nodejs and Vertx
- Reactive Programming in RxJava

3) Concurrent programming based on message-passing
- message passing models
-- based on channels, synchronous and asynchronous
-- actor model
In Lab:
- channel-based message-passing in the Go language
- actor-based programming based on Akka framework (Java or Scala)

4) From Concurrent to Distributed Programming
- introduction - main concepts and aspects
- distributed algorithms
- distributed programming with actors
- distributed programming using message-oriented middleware
- distributed programming using RPC-like models
- introduction to service-oriented computing and cloud computing
In Lab:
- actor-based distributed programming using Akka framework (Java or Scala)
- distributed application programming using message-oriented and RPC-like middlewares using RabbitMQ and Java RMI technologies

Readings/Bibliography

- Principle of Concurrent and Distributed Programming (Ben-Ari) - Addison Wesley
- Java Concurrency in Practice - Brian Goetz, Doug Lea et al - Addison Wesley
- Foundations of Multithreaded, Parallel, and Distributed Programming - Gregory R. Andrews - Addison-Wesley
- Concurrency - State Models & Java Programs - Jeff Magee & Jeff Kramer - Wiley

Teaching methods

Three credits (about 30 hours) are devoted to theory and exercises in the classroom and three credits (about 30 hours) to practice in the lab.

Assessment methods


The final assessment is composed by two parts:
- a set of programming assignments/projects, assigned during the course
- oral discussion, with questions about the theory and the assignments/projects

Teaching tools

- slides projected during the lectures, available on the course web site
- scientific papers and articles, available on the Internet

Links to further information

https://virtuale.unibo.it/course/view.php?id=48302

Office hours

See the website of Alessandro Ricci