← Indietro
EsameEsame completoTesto d’esame

2015 09 09

Esame completo di Middleware Technologies for Distributed Systems per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Middleware Technologies for Distributed SystemsEsame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Middleware Technologies for Distributed Systems per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

Politecnico)di)Milano))Middleware)T echnologies)for)Distributed)Systems))) 09th)of)September)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. •)Check the back of this page for any additional exercises. 1.)Implement in Java a PhotoBook class that organizes a (finite) set of photos and uploads them to a remote host so that they can be shared with others. Suppose a Photo class exists, together with a class SharingSvc that provides the following method: void upload(String bookTitle, Photo[] photos, String[] captions). Class PhotoBook provides a constructor that specifies the maximum number of photos in the book and the book’s title. It also provides the following methods: int add(Photo p) : this method adds a new photo in the book’s first empty slot and returns the slot number. It suspends the caller if the book is full. void setCaption(int slot, String caption) : this method sets the caption for the photo in the given slot. void upload(SharingSvc svc): this method uploads the entire book to the given sharing service and clears the book, leaving it ready to be filled again. Since the uploading operation may take a long time, method upload must operate asynchronously w.r.t. the caller (i.e., using a separate thread). 2.)In TinyOS write a module MaxRead that uses and implements the Read<uint16_t> interface. When requested to read a value from its clients, it reads the sensor wired to the Read<uint16_t> interface it uses 10 times (each read being interleaved from the previous one by 20ms) and returns the maximum value read. The following interfaces may help you: interface Timer<precision_tag> { command void startPeriodic(uint32_t dt); command void startOneShot(uint32_t dt);…

Anteprima

Prima pagina del documento.

Prima pagina: 2015 09 09