Updates (4/24/201) related to MS5. To clarify, when I say Phase 1, this assumes the project work related to MS1, MS2, MS3. And Phase 2 refers to the security extensions (MS4). MS5 is the final and complete submission of all parts of your project.
Updates (4/17/2017)
Updates (4/6/2017)
The objective of this project is to further develop your understanding of the course material.
You should work in a group of three. You can work by yourself or with one other partner. However, all projects will be graded the same.
There are two phases to the project:
Terminology:
Phase 1:
Requirements: The 'tool' represents a hardware/software sensing device. It periodically transfers a data (sensing sample, a sensing application result) to the backend. The "tool" must have a component that runs on a Linux device. The device can be our Linux VM. Or it could be a raspberry pi or an Android device. If you chose a platform other than our VM, it is your responsibility to learn the detals of that platform. The 'backend' must run on your Linux VM. The VM must be accessible to the outside world. IF this requires your laptop to be connected to an Ethernet, that is perfectly fine. You will need to demo your Phase 1 in my lab (you can connect via ethernet in the lab, you can also connect with my WiFi AP rather than the campus). Each tool will have its own set of data and results that have meaning to the specific intent of the tool. However, the results from all tools must include a minimum set of data including : 1)timestamp indicating when the result was computed/collected; 2)GPS location indicating where the client device was located; 3)session id that provides a unique identifier the backend can use to uniquely identify the timeseries of results from a particular user session; 4)tool specific results.
I'll overview several examples to give a better idea of the scope for the project. All are extensions of the current set of Linux UDP-based performance tools (UDPEchoV1-2.tar.gz, perfClient.tar.gz). ALthough each example requires extensive additions to the starting code. You are free to chose other options. For example, you could implement the tool using Python or javascript/node.js. However, the purpose of this project is not for you to learn Python or Node.js - it is to create an interesting application that focuses on the collection of data and a simple method for interpreting or analyzing the data. In all examples, you should assume the starting code will need to be significantly modified and extended. A set of messages are likely required that allows the client/server to start and stop a session, start and stop an iteration (i.e., when the client scheduled job to run occurs, it starts a new iteration with a purpose of obtaining a result), exchange the result. Certain messages such as the start, end, results will need to be sent reliably. This can be done by adding timeouts and retransmissions. Or this can be done by using a TCP connection for controlling the session and then UDP for the actual data associated with the tool. You should make sure the data sent in network messages is formatted such that the receiver can unpack the message in a correct manner. Basic typed data such as Integers must be in network byte order. The tool must address how to transfer complex data types such as structures in a manner that works when the peer program runs on different types of machines and is built using different compilers.
The Backend design and requirements is left to each group. The high level requirement is that it must use a database to store the tool data and it must provide a web page that visualizes the data. Depending on the specific purpose of the tool, the visualization might be location oriented (i.e., visualize results on a map) or plot the results for a given session on a x-y plot where X is timestamp of the session data points. If the tool has a client and server component, the tool server and the backend do not necessarily have to be on the same machine.
Example 1: parallel UDP transfers.The 'tool' is a performance monitor whose job is to monitor the ability to send at a specified rate over a number of streams. The tool is meant for an environment where the device has multiple networks. For example, in our VM environment, you could create three networks that connect VM1 and VM2. The tool sends data at the configured sending rate spread over the three sockets. . The tool would periodically run - the normal usage might be it is scheduled to run twice a day. Each time it runs, it might perform the measurement test for a configured number of minutes. At the end of the measurement, it (either the client or the server or both) computes a result and submits to the backend. Over the course of days, weeks, months, the backend will accumulate these results. Depending the design, the client or the server would generate the results. Whatever code generates results would also need to submit to the backend.
The current perfTool consists of a client and server. The client sends UDP messages at a fixed rate that can be controlled by a token bucket. A parameter specifies how many different sockets are to be used as well as how many different interfaces are to be used. You can simplify this where the tool either operates with a single socket over each interface that is specified or a number of sockets over one particular interface that is specified.
The server side of the tool should run as a daemon process and submit error messages to syslog. It must support multiple clients concurrently. It should fork a child process for each new session. The server will need a method (perhaps by a opcode field in the messages) to begin and end sessions and transfers. The server should maintain its own set of statistics and have its own method for tracing and recording what happens.
Example 2: Extend the tool adding aspects of TCP-like congestion control to the UDP transmission. The tool can be designed to provide periodic results reflecting the available TCP throughput between the client and server.
Example 3: Create a tool that serves as a publlish/subscribe asynchronous messaging system response time monitor. The client issues an MQTT message periodically (once per second, once per minute).The tool can use an open source MQTT system, such as Mosquito. The client would use the Mosquito client library to send the message and to receive the reply. An MQTT broker would run on your VM. The client should be able to stress the MQTT broker.
Other ideas are acceptable. I recommend talking to me prior to submitting MS1.One warning- if you do decide to use a device platform other than our VM, make sure you have a backup plan in case things don't work out as expected.
Phase 2: To be specified later. However, to give an idea of what we have in mind, for each of the three examples, we might suggest the following
Submissions and project structure:
MS1: Provide a summary of your project topic, idenfity the results data, indicate your initial database direction, sketch out the visualization page. Provide a preliminary set of internal project milestones and what each team member is to do. Identify what you would submit at the end of the semester (i.e., what code or data would be appropriate to submit).
MS2: Interim check point. Please submit a 2-3 page PDF to handin that covers:
MS3: Phase 1 submission. This includes a writeup of your project - includes the motivations, high level design, low level design, validation of the system that incudes enough results that convince us the system is working as intended.Due to timing, we won't be doing demos in class however please be prepared for us to request a demo (or to show us aspects of what you submitted for MS3). This document should clearly describe your project in a stand alone manner. Assume the reader has not seen any of your prior milestone submissions. Your final report should be sufficient to allow a reader to understand exactly what you did for your project, including the appropriate background, design and implementation details, and results.
MS4: Provide a summary of the security extensions to your project.
MS5: Final project submission. Update your Phase 1 paper to reflect the entire project. Submit all code (your MS1 and MS4 should have specified what you will submit). You should assume that we will ask you to demo your project to us.
Grading:
MS1 5 pts
MS2: 10pts
MS3 40pts
MS4 5 pts
MS5 40 pts