tcs slides

28
CHAT SERVER CHAT SERVER developed at developed at :- :- TATA CONSULTANCY SERVICES, TATA CONSULTANCY SERVICES, Hyderabad Hyderabad Submitted Submitted by by :- :- Jalaj Mathur Jalaj Mathur B.E IVth year B.E IVth year

Upload: api-3848496

Post on 10-Apr-2015

449 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 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

Page 2: TCS Slides

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

Page 3: TCS Slides

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.

Page 4: TCS Slides

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.

Page 5: TCS Slides

BASIC PROCESSBASIC PROCESS

SERVERSERVER

IDLE STATE

ACCEPT

IDLE STATE

REQUEST

ACKNOWLEGDE

CLIENT

connection

Page 6: TCS Slides

DATA FLOW DIAGRAMDATA FLOW DIAGRAM

SERVER

SEND MESSAGE

MESSAGE WINDOW

CLIENT 1 CLIENT 2

CLIENT 3

READ BY SERVER

BROADCAST TO ALL CLIENTS

Page 7: TCS Slides

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

Page 8: TCS Slides

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.

Page 9: TCS Slides

CHAT SERVERCHAT SERVER

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

RMI serverRMI server RMI clientRMI client

Page 10: TCS Slides

RMI ARCHITECTURERMI ARCHITECTURE

CLIENT

STUB

RRL

TRANSPORT LAYER

SERVER

SKELETON

RRL

TRANSPORT LAYER

JVM JVM

Page 11: TCS Slides

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.

Page 12: TCS Slides

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

Page 13: TCS Slides

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.

Page 14: TCS Slides

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.

Page 15: TCS Slides

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.

Page 16: TCS Slides

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

Page 17: TCS Slides

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.

Page 18: TCS Slides

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.

Page 19: TCS Slides

PROJECT SCREENSPROJECT SCREENS

Page 20: TCS Slides
Page 21: TCS Slides
Page 22: TCS Slides
Page 23: TCS Slides
Page 24: TCS Slides
Page 25: TCS Slides
Page 26: TCS Slides
Page 27: TCS Slides
Page 28: TCS Slides

THANK YOUTHANK YOU