In this assignment, you will develop two Java Web Clients and a PHP page. The assignment has two parts. In the first part, you will develop a Java Client that sends HTTP requests to a PHP page. In the second part, you will develop a PHP page that responds to the requests of the client.
For the Server side, you will use the “gnuplot” to generate some plots. So download and install that software.
Assignment Parts:
1. Part 1: In this part, you are required to develop a Java Application that acts as a Web Client that sends HTTP requests and a PHP server as described below.
Develop a GUI Application that has drop-boxes or text boxes to enter the data to be sent to the client. The user must specify his ID and Name also.
Use a Drop box to select the method to use for the HTTP request, which should be either GET or POST. The client sends a request every 10 seconds periodically. The Server responds with a string of pairs of (Timestamp, Temperature) for the last 10 seconds, one for every 2 seconds. Temperature value is between 0 – 100. The client should parse the received pairs and add values to a Temperature-time plot in real time. In other words, the graph should be updated every 10 seconds.
Your client must have also a Button “Get Data File” to get the File in which the all pairs of (Time, Temperature) are stored. When the Button “Get Data File” is pressed, the file should be transferred from the Server to the Client and displayed.
Your client must have also a Button “Get Graph” a plot of all data generated by the Server as an Image and displays that image. The graph is a plot of the data collected in the current day.
2. Part2: Write a PHP page that responds to the HTTP requests sent by the client described in a. You will need a small database to store the users and their IDs. Treat the ID as a password. If the user does not have an ID, deny the service for that user.
You will need to do the followings:
1. Create a Periodic Daemon that runs every 2 seconds and generates a random pair (timestamp, Temperature) and add them to a file. In Linux, you can do this as a “cron” job. In windows, you can do this by using the Scheduler. Do some research here. Store the generated Temperatures in on File Per day.
Keep also the last 5 values handy and easily accessible. This is left to you to come up with Ideas.
2. The PHP page does not generate the values, but it gets them from the file(S) generated by the Daemon.
3. If a client application requests the file, it should be sent to the requester.
4. If the user requests a graph of the data, generate the data by using the open source such as “gnuplot”. Your PHP page can easily execute and command line to execute a program, see the System or exec PHP.
i have a lots of experience in PHP MVC,MySQL, Wordpress, Codeigniter, laravel, Android, Mobile application development and Web Designing.
my aim to deliver quality products to our customers within specified deadline.
If hired by you I will put in my best work. I am ready to be hired by you and start work on your jobs.
PM to me for more discussion
Hey there, I am interested in this project. I am an experienced Java developer. Kindly send me more details over chat, I would like to discuss. Thank you.
Hello, Im advanced Java/PHP developer - as I see you need 2 projects and php api script that returns content of a file, I can create that stuff in 2 days for you and I suggest to user JavaFx as destop aplication or maven Java aplication for the web. I also offer written test for any project that I will make so you can be sure your project will works properly like a harm.
I have 5 yrs working experience in web development and mobile app development client satisfaction is my priority and excellent service i would love to work on your project. hope to hear from you soon