Download Press here - DePaul University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
DCOM/CORBA/JAVA(RMI) TECHNOLOGIES
5 Questions & Answers
Q.1 How do RMI clients contact remote RMI servers?
For an RMI client to contact a remote RMI server, the client must first hold a
reference to the server.
The "Naming.lookup" method call is the most common mechanism by which clients
initially obtain references to remote servers. Remote references may be
obtained by other means, for example: all remote method calls can return remote
references.
This is what "Naming.lookup" does; it uses a well-known stub to make a remote
method call to the "rmiregistry", which sends back the remote reference to the
object requested by the "lookup" method.
Every remote reference contains a server hostname and port number that allow
clients to locate the virtual machine that is serving a particular remote
object. Once an RMI client has a remote reference, the client will use the
hostname and port provided in the reference to open a socket connection to the
remote server.
Please note that with RMI the terms client and server can refer to the same Java
program. A Java program that acts as an RMI server contains an exported remote
object. An RMI client is a program that invokes one or more methods on a remote
object in another Java Virtual Machine (JVM). If a JVM performs both of these
functions, it may be referred to as an RMI client and an RMI server.
Q.2 At what point is there a "live" connection between the client and the server
and how are connections managed?
When a client does a "lookup" operation, a connection is made to the rmiregistry
on the specified host. In general, a new connection may or may not be created
for a remote call.
Connections are cached by the RMI-transport for future use, so if a connection
is free to the right destination for a remote call, then it is used.
A client cannot explicitly close a connection to a server, since connections are
managed at the RMI-transport level. Connections will time out if they are
unused for a period of time.
Q.3 What are the underlying remoting protocols used by DCOM/CORBA/Java(RMI)
technologies and how does a client object activate a server object?
DCOM uses the Object Remote Procedure Call(ORPC) as it’s underlying remoting
protocol. In DCOM, when a client object needs to activate a server object, it
can do a CoCreateInstance()CORBA uses the Internet Inter-ORB Protocol(IIOP) as its underlying remoting
protocol. In CORBA, when a client object needs to activate a server object, it
binds to a naming or a trader service.
Java/RMI uses the Java Remote Method Protocol(JRMP) as it’s underlying remoting
protocol. In Java/RMI, When a client object needs a server object reference, it
has to do a lookup() on the remote server object's URL name.
Q.4 When you develop a web application to access database, how many approaches
can you come up with? Explain the Pros/Cons of each.
Traditionally, you can use the HTML 'form' on the client side and run a CGI
program on the server which access the database via ODBC/JDBC. If there are too
many CGI programs to run on the server, the server will be overwhelmed.
You can write an applet which runs in the web browser and access database
directly via JDBC. That means you have to install some JDBC driver for the
specific database product you are using on the client.
You can write an applet which access a CORBA server object by issuing ORB
request. Many vendors are integrating ORB with web browsers. In this case, you
will implement a CORBA server object which probably run on the machine where the
database resides. Once database is wrapped by CORBA object, it becomes directly
accessible from web browser. And in my opinion, this approach is more flexible,
manageable, scalable.
Q.5 Describe similarities and differences between CORBA and DCOM
Similarities:




Both are based on the object model and a solution to distributed computing.
Both utilize the interface concept and utilize an IDL.
Both use static and dynamic calls from clients to servers.
Both use a repository to locate objects and invoke them (CORBA calls it the
Interface Repository and DCOM calls it a Type Library).
Differences:




DCOM uses the DCE RPC as the basic transport mechanism between remote objects
where as CORBA can use both RPC and TCP/IP.
DCOM uses the universal unique ID (UUID), to locate and invoke objects where
as CORBA uses object references and repository to locate and invoke objects.
DCOM uses, in addition to IDL, Object Definition Language(ODL), for defining
metadata where as CORBA uses a single IDL for everything.
DCOM favors Microsoft Windows where as CORBA doesn't assume any platform.