This course illustrates the foundations of modern distributed systems and their extension to pervasive systems obtained by including smart objects, IOT, sensors, and actuators as system nodes. A hands-on part of the course guides the students in implementing one of these systems.