Question: Objectives: Write client-server application in Java using sockets The Server Create a logging server that receives (from a client) requests log messages to the log


Objectives: Write client-server application in Java using sockets The Server Create a logging server that receives (from a client) requests log messages to the log file or to retrieve the content of the file. The request consists of the following form: ADD# [Message ] - Message: is the message to be logged in the log file. This command will write the Message to the log file and should return the following message to the client Message Logged Successfully GET#IN] N: is the number of messages to be retrieved from the log file This command returns the first N messages to the client. Each message contains only one line and messages should be separated by # Write a main program that creates object of the Server Socket and indefinitely listen for the coming connections, once the connection accepted the client should be able to communicate the commands ADD and GET Test your server with telnet program, a snapshot of the working server should appear like the following CENTO0106993.aus.edu - Putty - x AdalHello World Record Added Successfully DDIFEOM UAE Record Added Successfully add Hi Record Added Successfully GETS Hello World From UAE Hi Get2 Hello World.com UAE getti Hello World! DdBye Record Added Successfully geT#10 Hello World From UAE Hi#Bye At this stage, your server will handle one connection at a time, update it using threading to support concurrent connections, after accepting a connection you need to forward it to a thread to handle the requests from the connected client Note that many threads are sharing your file and hence you need to access it using a synchronized method to handle concurrency Write a client application called clientApp that logs the current date and time into the server every second and ask for the first 5 entries every 3 seconds Objectives: Write client-server application in Java using sockets The Server Create a logging server that receives (from a client) requests log messages to the log file or to retrieve the content of the file. The request consists of the following form: ADD# [Message ] - Message: is the message to be logged in the log file. This command will write the Message to the log file and should return the following message to the client Message Logged Successfully GET#IN] N: is the number of messages to be retrieved from the log file This command returns the first N messages to the client. Each message contains only one line and messages should be separated by # Write a main program that creates object of the Server Socket and indefinitely listen for the coming connections, once the connection accepted the client should be able to communicate the commands ADD and GET Test your server with telnet program, a snapshot of the working server should appear like the following CENTO0106993.aus.edu - Putty - x AdalHello World Record Added Successfully DDIFEOM UAE Record Added Successfully add Hi Record Added Successfully GETS Hello World From UAE Hi Get2 Hello World.com UAE getti Hello World! DdBye Record Added Successfully geT#10 Hello World From UAE Hi#Bye At this stage, your server will handle one connection at a time, update it using threading to support concurrent connections, after accepting a connection you need to forward it to a thread to handle the requests from the connected client Note that many threads are sharing your file and hence you need to access it using a synchronized method to handle concurrency Write a client application called clientApp that logs the current date and time into the server every second and ask for the first 5 entries every 3 seconds Objectives: Write client-server application in Java using sockets The Server Create a logging server that receives (from a client) requests log messages to the log file or to retrieve the content of the file. The request consists of the following form: ADD# [Message ] - Message: is the message to be logged in the log file. This command will write the Message to the log file and should return the following message to the client Message Logged Successfully GET#IN] N: is the number of messages to be retrieved from the log file This command returns the first N messages to the client. Each message contains only one line and messages should be separated by # Write a main program that creates object of the Server Socket and indefinitely listen for the coming connections, once the connection accepted the client should be able to communicate the commands ADD and GET Test your server with telnet program, a snapshot of the working server should appear like the following CENTO0106993.aus.edu - Putty - x AdalHello World Record Added Successfully DDIFEOM UAE Record Added Successfully add Hi Record Added Successfully GETS Hello World From UAE Hi Get2 Hello World.com UAE getti Hello World! DdBye Record Added Successfully geT#10 Hello World From UAE Hi#Bye At this stage, your server will handle one connection at a time, update it using threading to support concurrent connections, after accepting a connection you need to forward it to a thread to handle the requests from the connected client Note that many threads are sharing your file and hence you need to access it using a synchronized method to handle concurrency Write a client application called clientApp that logs the current date and time into the server every second and ask for the first 5 entries every 3 seconds Objectives: Write client-server application in Java using sockets The Server Create a logging server that receives (from a client) requests log messages to the log file or to retrieve the content of the file. The request consists of the following form: ADD# [Message ] - Message: is the message to be logged in the log file. This command will write the Message to the log file and should return the following message to the client Message Logged Successfully GET#IN] N: is the number of messages to be retrieved from the log file This command returns the first N messages to the client. Each message contains only one line and messages should be separated by # Write a main program that creates object of the Server Socket and indefinitely listen for the coming connections, once the connection accepted the client should be able to communicate the commands ADD and GET Test your server with telnet program, a snapshot of the working server should appear like the following CENTO0106993.aus.edu - Putty - x AdalHello World Record Added Successfully DDIFEOM UAE Record Added Successfully add Hi Record Added Successfully GETS Hello World From UAE Hi Get2 Hello World.com UAE getti Hello World! DdBye Record Added Successfully geT#10 Hello World From UAE Hi#Bye At this stage, your server will handle one connection at a time, update it using threading to support concurrent connections, after accepting a connection you need to forward it to a thread to handle the requests from the connected client Note that many threads are sharing your file and hence you need to access it using a synchronized method to handle concurrency Write a client application called clientApp that logs the current date and time into the server every second and ask for the first 5 entries every 3 seconds
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
