Saturday 24 March 2018

Multi Threading Model | Java

Java multi-threading model and client/server model are the fundamental Java components to build distributed applications. In this assignment, you are to develop programming skills of these components or models via a particular application – a simplified client/server information query system. The Java multithreading and client/server components have been introduced through weekly lectures, tutorials and lab projects of this unit; you should ensure that you have good understanding of these learning materials before you start this assignment. In this assignment, you will need to integrate what you have learnt to develop a simple client/server system to query students, subject units and unit enrolment information.

Part 1: Query client and query server design and implementation
  1. The query client is a query frontend application, running in a network computer and providing options to:
  • Query students’ contact details
  • Query students’ enrolled units
    • Query unit details
The query frontend client provides a menu to let a user choose any of these options continuously until the user chooses to exit the system. Once it accepts an option and related information, it will send a query request to the remote server. The client accepts the response from the server and displays the query results to the user. To construct such a client, you will need to use Java UDP datagrams to encapsulate the user’s request and a Java UDP datagram socket to communicate with the remote server. The interface of a reference implementation of such a query client is shown in Fig 1.

                                                                                                                 

    1. The query server is running on another network computer, accepting and parsing a client’s request to interpret the query. The server can distinguish the above 3 different query options. For each request it receives, the server creates a thread to complete the query and sends the result back to the query client. To be consistent with the client, the server needs to use Java UDP datagrams to encapsulate a query result and a Java UDP datagram socket to communicate with the remote client. The interface of a reference implementation of such a query server is shown in Fig 2. Please note the server’s output in Fig 2 is to display some queries and results for understanding purpose but not essentially necessary. That is, the server does not have to output anything on a terminal.
1
                          Fig 1. The interface of query client
21212121212121
                            Fig 2. The interface of query server
You will need to design and implement the query client, query server and associated student, subject unit and enrollment entities and processing threads by using standard Java language.
Note: you do not need 2 computers to test the system; you will need to run the query cleint and query server on 2 Java Virtual Machines (JVMs) of a physical machines as illustrated in Fig 1 and Fig 2.
Part 2: Documentation
After the implementation of the framework, prepare a document to include:
  1. An end user’ instruction about how to compile, run and test your system.
  1. The limitations of the current system and suggestions for future improvement.
Submission
You need to provide the following files in your submission.
  1. Implementation files
  • Files of Java source code of the implementation. The in-line comments on the data structure and program structure in the programs are required. These source code files must be able to be compiled by the standard JDK (Java Development Kit) or NetBeans from Oracle
  • The compiled Java class files of the source code. These Java classes must be runnable on the standard Java Runtime Environment (JRE) or NetBeans from Oracle
  1. A Microsoft Word document to address the issues as specified in Part 2 above.
All the required files must be compressed into a zip file for submission. You must submit your assignment via the online submission system from the unit web site. Any hardcopy or email submission will not be accepted. After the marked assignments are returned, any late submissions will not be accepted.
Marking Criteria
Marking CriteriaAvailable Marks 
   
1.  The Query Client10 
   
•  Whether the query client is compilable and runnable2 
   
•  Whether UDP is correctly used to communicate to the2 
remote server  
   
  
 •  Whether the structure of query client is sound3
   
 •  Whether the user’s request is correctly constructed2
   
 •  Program readability and necessary in-line comments1
   
2.The Query Server15
   
 •  Whether the server is compilable and runnable2
    
 Whether UDP is correctly used to communicate to the2
  remote client 
   
 •  Whether the structure of query server is sound3
   
 •  Whether the query server is correctly multithreaded2
   
 •  Whether necessary entities (student, unit, enrolment) are3
  correctly constructed 
   
 •  Whether the user’s request can be correctly parsed2
   
 •  Program readability and necessary in-line comments1
   
3.Documentation5
    
 Whether the user’s instruction is clear and covers the3
  system function 
   
 •  Limitations   of   the   system   and   suggestions   for2
  improvement 
    
  Sub Total for Assignment 130
    
  Late Penalty-1.5 (5% each calendar
   day, either full or partial)
    
  Plagiarism Penalty 
    
  Total for Assignment 1 
    

No comments:

Post a Comment

Recent Questions

Learn 11 Unique and Creative Writing Examples | AssignmentHelp4Me

Learn 11 Unique and Creative Writing Examples | AssignmentHelp4Me elp4Meelp4Me