Question: Project Description: This project will include a server that collects temperature readings from clients ( acting as sensors ) and stores them. Clients can request
Project Description: This project will include a server that collects temperature readings from clients acting as sensors and stores them. Clients can request aggregated data like the average temperature or the maximum temperature. Figure illustrates the two main components of the system, which are as follows: TemperatureServer: Accepts incoming connections requests from clients. It also receives recent temperature readings from clients, stores them, and handles queries for average, max, min, and recent readings. In addition, if the server detects that the temperature exceeds a maximum, it sends an alert to all the clients. TemperatureClient: Simulates a temperature sensor that sends periodic temperature readings to the server and can request recent readings and aggregated data eg average, max, min Also, clients receive temperature alerts from the server and display them on the clients screens. The client uses the following commands to communicate with the server: Send: clients use this command to send their sensors reading to the client. The client automatically sends the readings every seconds. o Example: The client sends to server: Send The Server displays on the server screen: Temperature reading received from sensor The server sends to the client: A temperature reading of is received. Average: clients use this command to request the average of the last n temperature readings received by the server from the server. o Example: The client sends to server: Average n The server sends to client: Average Temperature is Max: clients use this command to request the maximum temperature from the server. o Example: The client sends to server: Max The server sends to client: Max Temperature is Min: clients use this command to request the minimum temperature from the server. o Example: The client sends to server: Min The server sends to client: Min Temperature is Recent: clients use this command to request the recent n temperature readings received by the server. o Example: The client sends to server: Recent n The server sends to client: Recent Temperature readings are Figure : Remote Temperature Monitoring and Notification System The server stores the received temperature readings from the clients in a list. In addition, It notifies all the connected clients about the temperature if the average temperature exceeds a specific threshold, for example, The alert message sent by the server to all connected clients is Temperature Exceeded the maximum threshold of The server also records all actions in a log file, such as receiving temperature data, processing client requests, and sending responses. The log file will store timestamps and descriptions of each action for easy monitoring. Please note that you could format the log file in any format. It should show the data, time, and actions happening on the server. A sample of the log file output could be as follows: :: Server is running :: Client connected: :: Received temperature: from :: Request average temperature: from
:: Sent average temperature: to :: Client disconnected: To simulate temperature data by the clients sensors a number between and must be generated randomly. Please note that not all clients have to use the entire range of temperatures. Some of them, for example, may only generate random numbers between and The remote temperature monitoring system must run as follows: The TemperatureServer application should have an infinite loop to accept connection requests from the Temperature Client. The TemperatureClient needs to run over a period of time. The minimum time of execution is seconds, which is equivalent to readings. You can enter this value at runtime eg user input or read from file Project Instructions: This is a group project with EXACTLY or members in each project group. The project includes three main tasks: implementing a clientserver application, writing a professional project report, and project discussion, which consists of a demo of the application and a discussion of the report. The clientserver application should be written in Java programming language. The implementation of the remote temperature monitoring application is based on the clientserver architecture, and it should use TCP sockets. Although using threads is not required; however, using them is encouraged. If you use them, make sure that you mention that in the introduction of the report and what the benefit of using them is Deliverables: You are required to submit the project application and report files on Blackboard before the deadline as follows: The complete source code files for the client and server in a director
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
