TCS Slides

Post on 10-Apr-2015

438 views 2 download

Transcript of TCS Slides

CHAT SERVERCHAT SERVER

developed atdeveloped at:-:-

TATA CONSULTANCY SERVICES, TATA CONSULTANCY SERVICES, HyderabadHyderabad

Submitted bySubmitted by:-:-

Jalaj MathurJalaj Mathur

B.E IVth yearB.E IVth year

CHAT SERVERCHAT SERVER

The Chat Server is a software which allows exchange of information between two or more then two clients

It is an good example showing a small model of how messages can be send from one user to another

CHAT SERVERCHAT SERVER

ADVANTAGES OF THE PROJECT :-ADVANTAGES OF THE PROJECT :-Provides a good graphical interface to the Provides a good graphical interface to the

user to chat to its neighbouring computers.user to chat to its neighbouring computers.

No need of typing the command again & No need of typing the command again & again at the command-prompt.again at the command-prompt.

CHAT SERVERCHAT SERVER

Useful features of JAVA used are RMI Useful features of JAVA used are RMI (Remote Method Invocation) and Applet (Remote Method Invocation) and Applet Viewer.Viewer.

BASIC PROCESSBASIC PROCESS

SERVERSERVER

IDLE STATE

ACCEPT

IDLE STATE

REQUEST

ACKNOWLEGDE

CLIENT

connection

DATA FLOW DIAGRAMDATA FLOW DIAGRAM

SERVER

SEND MESSAGE

MESSAGE WINDOW

CLIENT 1 CLIENT 2

CLIENT 3

READ BY SERVER

BROADCAST TO ALL CLIENTS

CHAT SERVERCHAT SERVER

R.M.I.R.M.I.

Remote Method Invocation.Remote Method Invocation.One JVM invokes methods located in One JVM invokes methods located in

another JVM.another JVM. It is an easy alternative of using Server-It is an easy alternative of using Server-

Socket programming & Multi-threadingSocket programming & Multi-threading

CHAT SERVERCHAT SERVER

R.M.I.R.M.I.

Implemented on the Middle-Tier of the 3-Implemented on the Middle-Tier of the 3-Tier Architecture.Tier Architecture.

CHAT SERVERCHAT SERVER

2 Components of distributed RMI 2 Components of distributed RMI application :-application :-

RMI serverRMI server RMI clientRMI client

RMI ARCHITECTURERMI ARCHITECTURE

CLIENT

STUB

RRL

TRANSPORT LAYER

SERVER

SKELETON

RRL

TRANSPORT LAYER

JVM JVM

STUB/SKELETON LAYERSTUB/SKELETON LAYER

It listens to remote method calls made by It listens to remote method calls made by a client & redirects it to the remote RMI a client & redirects it to the remote RMI services on the Server.services on the Server.

STUBSTUB

Client side proxy representing remote Client side proxy representing remote object.object.

It communicates method invocations to the It communicates method invocations to the remote object through Skeleton remote object through Skeleton (implemented on Server.)(implemented on Server.)

SKELETONSKELETON

It is server side proxy that continues It is server side proxy that continues communication with Stub by:-communication with Stub by:-

Reading parameters of method call.Reading parameters of method call.Making the call to the remote service Making the call to the remote service

implementation object.implementation object.Accepting return value.Accepting return value.Writing the return value back to the Stub. Writing the return value back to the Stub.

REMOTE REFERENCE LAYERREMOTE REFERENCE LAYER

Interprets & manages references made by Interprets & manages references made by a Client to remote object on the server.a Client to remote object on the server.

Its main function is that of Marshalling.Its main function is that of Marshalling.

MARSHALLING :-Process in which MARSHALLING :-Process in which parameters passed by Client are parameters passed by Client are converted to a format that can be converted to a format that can be transferred across a network.transferred across a network.

TRANSPORT LAYERTRANSPORT LAYER

Link between RRL on Server side & RRL Link between RRL on Server side & RRL on Client side.on Client side.

Responsible for setting up new Responsible for setting up new connections & managing existing connections & managing existing connections.connections.

CHAT SERVERCHAT SERVER

Server Remote Server Remote – remote interface for chat – remote interface for chat serverserver

ClientRemoteClientRemote- remote interface for chat - remote interface for chat clientclient

ChatServerChatServer- class that implements - class that implements ServerRemote interfaceServerRemote interface

ChatClientChatClient- class that implements - class that implements ClientRemote interfaceClientRemote interface

RMI PACKAGESRMI PACKAGES

java.rmijava.rmi : provides Remote interface, a : provides Remote interface, a class for accessing names registered on class for accessing names registered on the server & a security manager for rmi.the server & a security manager for rmi.

java.rmi.registryjava.rmi.registry : provides classes & : provides classes & interface used by remote registry. interface used by remote registry.

RMI PACKAGESRMI PACKAGES

java.rmi.serverjava.rmi.server : provides classes & : provides classes & interface used to implement remote interface used to implement remote objects, stubs,skeletons & support for rmi objects, stubs,skeletons & support for rmi communicationcommunication

java.rmi.dgcjava.rmi.dgc : provides classes & : provides classes & interfaces used by RMI-interfaces used by RMI-distributed distributed garbage collector.garbage collector.

PROJECT SCREENSPROJECT SCREENS

THANK YOUTHANK YOU