SlideShare a Scribd company logo
COMP9031 INTERNET PROGRAMMING
ASSIGNMENT 2
Theme: RMI Programming in Chat Server Application
Released: Tuesday 25 Aug 2009
Due: Friday 11 Sept 2009
(11:59PM)
Marks 15
Please download Code-for-Ass2 (on the homepage), compile, and prepare it to run. [Let us refer
to this running system as RMI-Chat-Server(RCS).]
Part 1(2 marks)
Run the RCS system and prepare a report (Report.pdf) answering the following questions. Please
copy the questions in your report, and write the answers below each question (as shown for
example in question 1 below).
RMI
1. What are the RMI operations provided at the server side? What are the RMI operations
provided at the client side?
Ans: [Provide your answer here]
2. Why do we have to run the rmic command?
3. Why we do we need to run the rmi daemon ?
4. Are there any good reasons why the server side object is Activatable where as the client
side object is UnicastRemoteObject?
5. What is the use of the register (...) method in the class ChatServerImpl ? Is this method
really necessary in the current implementation code?
6. rmiregistry:
a. What errors do you get when you don’t run the rmiregistry before you run your
chat server? Explain what has happened.
b. What happens when you abort the registry in the middle of a chat session?
Explain what has happened.
7. Why do we need to specify polices? Explain what is specified in each policy file.
8. What is the need for the http server?
RMI-Chat-Server(RCS)
1. Why do we have to have two Remote interfaces at the server?
2. Suggest some more interfaces at the server that you think will be useful for a chat server
application.
3. Explain how the server gets the reference to the remote client object.
4. In the method registerclient(...), why do we need to synchronize the add(client) operation?
HTTP Server
Explain the error messages (if any)
1. When the http server is turned off even before the chat server is started.
2. When the http server is aborted in the middle of a chat session.
Client
1. Explain how the client obtains the reference to the server’s remote object.
Part 2 (5+3 marks)
Server GUI(5 marks)
Build a GUI at the server side, and provide the following buttons:
1. ST button: Start the server and display the message Server started.
2. SP button: Stop the server and display the message Server stopped.
3. ON button: Turn the moderator ON and display the message Moderator turned ON.
4. OFF button: Turn the moderator OFF and display the message Moderator turned OFF.
5. EX button: Stop the server, if it is running currently, and close the GUI window. No
message displayed.
The server GUI will also display the warning messages sent to the users as shown below.
The server GUI looks like the client GUI, except that it has more buttons.
Moderation policy: Assume keywords = {let,us,meet,tomorrow}.
1. Any message that contains all the key words above in any order will be blocked and a
warning Your messsage contains all key words will be sent to the sender of the message.
2. Any user who has been warned more than twice will be removed from the chat server.
The moderator implements the policies above.
Server GUI with sample messages displayed.
Client GUI (3 marks)
Client GUI already has some buttons. Provide the following buttons additionally.
1. Enter Information Button: When this button is clicked, you must collect the following
details and send them to the server to save: name of the user, address, and phone
number.
2. Get Information Button: When this button is clicked, ask for the name of any user,
search for his details (name, address, and phone number) at the server, retrieve them,
send them to the client, and display them at the client GUI.
Part 3: Extension [5 marks]
(If you score, say k marks, in this section, then the remaining 5 – k marks will be added to
your Final Exam weight (which is currently 40%))
Currently the clients call the method registerClient( ChatClient client ) and pass on a
ChatClient object to the server, which the server uses to send messages later. We want to
redefine registerClient( ChatClient client ) as registerClient( String clientName ) so the clients
can pass on their names (as strings), rather than their objects. Modify the chat server and the
client programs incorporating this change.
Submission
Prepare a readme.text file containing commands and instructions that tell the tutor how to
run your program.
Submission command: % give cs9031 ass2 program.jar Report.pdf Readme.text
Deadline: Friday, 11 Sept 2009.
We accept both Windows and Linux versions.

More Related Content

PDF
MarvelSoft SchoolAdmin Offline LAN Access Setup Guide
PDF
MarvelSoft SchoolAdmin school software lan setup guide
PPT
Mail server
PPTX
Enable telnet client
PDF
RatanM-AssignmentBMC-June10
PDF
Tivang.yem.managing printing linux
DOC
Simple Mail Transfer Protocol
MarvelSoft SchoolAdmin Offline LAN Access Setup Guide
MarvelSoft SchoolAdmin school software lan setup guide
Mail server
Enable telnet client
RatanM-AssignmentBMC-June10
Tivang.yem.managing printing linux
Simple Mail Transfer Protocol

What's hot (7)

PDF
OTechs Mail system proposal
PPT
Email ftp
PPTX
install active directory and configure domain controller
PPT
Email ftp
PPTX
Mail server
PDF
Mail server_Synopsis
DOCX
Email spamming
OTechs Mail system proposal
Email ftp
install active directory and configure domain controller
Email ftp
Mail server
Mail server_Synopsis
Email spamming
Ad
Ad

Similar to ass2 of IP (20)

PDF
International Journal of Engineering Research and Development
PDF
Chat application through client server management system project.pdf
PDF
Web chatting application project report management system.pdf
PDF
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
PDF
SRS FOR CHAT APPLICATION
PDF
Networking lab
PDF
Chat application throught client server project report.pdf
PPTX
nothinascdks bkcbskcbak,bx,jaxjaxvjasgjcxvagjqsxv
PPTX
Chat Application
PDF
Multicast chat with file and desktop sharing
PDF
Functionality You are to create an enhanced chat system- In particular.pdf
DOCX
ProposalRequirements document This is part 1 of the project, I .docx
PPTX
Chat Passion Series
PDF
1. You are to write a client-server application to support Calculus�.pdf
PPTX
Presentation of 3rd Semester C++ Project
PPTX
Client server chat application
PDF
Create a GUI application in Java that allows users to chat w.pdf
DOCX
17 Spring 2018 Assignment 3 Chat server .docx
PPTX
this is a power point presentation on chat application
PPTX
Chat server nitish nagar
International Journal of Engineering Research and Development
Chat application through client server management system project.pdf
Web chatting application project report management system.pdf
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
SRS FOR CHAT APPLICATION
Networking lab
Chat application throught client server project report.pdf
nothinascdks bkcbskcbak,bx,jaxjaxvjasgjcxvagjqsxv
Chat Application
Multicast chat with file and desktop sharing
Functionality You are to create an enhanced chat system- In particular.pdf
ProposalRequirements document This is part 1 of the project, I .docx
Chat Passion Series
1. You are to write a client-server application to support Calculus�.pdf
Presentation of 3rd Semester C++ Project
Client server chat application
Create a GUI application in Java that allows users to chat w.pdf
17 Spring 2018 Assignment 3 Chat server .docx
this is a power point presentation on chat application
Chat server nitish nagar

ass2 of IP

  • 1. COMP9031 INTERNET PROGRAMMING ASSIGNMENT 2 Theme: RMI Programming in Chat Server Application Released: Tuesday 25 Aug 2009 Due: Friday 11 Sept 2009 (11:59PM) Marks 15 Please download Code-for-Ass2 (on the homepage), compile, and prepare it to run. [Let us refer to this running system as RMI-Chat-Server(RCS).] Part 1(2 marks) Run the RCS system and prepare a report (Report.pdf) answering the following questions. Please copy the questions in your report, and write the answers below each question (as shown for example in question 1 below). RMI 1. What are the RMI operations provided at the server side? What are the RMI operations provided at the client side? Ans: [Provide your answer here] 2. Why do we have to run the rmic command? 3. Why we do we need to run the rmi daemon ? 4. Are there any good reasons why the server side object is Activatable where as the client side object is UnicastRemoteObject? 5. What is the use of the register (...) method in the class ChatServerImpl ? Is this method really necessary in the current implementation code? 6. rmiregistry: a. What errors do you get when you don’t run the rmiregistry before you run your chat server? Explain what has happened. b. What happens when you abort the registry in the middle of a chat session? Explain what has happened. 7. Why do we need to specify polices? Explain what is specified in each policy file. 8. What is the need for the http server? RMI-Chat-Server(RCS) 1. Why do we have to have two Remote interfaces at the server? 2. Suggest some more interfaces at the server that you think will be useful for a chat server application. 3. Explain how the server gets the reference to the remote client object. 4. In the method registerclient(...), why do we need to synchronize the add(client) operation? HTTP Server Explain the error messages (if any) 1. When the http server is turned off even before the chat server is started. 2. When the http server is aborted in the middle of a chat session. Client 1. Explain how the client obtains the reference to the server’s remote object.
  • 2. Part 2 (5+3 marks) Server GUI(5 marks) Build a GUI at the server side, and provide the following buttons: 1. ST button: Start the server and display the message Server started. 2. SP button: Stop the server and display the message Server stopped. 3. ON button: Turn the moderator ON and display the message Moderator turned ON. 4. OFF button: Turn the moderator OFF and display the message Moderator turned OFF. 5. EX button: Stop the server, if it is running currently, and close the GUI window. No message displayed. The server GUI will also display the warning messages sent to the users as shown below. The server GUI looks like the client GUI, except that it has more buttons. Moderation policy: Assume keywords = {let,us,meet,tomorrow}. 1. Any message that contains all the key words above in any order will be blocked and a warning Your messsage contains all key words will be sent to the sender of the message. 2. Any user who has been warned more than twice will be removed from the chat server. The moderator implements the policies above. Server GUI with sample messages displayed.
  • 3. Client GUI (3 marks) Client GUI already has some buttons. Provide the following buttons additionally. 1. Enter Information Button: When this button is clicked, you must collect the following details and send them to the server to save: name of the user, address, and phone number. 2. Get Information Button: When this button is clicked, ask for the name of any user, search for his details (name, address, and phone number) at the server, retrieve them, send them to the client, and display them at the client GUI. Part 3: Extension [5 marks] (If you score, say k marks, in this section, then the remaining 5 – k marks will be added to your Final Exam weight (which is currently 40%)) Currently the clients call the method registerClient( ChatClient client ) and pass on a ChatClient object to the server, which the server uses to send messages later. We want to redefine registerClient( ChatClient client ) as registerClient( String clientName ) so the clients can pass on their names (as strings), rather than their objects. Modify the chat server and the client programs incorporating this change. Submission Prepare a readme.text file containing commands and instructions that tell the tutor how to run your program. Submission command: % give cs9031 ass2 program.jar Report.pdf Readme.text Deadline: Friday, 11 Sept 2009. We accept both Windows and Linux versions.