Integrative Programming and Technologies: Intersystem Communications

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Integrative Programming and Technologies

Chapter 0ne (1)


Intersystem Communications
 Architectures for integrating systems
 DCOM, CORBA, and RMI
Object-oriented Middleware Technologies

Intersystem communication

 The ability of two or more computer systems to share input, output, and storage devices,
and to send messages to each other by means of shared input and output channels.

 A middleware component is software that connects two other separate applications.

e.g. middleware component b/n database vs webserver

The term middleware is used to describe separate products that serve as the glue between two
applications.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 2


research
Middleware Components and Middleware
Distributed object technologies(middleware)

 Distributed Component Object Model (DCOM),

Common Object Request Broker Architecture (CORBA)

Java Remote Method Invocation (Java RMI)

The above technologies have the following characteristics


 Portability
 Platform independence
 Wide use
 Database independence
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 3
research
Distributed Object Technologies

 A distributed system is a system in which hardware or software


components located at networked computers communicate and
co-ordinate their actions only by passing messages.
 Even if the components are located apart and are heterogeneous
systems a distributed system acts as a single coherent system.
 All three distributed object technologies are based on a
client/server approach.
 The object services offered by all three approaches are defined
through interfaces.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 4


research
Distributed Object Technologies

 Interface is defined as a collection of named operations,


each with a defined signature and optionally a return type.
 The interface serves as a contract between the server and
client.
 Distributed Object Technologies or Distributed Object
Computing (DOC) integrates heterogeneous applications.
 Many Distributed Object Technologies such as DCOM,
CORBA model and Java RMI are used to invoke a remote
method, a code placed far from the calling client, also known
as remoting.
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 5
research
Remoting

oc o t
s P jec
l
ce s O b
r ot
Ac ple
ot ct
Pr b j e
ol

Sim
oc
ss O
ce le
Ac imp
S

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 6


research
Remoting
To invoke a remote method,
The client makes a call to the client-side proxy or stub.
The client-side proxy packs the call parameters into a request message and
invokes a wire protocol to ship the message to the server.
At the server side, the wire protocol delivers the message to the server-side
stub.
The server-side stub then unpacks the message and calls the actual method
on the object.

 In both CORBA and Java RMI, the server stub is called the skeleton and client stub is
called the stub or proxy.
 In DCOM, the client stub is called the proxy and the server stub is called the stub.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 7


research
CORBA (Common Object Request BrokerArchitecture)

 It depends on an Object Request Broker (ORB), a central


bus over which CORBA objects interact transparently.
 To request a service, A CORBA client acquires an object
reference to a CORBA server object.
 The client then makes method calls on the object reference as
if the CORBA server object resided in the client’s address
space.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 8


research
CORBA (Common Object Request BrokerArchitecture)
 The ORB finds a CORBA object’s implementation, prepares it to receive
requests, communicates the requests, and carries the replies back to the client.
 CORBA can be used on a range of operating system platforms, from hand-held
devices to mainframes.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 9


research
CORBA (Common Object Request BrokerArchitecture)
 A client that wants to access a server object should first bind it
through a CORBA interface.
 The client makes a bind request to a local Object Request Broker
(ORB) through CORBA interfaces.
 If the object exists at the local machine, the ORB activates locally the
object that processes the request.
 Otherwise, the ORB makes a request to the other ORBs connected by
the network using the Internet Inter ORB Protocol (IIOP) over
TCP/IP.
 After binding the appropriate object, the client side ORB sends the
requested method call to the server side ORB.
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 10
research
CORBA (Common Object Request BrokerArchitecture)
 Before sending and receiving parameters, a stub performs marshalling
and a skeleton performs unmarshalling at the CORBA.
CORBA has the 2 server types
 Basic Object Adapter (BOA) and
 Portable Object Adapter (POA).
 A BOA type was the early model, and its ambiguity caused many
different implementations at an early stage.
 A POA type as developed to solve this incompatibility problem, and
came to be a standard.
 CORBA is the most used middleware standard in the non-Windows
market.
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 11
research
CORBA (Common Object Request BrokerArchitecture)
 It standardized by Object Management Group(OMG) in 1989.
 They can't be used in most of web environments due to protection policies.
Benefits of CORBA
 Programming-language independent interface
 Legacy integration
 Rich distributed object infrastructure
 Location transparency
 Network transparency
 Direct object communication
 Dynamic Invocation Interface

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 12


research
DCOM (Distributed Component Object Model)
 DCOM is as an extension of the Component Object Model (COM), a
Microsoft framework that supports program component objects.
 It is developed by Microsoft.
 DCOM supports remoting objects through a protocol named Object
Remote Procedure Call (ORPC).
 ORPC is a layer that interacts with COM’s run-time services.
 A DCOM server is a body of code capable of serving up particular
objects at run-time.
 Each DCOM server object supports multiple interfaces, each of
which represent a different behavior of the object.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 13


research
DCOM (Distributed Component Object Model)
 COM is the world most widely used component software model and
dominates the desktop market.
 A client that wants to access a server object calls a COM runtime
through COM interfaces, which checks the client's permissions by
invoking a security provider.
 If the client has the appropriate permissions, the COM runtime invokes
the Distributed Computing Environment Remote Procedure Call (DCE
RPC) that uses the underlying protocol stack as one of communication
methods.
 Before invoking a DCE RPC, a client side COM runtime performs a
marshalling through a proxy that converts parameters into the form
that could be transferred over the designated protocol.
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 14
research
DCOM (Distributed Component Object Model)

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 15


research
DCOM (Distributed Component Object Model)
 The protocol stack on the server side receives the request, delivers it
to the COM runtime, which performs an unmarshalling through a
stub that converts network packets into parameters.
 The COM runtime activates the server object that calls the object
method and processes the request.
 A server object has the 3 types such as an inproc, a local, and a
service type.
 An inproc type takes the form of a Dynamic Linking Library (DLL).
 An inproc type is the fastest type because it is loaded directly into a
client process when activated.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 16


research
DCOM (Distributed Component Object Model)
 A local type takes an executable form. When activated, it is executed
as a separate process.
 A service type is also similar to the local type in that both of them
take executable forms.
 But different from the local type in that the service type is always
resident in a memory, and receives a request from a client.
 In order to export the methods of a server object, a server object
should describe itself by using an Interface Description Language
(IDL).
 DCOM can't be used in most of web environments due to protection
policies.
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 17
research
DCOM (Distributed Component Object Model)

Benefits of DCOM
 Large User Base and Component Market
 Binary Software Integration
 Large-scale software reuse
 Cross-language software reuse
 On-line software update
 Allows updating a component in an application without recompilation, re-linking or even restarting
 Multiple interfaces per object
 Wide selection of programming tools available, most of which provide automation of
standard code

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 18


research
Java RMI (Java Remote Method Invocation )
 Java/RMI: - Java/Remote Method Invocation is a standard
developed by sun microsystem.
 RMI supports remote objects by running on a protocol called the Java
Remote Method Protocol (JRMP).
 The Java server object defines interfaces that can be used to access
the object outside the current Java virtual machine (JVM) from
another JVM.
 A RMI registry on the server machine holds information of the
available server objects and provides a naming service for RMI.
 A client acquires a server object reference through the RMI registry
on the server and invokes methods on the server object.
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 19
research
Java RMI (Java Remote Method Invocation )

 When a Java/RMI client requests a service from the


Java/RMI server. It perform
 Initiates a connection with the remote JVM containing the
remote object
 Marshals the parameters to the remote JVM,
 Waits for the result of the method invocation,
 Unmarshals the return value or exception returned, and
 Returns the value to the caller.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 20


research
Java RMI (Java Remote Method Invocation )

 To declare remote access to server objects in Java, every server


object must implement the java.rmi.Remote interface.
java.rmi.server.RemoteObject and its subclasses,
java.rmi.server.RemoteServer,
java.rmi.server.UnicastRemoteObject and
java.rmi.activation.Activatable provide RMI server functions
like hashCode, equals, toString.
 Java/RMI can be used on a diversity of platforms and operating
systems as long as there is a JVM implementation on the
platform.

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 21


research
Java RMI (Java Remote Method Invocation )

Benefits of RMI:
 Support seamless remote invocation on objects in different virtual
machines
 Make differences between the distributed object model and local Java
object model apparent
 Make writing reliable distributed applications as simple as possible
 Preserve the safety provided by the Java runtime environment
 Single language
 Free

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 22


research
DCOM, CORBAand RMI comparison
  CORBA DCOM Java/RMI
Similarity1: - To maximize reusability and rapid application development, component based
Component based approach is applied. Component based approach heavily depends on interface
methodology definition. OMG IDL, COM IDL, and so called Java IDL (simply mapping for Java to
the OMG IDL) are used.

Similarity2: - Components can be distributed over network.


Distributed Network
Similarity3: - All services provide some sort of registry or repository to help locate
Naming and locating the corresponding service.
service
Dissimilarity1: - Multiple vendor support Microsoft with some third Sun microsystem with other
Vendor and players parties vendors
Dissimilarity2: - A variety of languages Some languages such as Java
Language VB/ VC++ / MS-Java
Dissimilarity3: - Platform independent with Win32 Platform independent
Platform specification by JVM
Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 23
research
Laboratory
Chatting Application using socket programming!
Using Java

Mr. Husen Adem, Ambo University || Woliso Campus, Ethiopia TREY 24


research
Thank You
Question?
Husen Adem
+251925100878
[email protected]
IPT

TREY 25
research

You might also like