Вы находитесь на странице: 1из 28

CHAT SERVER

developed at:-
TATA CONSULTANCY SERVICES,
Hyderabad

Submitted by:-
Jalaj Mathur
B.E IVth year
CHAT 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 SERVER
ADVANTAGES OF THE PROJECT :-
 Provides a good graphical interface to the
user to chat to its neighbouring computers.

 No need of typing the command again &


again at the command-prompt.
CHAT SERVER
Useful features of JAVA used are RMI
(Remote Method Invocation) and Applet
Viewer.
BASIC PROCESS
SERVER CLIENT

IDLE STATE

REQUEST

ACCEPT

ACKNOWLEGDE
IDLE STATE connection
DATA FLOW DIAGRAM
SERVER
READ BY
SERVER
BROADCAST TO
ALL CLIENTS
SEND MESSAGE

MESSAGE WINDOW

CLIENT 3

CLIENT 1 CLIENT 2
CHAT SERVER
R.M.I.

 Remote Method Invocation.


 One JVM invokes methods located in
another JVM.
 It is an easy alternative of using Server-
Socket programming & Multi-threading
CHAT SERVER
R.M.I.

 Implemented on the Middle-Tier of the 3-


Tier Architecture.
CHAT SERVER
2 Components of distributed RMI
application :-

 RMI server
 RMI client
RMI ARCHITECTURE
JVM JVM

CLIENT
SERVER

STUB
SKELETON

RRL
RRL

TRANSPORT LAYER
TRANSPORT LAYER
STUB/SKELETON LAYER
 It listens to remote method calls made by
a client & redirects it to the remote RMI
services on the Server.
STUB
 Client side proxy representing remote
object.
 It communicates method invocations to
the remote object through Skeleton
(implemented on Server.)
SKELETON
It is server side proxy that continues
communication with Stub by:-
 Reading parameters of method call.
 Making the call to the remote service
implementation object.
 Accepting return value.
 Writing the return value back to the Stub.
REMOTE REFERENCE LAYER
 Interprets & manages references made by
a Client to remote object on the server.
 Its main function is that of Marshalling.

MARSHALLING :-Process in which


parameters passed by Client are
converted to a format that can be
transferred across a network.
TRANSPORT LAYER
 Link between RRL on Server side & RRL
on Client side.
 Responsible for setting up new
connections & managing existing
connections.
CHAT SERVER
Server Remote – remote interface for chat
server
ClientRemote- remote interface for chat
client
ChatServer- class that implements
ServerRemote interface
ChatClient- class that implements
ClientRemote interface
RMI PACKAGES
java.rmi : provides Remote interface, a
class for accessing names registered on
the server & a security manager for rmi.

java.rmi.registry : provides classes &


interface used by remote registry.
RMI PACKAGES
java.rmi.server : provides classes &
interface used to implement remote
objects, stubs,skeletons & support for rmi
communication

java.rmi.dgc : provides classes &


interfaces used by RMI-distributed
garbage collector.
PROJECT SCREENS
THANK YOU

Вам также может понравиться