1.A protocol for a network application describes in detail how the server and client should interact with each other. Your first task for this assignment question is to create a document (.txt, .rtf, or .pdf) that defines a network application protocol called Poem of the Day (PoD).
This protocol will specify exactly how a server should respond to a clients request for a poem of the day. The client may need to provide the server with some preferences for the poem so that the server can serve the client with a personalized poem. You need to describe your protocol as an FSM (finite-state machine). This specification must be in the form of a document submitted as part of the deliverables.
Having completed your PoD specification, you will then implement your defined PoD server using the ServerSocket class. You must write documentation for the server, including instructions to tell the user how to run the server and how to test the server by using telnet.
The client will interact with the server using telnet (any telnet client should work).
At a minimum, your PoD server should interact with the client including the following key interactions:
In any event, once the client has provided an input choice, whether correct or not, the server responds with either the poem selected or an error message, then terminates the session and waits for a new connection from a telnet client.
The poems to be served by this server must be contained in a text file that is read by the server prior to initial startup. The location and name of the text file should be specified on the command line when you start the server, i.e., 'java PodServer mypoems.txt'.
2.Write a client/server system using Java RMI, such that the client can ask the server to generate a largest prime number within a range set by the user on the client.
You may implement the system by modifying the sample programs given in the RMI Learning Object (found on (will be provided)) for Unit 14. Both RMI server and client programs will be command line programs.
Use the modern form of RMI as provided in the learning object. DO NOT use the older style of RMI.