DOC PREVIEW
UB CSE 421 - Chat Application Using Nachos Networking Module

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

7. Deliverables and gradingWhen you complete your project, remove all executables and object files. If you want me to read a message with your code, create a README.NOW file and place it in the nachos code directory. Tar and compress the code, and submit the file using the online submission system. It is important that you follow the design guidelines presented for the system calls. I will be running my own shells and test programs against your code to determine how accurately you designed your lab, and how robust your answers are. Grading for the implementation portion will depend on how robust and how accurate your solution is. Remember, the user should not be able to do anything to corrupt the system, and system calls should trap as many error conditions as possible.LOGIN <nickname>SEND <message>Project 3 CSE421/521: Introduction to Operating System Fall 2003Due Date: 12/6/2002 by midnightChat Application Using Nachos Networking Module11. Objectives: - Learn to work with Nachos networking for communication among processes.- Define and implement a “chat” protocol for interaction between a chat server and a chat client. 2. Problem Statement:Chat rooms have become a popular way to support a forum for n-way conversation or discussionamong a set of people with interest in a common topic. Chat applications range from simple, text-basedones to entire virtual worlds with exotic graphics. In this project you are required to implement a simpletext-based chat client/server application.3. Problem Description:Email, newsgroup and messaging applications provide means for communication among peoplebut these are one-way mechanisms and they do not provide an easy way to carry on a real-timeconversation or discussion with people involved. Chat room extends the one-way messaging concept toaccommodate multi-way communication among a set of people. 4. Nachos networking infrastructureNachos networking packages implements a very simple Unix domain (not internet domain),datagram socket. The files of importance to this project and their purpose are described below. threads directory:lockcond.h, lockcond.cc: for defining and implementing lock and condition synchronizationprimitives; needed for network applications to work.machine directory:network.h, network.cc: Data structures to emulate a physical network connection. The networkprovides the abstraction of ordered, unreliable, fixed-size packet delivery to other machines on thenetwork.You may note that the interface to the network is similar to the console device -- both are fullduplex channels. sysdep.h, sysdep.cc : Interprocess communication operations, for simulating the network; Unix socketscreation, binding, closing etc. are called here to provide nachos socket functionality. network directory:post.h, post.cc: postoffice and mailbox, mail message definition and implementation. nettest.cc: application to test communication between host id 0 and host id 1 (these are hardcoded!)1 Created by B.Ramamurthy and C.Egert for Unix Socket programming. Adapted by B.Ramamurthy as Nachos project.15. Chat Architecture:A chat application consists of a Chat Client (CC) one per person, a Chat Server (CS) and a two-way communication pipeline between the client and the server to send and receive conversational, control and status messages.Figure 1: Chat Application Overview5.1 Chat Client:Typical features of a CC include: (i) select chat server (server id), (ii) select a nickname for interaction and (iii) ability to set and change user preferences such as number of messages displayed, change nickname, etc. You may design your own chat user interface. Implementation notes:(i) The server id is specified at command line (nachos –rs 1234 –m selfid –o serverid ) while executing the nachos process representing the client.(ii) Once the client process is running it could interactively ask the user for the nickname of the chat userand update this information locally and if needed by your design on the server.5.2 Chat Server:A chat server supports the set of clients for a room, by maintaining client handle (clientid innachos –rs –m clientId –o serverid), and client name. Server also has a message interpreter thatparses the message received from a client and delegates the command to the appropriate module.Sample architecture for the chat application is shown in Figure 2. You may change thearchitecture to suit your design.2ChatClientsChat ServerMsgsStatusControlUser InterfaceMsgProcessorSenderReceiverChat ClientReceiverMsgInterpreterClientMgrMsgMakerSenderChat ServerFigure 2: Chat Application ArchitectureThe Chat client receives the user messages and user configuration set up commands and passes them to the server. Sometimes it is also possible to process some of the commands (Ex: Number of messages displayed) locally. MsgProcessor in Figure 2 Chat Client is responsible for interpreting messages from the user. Sender and receiver are for communicating with the server. Messages are constructed as described in the protocol below.A chat server receives the commands and messages from the chat clients and processes them. MsgInterpreter is for unpacking, parsing and delegating the commands to the appropriate units on the server side. MsgMaker constructs the messages to be sent back according to the protocol described below.We will use nachos sockets for communication between the server and the client.Chat Protocol:Protocols such as TCP and HTTP provide rules for communication. They specify details of message formats; they describe how an application responds when a message arrives, and how to handle abnormal and error conditions. We describe the protocol we will use for the chat service in Section 8.6. Implementation DetailsPhase 1: Study all the code associated with the nachos networking.Phase 2: Perquisites: Lock and Condition: (15%) Implement the lock and condition the skeleton forwhich are in threads directory. Test it. Run the nettest application in network directory by opening uptwo xterms/terminals and running two nachos processes (network id 0, 1) communicating with eachother.1. Implement lock and condition.32. Go into network directory, gmake3. Run nachos on two xterm/terminals using these commands: nachos –rs 1234 –m 0 –o 1nachos –rs 1234 –m 1 –o 04. You will observe the two processes sending messages and


View Full Document

UB CSE 421 - Chat Application Using Nachos Networking Module

Documents in this Course
Security

Security

28 pages

Threads

Threads

24 pages

Security

Security

20 pages

Security

Security

52 pages

Security

Security

20 pages

Load more
Download Chat Application Using Nachos Networking Module
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Chat Application Using Nachos Networking Module and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Chat Application Using Nachos Networking Module 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?