Specifications:

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:

  • Client connects to server.
  • Server responds with welcome message, followed by a listing of available poems (by title or first line), followed by simple instructions.
  • Server then waits for client input, which should be a poem selection.
  • Server responds to client input with selected poem or with appropriate error message if client input is outside the expected range of correct input values.
  • Server terminates the session (either poem or error message was sent).

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.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.