Unit 2 PPT Slides: Lecture1 Slide 2
Unit 2 PPT Slides: Lecture1 Slide 2
MWT
lecture1 slide 2
MIDDLE WARE TECHNOLOGIES
B.TECH III YR II SEMESTER(TERM 08-09)
UNIT 2 PPT SLIDES
TEXT BOOKS:
1.Client/Server programming with Java and
CORBA Robert Orfali and Dan Harkey, John
Wiley & Sons,SPD 2nd Edition
2. Java programming with CORBA 3rd Edition,
G.Brose, A Vogel and K.Duddy, Wiley-
dreamtech, India John wiley and sons
lecture1 slide 2
INDEX UNIT 2 PPT SLIDES
lecture1 slide 2
UNIT2 syllabus
• Review of JAVA concepts like RMI,
• RMI API,JDBC,client/server CORBA-
style,the object web,CORBA with java
lecture1 slide 2
RMI
• RMI is the technology is used to invoke
remote objects from client
• The java RMI is an object-oriented
mechanism from sun Microsystems for
building distributed client/server
applications.
• Java RMI is an RPC implementation in
java
lecture1 slide 1
Distributed object systems
• Java RMI
• CORBA
• DCOM
• SOAP
lecture1 slide 2
Review of Java concepts - RMI
lecture1 slide 3
Review of Java concepts - RMI
lecture1 slide 4
Review of Java concepts - RMI
lecture 2 slide 1
Review of Java concepts - RMI
lecture 2 slide 2
Message-passing paradigm
lecture 2 slide 3
Distributed Object paradigm
lecture 2 slide 4
Illustration
lecture 3 slide 1
An archetypal Distributed object architecture
lecture 3 slide 2
An archetypal Distributed object architecture
lecture 3 slide 4
Steps in a Remote Procedure Call
lecture 4 slide 1
note
1. Since its introduction in 1980s, RPC has been widely
in use in n/w apps.
2. Two prevalent APIs – The open N/W Computing RPC
(Sun Micro – early 80s) and Open Group Distributed
Computing Environment (DCE) RPC.
3. Both provide a tool rice, for transforming remote
procedure calls to local procedure calls to the sub.
4. RPC APIs employ syntax for procedural or function
calls and are suitable for procedural languages such
as C.
5. For an object oriented language like Java, RPC is not
suitable – Java provides the RMI API; which is object-
oriented and has a syntax that is more accessible than
RPC.
lecture 4 slide 2
RMI
• RMI is an object-oriented implementation of the RPC model.
• Using RMI, an object server exports a remote object and registers it with a
directory service.
• An object client accesses the object by invoking its methods; using syntax
similar to local method invocations.
lecture 4 slide 3
The API for the Java RMI
lecture 4 slide 4
Review of JDBC
• SQL-Level
• 100% Pure Java
• Keep it simple
• High-performance
• Leverage existing database technology
– why reinvent the wheel?
• Use strong, static typing wherever possible
• Use multiple methods to express multiple
functionality
lecture 5 slide 1
JDBC Drivers
• Type I: “Bridge”
• Type II: “Native”
• Type III: “Middleware”
• Type IV: “Pure”
lecture 5 slide 2
Type I Drivers
• Use bridging technology
• Requires installation/configuration on
client machines
• Not good for Web
• e.g. ODBC Bridge
lecture 5 slide 3
Type II Drivers
• Native API drivers
• Requires installation/configuration on
client machines
• Used to leverage existing CLI libraries
• Usually not thread-safe
• Mostly obsolete now
• e.g. Intersolv Oracle Driver, Web Logic
drivers
lecture 5 slide 4
Type III Drivers
• Calls middleware server, usually on
database host
• Very flexible -- allows access to multiple
databases using one driver
• Only need to download one driver
• But it’s another server application to install
and maintain
• e.g. Symantec DBAnywhere
lecture 5 slide 5
Type IV Drivers
• 100% Pure Java -- the Holy Grail
• Use Java networking libraries to talk
directly to database engines
• Only disadvantage: need to download a
new driver for each database engine
• e.g. Oracle, mSQL
lecture 6 slide 1
Client/Server CORBA style
1. The Common Object Request Broker Architecture
(CORBA) is the most ambitious middleware project
ever undertaken by our industry.
lecture 6 slide 3
Distributed CORBA Object:
lecture 6 slide 4
Benefits of CORBA ORB
1. Static and Dynamic method invocations.
2. High-level language bindings.
3. Self-describing system – run-time metadata.
4. Local/Remote transparency.
5. Built-in security and transactions.
6. Polymorphic messaging.
7. Coexistence with existing systems –
separation of an object’s definition from its
implementation is perfect for encapsulating
existing applications.
lecture 6 slide 5
Benefits of CORBA ORB
1. Static and Dynamic method invocations:
A CORBA ORB lets you either statically define
your method invocations at compile time, or it
lets you dynamically discover them at run time.
So you either get strong type checking at
compile time or maximum flexibility associated
with late (runtime) binding. Most other forms
of middleware only support static bindings.
lecture 7 slide 1
Benefits of CORBA ORB
2. High-level language bindings:
A CORBA ORB lets you invoke methods on server
objects using your high-language of choice. It doesn’t
matter what language server objects are written in.
CORBA separates interface from implementation and
provides language-neutral data types that make it
possible to call objects across language and OS
boundaries.
In contrast, other types of middleware typically
provide low-level, language-specific, API libraries. And
they don’t separate implementation from specification
– the API is tightly bound to the implementation, which
makes it very sensitive to changes.
lecture 7 slide 2
Benefits of CORBA ORB
3. Local/Remote Transparency:
An ORB can run in stand-alone mode on a laptop, or it
can be interconnected to every other ORB in the
Universe using CORBA 2.0’s Internet Inter-ORB
Protocol (IIOP) services.
lecture 7 slide 3
Benefits of CORBA ORB
4. Self-describing system:
CORBA provides run-time meta data for describing
every server interface known to the system. Every
CORBA ORB must support an Interface Repository
that contains the real-time information describing the
functions a server provides and their parameters.
Metadata is useful for clients to discover how to
invoke services at run-time; and tools to generate code
“on-the-fly”.
The meta data is generated automatically either by
an IDL-language pre-compiler or by compilers that
know how to generate IDL directly from an OO
language.
ex: Visigenic/Netscape’s Caffeine generates
lecture 7 slide 4
Benefits of CORBA ORB
5. Built-in security and transactions:
The ORB includes context information in its messages to handle security
and transactions across machine and ORB boundaries.
6. Polymorphic messaging:
An ORB invokes a function on a target object – that is, the same function
call will have different effects, depending on the object that receives it.
ex: configure-yourself method invocation behaves differently when
applied to a database object versus a printer object.
7. Coexistence with existing systems:
CORBA’s separation of an object’s definition from its implementation is
perfect for encapsulating existing applications.
Using CORBA IDL, you can make your existing code look like an object
on the ORB, even if it is implemented in stored procedures, CICS, IMS,
or COBOL.
This makes CORBA an evolutionary solution. You can write your new
apps as pure objects and encapsulate existing apps with IDL wrappers.
lecture 7 slide 5