Instructions

  • This group project is worth 50% of your marks

  • Groups can composed of a maximum of 3 students (Send an email to gnardin@emse.fr with the names of the group members by November 18, 2025)

  • You must submit a compressed file named the group number assigned to your group including

    • all the files of the Java project(s)

    • a README file containing instructions to run the project

    • a project report document describing and justifying the proposed solution architecture including the AWS services used (between 3-7 A4 pages, 12pt font size)

    • a demo video of the setup of the environment, code, and execution (between 5-10 minutes)

  • The compressed file must be uploaded on eCampus until December 17, 2025 at 23:59

  • Late submission will have a 10% penalty and an additional 10% penalty for each late week (maximum 4 weeks lateness). After 4 weeks, projects will receive zero marks

Required Tools and Services

To proceed with the project, make sure that you have all the pre-requisite tools installed in your environment.

The solution architecture can use the following AWS services:

  • Elastic Cloud Computing (EC2)

  • Lambda

  • Simple Storage Service (S3)

  • Simple Queue Service (SQS)

  • Simple Notification Service (SNS)

Practical Work

Description

Your group has been hired to provide a solution to temporarily summarize and consolidate the data of the IoT traffic of a multi-national enterprise. The IoT traffic are generated by and collected from IoT devices geographically distributed. The enterprise wants to summarize and consolidate the traffic data in order to detect anomalies and bottlenecks to guide their infrastructure investment decisions. The enterprise’s IT director does not want to invest in a permanent infrastructure to support this tasks, thus the use of Pubic Cloud infrastructure has been proposed since it covers all geographical locations where the enterprise has a branch.

Each branch generates a comma separated values (CSV) file containing the IoT traffic that you can download at Dataset of legitimate IoT data (VARIoT).

The group’s task is to propose a solution architecture using the AWS services and develop the supporting applications.

The Upload Client uploads IoT traffic generated files by the branches into a shared repository.

The Summarize Worker processes the CSV files and summarizes the traffic between the source (Src IP) and destination (Dst IP) devices per day. For each devices combination per day, the application calculates the Total Flow Duration (Flow Duration field) and Total Forward Packet (Tot Fwd Pkt field).

The Consolidator Worker processes the output of the Summarize Worker and update the average and standard deviation of the traffic between the source and destination devices.

The Export Client exports into a CSV file the summarized and consolidated traffic information of a device combination.

Additional Requirements

  • The solution must guarantee the processing of files in case of any Worker unavailability or busyness

  • The solution must use the least amount of Cloud storage resources possible

  • The Worker must process as soon as possible new IoT traffic files

Appendix

Install OpenJDK Java 17 on Amazon EC2

The EC2 virtual machine instance does not have the Java installed by default. To install Java 17 on the EC2 instance use the commands

$ sudo dnf install java-17-amazon-corretto
$ sudo dnf install java-17-amazon-corretto-devel

Generate .jar file to execute on Amazon EC2

You need to generate and upload the .jar file to the Amazon EC2 instance.

To generate the .jar file, first add the XML snippet in the pom.xml file inside the <plugins> and </plugins> tags. Replace the full.path.main.class in the <mainClass>full.path.main.class</mainClass> by the path to the main class of your application.

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <manifest>
              <mainClass>[full.path.main.class]</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>

Then, you can generate the .jar file via the command line

$ mvn package

This will generate a directory called target where you will find a file with -jar-with-dependencies.jar extension (for instance, project-0.0.1-SNAPSHOT-jar-with-dependencies.jar).

You need to transfer this file to the Amazon EC2 instance using SFTP tool (see TD 1 Cloud and Edge Infrastructures : Amazon EC2 for further details about SFTP).

To run your application in the Amazon EC2 instance, execute

$ java -jar project-0.0.1-SNAPSHOT-jar-with-dependencies.jar