SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
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.




                         Server GUI with sample messages displayed.




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.
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.

Mais conteúdo relacionado

Mais procurados

How to simplify Email oriented workflow with - Visendo SMTP Extender
How to simplify Email oriented workflow with - Visendo SMTP Extender How to simplify Email oriented workflow with - Visendo SMTP Extender
How to simplify Email oriented workflow with - Visendo SMTP Extender Johannes Cosmin dumitru
 
E mail protocol - SMTP
E mail protocol - SMTPE mail protocol - SMTP
E mail protocol - SMTPMd Syed Ahamad
 
CFIMAP & CFPOP
CFIMAP & CFPOPCFIMAP & CFPOP
CFIMAP & CFPOPisummation
 
Imap(internet massege access protocaols)
Imap(internet massege access protocaols)Imap(internet massege access protocaols)
Imap(internet massege access protocaols)shashikant pabari
 
10135 a 05
10135 a 0510135 a 05
10135 a 05Bố Su
 
Mail server using Linux(Ubuntu)
Mail server using Linux(Ubuntu)Mail server using Linux(Ubuntu)
Mail server using Linux(Ubuntu)Navjot Navi
 
Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp) Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp) RochakSrivastava3
 
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLSMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLVidhu Arora
 
Voice enable smtp client
Voice enable smtp clientVoice enable smtp client
Voice enable smtp clientNilesh Padwal
 
Information on protocols-email protocols
Information on protocols-email protocolsInformation on protocols-email protocols
Information on protocols-email protocolsPriyanka Shinde
 
SMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSIDDARAMAIAHMC
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer ProtocolMaitree Patel
 

Mais procurados (19)

Internet mail server
Internet mail server Internet mail server
Internet mail server
 
How to simplify Email oriented workflow with - Visendo SMTP Extender
How to simplify Email oriented workflow with - Visendo SMTP Extender How to simplify Email oriented workflow with - Visendo SMTP Extender
How to simplify Email oriented workflow with - Visendo SMTP Extender
 
E mail protocol - SMTP
E mail protocol - SMTPE mail protocol - SMTP
E mail protocol - SMTP
 
CFIMAP & CFPOP
CFIMAP & CFPOPCFIMAP & CFPOP
CFIMAP & CFPOP
 
Imap(internet massege access protocaols)
Imap(internet massege access protocaols)Imap(internet massege access protocaols)
Imap(internet massege access protocaols)
 
Mail server
Mail serverMail server
Mail server
 
10135 a 05
10135 a 0510135 a 05
10135 a 05
 
Symfony & Mailcatcher
Symfony & MailcatcherSymfony & Mailcatcher
Symfony & Mailcatcher
 
Mail server using Linux(Ubuntu)
Mail server using Linux(Ubuntu)Mail server using Linux(Ubuntu)
Mail server using Linux(Ubuntu)
 
SNMP/SMTP/MIME
SNMP/SMTP/MIMESNMP/SMTP/MIME
SNMP/SMTP/MIME
 
E mail flow
E mail flowE mail flow
E mail flow
 
Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp) Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp)
 
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLSMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
 
POP3 Post Office Protocol
POP3 Post Office ProtocolPOP3 Post Office Protocol
POP3 Post Office Protocol
 
Voice enable smtp client
Voice enable smtp clientVoice enable smtp client
Voice enable smtp client
 
Information on protocols-email protocols
Information on protocols-email protocolsInformation on protocols-email protocols
Information on protocols-email protocols
 
Smtp
SmtpSmtp
Smtp
 
SMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer Protocol
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 

Destaque (7)

ass2 of IP
ass2 of IPass2 of IP
ass2 of IP
 
ass3
ass3ass3
ass3
 
assignment
assignmentassignment
assignment
 
Sdd 4
Sdd 4Sdd 4
Sdd 4
 
Weather app
Weather appWeather app
Weather app
 
today
todaytoday
today
 
entity-presentation
entity-presentationentity-presentation
entity-presentation
 

Semelhante a ASS2

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
 
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
 
Machine Problem 1: Let's chat
Machine Problem 1: Let's chatMachine Problem 1: Let's chat
Machine Problem 1: Let's chatbutest
 
Topic3 Enterprise Application Integration
Topic3 Enterprise Application IntegrationTopic3 Enterprise Application Integration
Topic3 Enterprise Application Integrationsanjoysanyal
 
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
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPGenora Infotech
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02dvicky12
 
FME 2020 Unleashed: Automating
FME 2020 Unleashed: AutomatingFME 2020 Unleashed: Automating
FME 2020 Unleashed: AutomatingSafe Software
 
Configuration sending mails from sap
Configuration sending mails from sapConfiguration sending mails from sap
Configuration sending mails from sapvenkatesh88
 
12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshootingkratos1979
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
Presentation building the ibm®lotus®domino®8.5 infrastructure
Presentation   building the ibm®lotus®domino®8.5 infrastructurePresentation   building the ibm®lotus®domino®8.5 infrastructure
Presentation building the ibm®lotus®domino®8.5 infrastructurexKinAnx
 
Application Of A Server Hardening Essay
Application Of A Server Hardening EssayApplication Of A Server Hardening Essay
Application Of A Server Hardening EssayWinstina Kennedy
 
How to make a developer’s life easier – strategy pattern with the help of Gra...
How to make a developer’s life easier – strategy pattern with the help of Gra...How to make a developer’s life easier – strategy pattern with the help of Gra...
How to make a developer’s life easier – strategy pattern with the help of Gra...OCoderFest
 
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!NETWAYS
 
BLISS Problem Statement and Motivation
BLISS Problem Statement and MotivationBLISS Problem Statement and Motivation
BLISS Problem Statement and MotivationDan York
 

Semelhante a ASS2 (20)

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
 
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
 
Machine Problem 1: Let's chat
Machine Problem 1: Let's chatMachine Problem 1: Let's chat
Machine Problem 1: Let's chat
 
EJB Part-1
EJB Part-1EJB Part-1
EJB Part-1
 
Topic3 Enterprise Application Integration
Topic3 Enterprise Application IntegrationTopic3 Enterprise Application Integration
Topic3 Enterprise Application Integration
 
Your notes DNA
Your notes DNAYour notes DNA
Your notes DNA
 
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
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02
 
New204
New204New204
New204
 
OneTeam Media Server
OneTeam Media ServerOneTeam Media Server
OneTeam Media Server
 
FME 2020 Unleashed: Automating
FME 2020 Unleashed: AutomatingFME 2020 Unleashed: Automating
FME 2020 Unleashed: Automating
 
Configuration sending mails from sap
Configuration sending mails from sapConfiguration sending mails from sap
Configuration sending mails from sap
 
12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting12753028 scot-configuration-troubleshooting
12753028 scot-configuration-troubleshooting
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Presentation building the ibm®lotus®domino®8.5 infrastructure
Presentation   building the ibm®lotus®domino®8.5 infrastructurePresentation   building the ibm®lotus®domino®8.5 infrastructure
Presentation building the ibm®lotus®domino®8.5 infrastructure
 
Application Of A Server Hardening Essay
Application Of A Server Hardening EssayApplication Of A Server Hardening Essay
Application Of A Server Hardening Essay
 
How to make a developer’s life easier – strategy pattern with the help of Gra...
How to make a developer’s life easier – strategy pattern with the help of Gra...How to make a developer’s life easier – strategy pattern with the help of Gra...
How to make a developer’s life easier – strategy pattern with the help of Gra...
 
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
 
BLISS Problem Statement and Motivation
BLISS Problem Statement and MotivationBLISS Problem Statement and Motivation
BLISS Problem Statement and Motivation
 

Mais de 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

  • 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. Server GUI with sample messages displayed. 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.
  • 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.