Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Middleware Technologies for Distributed Systems
- Classification
- Exam · Full exam
- Content
- Exam paper only
- Original format
- Text
- Searchable text
Full exam for Middleware Technologies for Distributed Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Politecnico)di)Milano))Middleware)T echnologies)for)Distributed)Systems))) 25th)of)February)2015)Rules: •)You are not allowed to use books, notes, or other material. •)You can answer in Italian or English. •)Total time for the test: 1.5 hours. 1.)Use Java to implement a Delay
Full exam for Middleware Technologies for Distributed Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Politecnico)di)Milano))Middleware)T echnologies)for)Distributed)Systems))) 25th)of)February)2015)Rules: •)You are not allowed to use books, notes, or other material. •)You can answer in Italian or English. •)Total time for the test: 1.5 hours. 1.)Use Java to implement a Delay
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
Politecnico)di)Milano))Middleware)T echnologies)for)Distributed)Systems))) 25th)of)February)2015)Rules: •)You are not allowed to use books, notes, or other material. •)You can answer in Italian or English. •)Total time for the test: 1.5 hours. 1.)Use Java to implement a Delay class that provides a single static method void delay(Runnable job, int delay) which runs job after delay seconds. Assuming that jobs run quickly, use a single thread to run all the jobs. Define the class and all auxiliary classes you may need (e.g., the thread class). 2.)Use TinyOS to write module Counter, which counts how many messages it receives and uses an ad-hoc event every ten messages to signal the total number of messages received so far. The module also provides a method to reset the counter. Ignore the issues related with starting the radio (i.e., assume the radio has been already started and configured). Write the interface and the implementation of the module. The following interfaces may help you: interface Receive { event message_t* receive(message_t* msg, void* payload, uint8_t len); } 3.)Imagine you are implementing an application that allows a professor to send a single email to all the students in his/her class at the same time. Since the university's mail server is often congested we want to use JMS to support asynchronous message sending. This allows the professor to get out-of-the-loop as soon as possible, and receive a confirmation as soon as he/she sends the content of the email and the destination addresses to JMS. The mail server should periodically (e.g., every 15 minutes) check if there are any messages that are waiting to be sent and then send them. Design and provide a simple implementation of this scenario using JMS. (The technical details regarding the actual…
First page of the document.