SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
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.

Weitere ähnliche Inhalte

Was ist angesagt?

OTechs Mail system proposal
OTechs Mail system proposalOTechs Mail system proposal
OTechs Mail system proposalOsman Suliman
 
install active directory and configure domain controller
install active directory and configure domain controllerinstall active directory and configure domain controller
install active directory and configure domain controllerAlRomaniRashad
 
Mail server_Synopsis
Mail server_SynopsisMail server_Synopsis
Mail server_SynopsisManmeet Sinha
 

Was ist angesagt? (7)

OTechs Mail system proposal
OTechs Mail system proposalOTechs Mail system proposal
OTechs Mail system proposal
 
Email ftp
Email ftpEmail ftp
Email ftp
 
install active directory and configure domain controller
install active directory and configure domain controllerinstall active directory and configure domain controller
install active directory and configure domain controller
 
Email ftp
Email ftpEmail ftp
Email ftp
 
Mail server
Mail serverMail server
Mail server
 
Mail server_Synopsis
Mail server_SynopsisMail server_Synopsis
Mail server_Synopsis
 
Email spamming
Email spammingEmail spamming
Email spamming
 

Andere mochten auch (6)

ass3
ass3ass3
ass3
 
Sdd 4
Sdd 4Sdd 4
Sdd 4
 
assignment
assignmentassignment
assignment
 
Weather app
Weather appWeather app
Weather app
 
today
todaytoday
today
 
entity-presentation
entity-presentationentity-presentation
entity-presentation
 

Ähnlich wie ass2 of IP

In C programming please CSCI 4534 Operating Systems Program.pdf
In C programming please CSCI 4534 Operating Systems Program.pdfIn C programming please CSCI 4534 Operating Systems Program.pdf
In C programming please CSCI 4534 Operating Systems Program.pdfankitsrivastava681882
 
ppt_project_group_2.ppt amnd project report
ppt_project_group_2.ppt amnd project reportppt_project_group_2.ppt amnd project report
ppt_project_group_2.ppt amnd project reportsobanmoriwala1
 
17 Spring 2018 Assignment 3 Chat server .docx
17   Spring 2018 Assignment 3 Chat server .docx17   Spring 2018 Assignment 3 Chat server .docx
17 Spring 2018 Assignment 3 Chat server .docxfelicidaddinwoodie
 
Configuration sending mails from sap
Configuration sending mails from sapConfiguration sending mails from sap
Configuration sending mails from sapvenkatesh88
 
Sap solution manager change request management
Sap solution manager change request managementSap solution manager change request management
Sap solution manager change request managementdryday sunny
 
Machine Problem 1: Let's chat
Machine Problem 1: Let's chatMachine Problem 1: Let's chat
Machine Problem 1: Let's chatbutest
 
Ad basic tech_workshop
Ad basic tech_workshopAd basic tech_workshop
Ad basic tech_workshopmanisherp084
 
Delphi - Howto Services
Delphi - Howto ServicesDelphi - Howto Services
Delphi - Howto ServicesNiall Munro
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingCV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingAmit Bhanegaonkar
 
12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshootingkratos1979
 
IBM SmartCloud Notes Mail Routing - 21st Oct
IBM SmartCloud Notes Mail Routing - 21st OctIBM SmartCloud Notes Mail Routing - 21st Oct
IBM SmartCloud Notes Mail Routing - 21st OctVinayak Tavargeri
 
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docxAssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docxssuser562afc1
 
HelpDesk Training Manual
HelpDesk Training ManualHelpDesk Training Manual
HelpDesk Training ManualMakeNET
 
Component based message alerting on as abap scn
Component based message alerting on as abap   scnComponent based message alerting on as abap   scn
Component based message alerting on as abap scnPradeep Tiwary
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02dvicky12
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730K Hari Shankar
 

Ähnlich wie ass2 of IP (20)

In C programming please CSCI 4534 Operating Systems Program.pdf
In C programming please CSCI 4534 Operating Systems Program.pdfIn C programming please CSCI 4534 Operating Systems Program.pdf
In C programming please CSCI 4534 Operating Systems Program.pdf
 
ppt_project_group_2.ppt amnd project report
ppt_project_group_2.ppt amnd project reportppt_project_group_2.ppt amnd project report
ppt_project_group_2.ppt amnd project report
 
17 Spring 2018 Assignment 3 Chat server .docx
17   Spring 2018 Assignment 3 Chat server .docx17   Spring 2018 Assignment 3 Chat server .docx
17 Spring 2018 Assignment 3 Chat server .docx
 
Configuration sending mails from sap
Configuration sending mails from sapConfiguration sending mails from sap
Configuration sending mails from sap
 
Sap solution manager change request management
Sap solution manager change request managementSap solution manager change request management
Sap solution manager change request management
 
Machine Problem 1: Let's chat
Machine Problem 1: Let's chatMachine Problem 1: Let's chat
Machine Problem 1: Let's chat
 
Ad basic tech_workshop
Ad basic tech_workshopAd basic tech_workshop
Ad basic tech_workshop
 
Delphi - Howto Services
Delphi - Howto ServicesDelphi - Howto Services
Delphi - Howto Services
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingCV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
 
12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting
 
Your notes DNA
Your notes DNAYour notes DNA
Your notes DNA
 
IBM SmartCloud Notes Mail Routing - 21st Oct
IBM SmartCloud Notes Mail Routing - 21st OctIBM SmartCloud Notes Mail Routing - 21st Oct
IBM SmartCloud Notes Mail Routing - 21st Oct
 
Clustering of Mule ESB
Clustering of Mule ESBClustering of Mule ESB
Clustering of Mule ESB
 
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docxAssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
 
HelpDesk Training Manual
HelpDesk Training ManualHelpDesk Training Manual
HelpDesk Training Manual
 
Component based message alerting on as abap scn
Component based message alerting on as abap   scnComponent based message alerting on as abap   scn
Component based message alerting on as abap scn
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730
 
New204
New204New204
New204
 

Mehr von Auro Infomation Technology (6)

test4
test4test4
test4
 
test4
test4test4
test4
 
test3
test3test3
test3
 
test2
test2test2
test2
 
Sdd 4
Sdd 4Sdd 4
Sdd 4
 
Sdd 2
Sdd 2Sdd 2
Sdd 2
 

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.