System Architecture III
Distributed Objects
Real-Time: Software Considerations
• Low level language (e.g., C) where programmer has close
link to machine
Resource considerations may dictate software design and
implementation:
• Inter-process communication may be too slow (e.g., C
fork).
• May implement special buffering, etc., to control timings
2
Buffering Example: CD Controller
3 4 1
5
Input
block
2
Output
block 6 7
Circular buffer
3
Continuous Operation
Many systems must operate continuously
• Software update while operating
• Hardware monitoring and repair
• Remote operation
• Alternative power supplies, networks, etc.
These functions must be designed into the fundamental
architecture.
4
Example: Routers and Other Network
Computing
• Interoperation with third party devices
• Support for several versions of protocols
• Restart after total failure
• Defensive programming -- must survive
=> erroneous or malicious messages
=> extreme loads
• Time outs, dropped packets, etc.
• Evolution of network systems
5
Example: Transaction Monitor
messages
Transaction
monitor
processes
A transaction monitor: monitors transactions, routes
them across services, balances the load, restarts
transactions after failure.
6
Software Reuse: Application Packages
• Package supports a standard application (e.g., payroll, user
interface to Internet information, mathematical algorithms)
• Functionality can be enhanced by:
=> extensibility at defined interfaces
=> configuration parameters (e.g., table driven)
=> custom written source code extensions
7
Reuse: Object Object Oriented
Languages
Example:
Java is a relatively straightforward language with a very rich set
of class hierarchies.
• Java programs derive much of their functionality from
standard classes
• Learning and understanding the classes is difficult.
=> Inexperienced Java programmers write inelegant and
=> Java experts can write complex systems quickly
buggy programs
8
Reuse: Objects - Basic Definitions
• An object is a piece of code that owns attributes and
provides services through methods.
• The methods operate on instance data owned by the
object.
• A class is a collection of like objects.
9
Reuse: Objects - Characteristics
• Encapsulation. An object has a public interface that
defines how other objects or applications can interact
with it.
methods
public instance data
• Inheritance. Subclasses can be derived from parent
classes. They inherit or override the parents' methods
and instance data.
• Polymorphism. The effect of a method can vary
depending on the class that implements it (e.g.,
display_object)
10
Reuse: Objects - Object Binding
Binding is the linking of the software interface between two
objects.
• Static binding: The interface is determined at compile or
build time.
Straightforward
Allows type checking
• Dynamic binding or late binding: The link is established
at run time.
Flexible and extensible
Complex
11
Reuse: Objects - Distributed Objects
Objects on separate computers interact through method calls
and instance data.
Major systems:
• Microsoft family: OLE, COM, DCOM, Active X ...
• CORBA (Common Object Request Broker Architecture)
12
Desirable Properties of Distributed
Objects
• Reusable code: components
• Different languages and operating environments
• Future changes can be localized
• Architecture can be extensible
• Standard tools used for client/server interactions
13
Example: Fedora IDL
-- very simple Interface Definition Language
A research project to explore extensibility:
-- powerful tools for extensions
-- interoperability, Cornell and CNRI
http://www.cs.cornell.edu/cdlrg/fedora.html
14
Object Request Broker (ORB)
Objects Java Other Cobol C++ C
IDL IDL IDL Interface IDL IDL
Client
Server
Object Request Broker
15
Interface Definition Language
Naming context
module
{
;
;
;
Define a class
interface [:]
{
See next slide
}
Define a class
interface [:]
{ ..... }
{ 16
Interface Definition Language
(continued)
interface [:] Define a class
{
;
;
;
Define a method
Define a method
[()
[raises exception] [context];
....
[()
[raises exception] [context];
....
}
17
ORB: Programmer's View
Client Server
a
a
Object X Object Y
Invoke a
on
object X Invoke a
on
object Y
Object Request Broker
18
Object Request Broker (ORB)
• Static and dynamic method invocations
An ORB lets objects make requests to and receive response
from other objects located locally or remotely.
• High-level language bindings
• Self-describing system
• Local/remote transparency
Internet Inter-ORB Protocol (IIOP)
• Inter-ORB protocols
19
ORB: System View
Object
implementation Implementation
repository Client
Static
skeletons
Dynamic
invocation
Interface
repository
Object
adapter
Dynamic
invocation ORB
interface Client IDL
stubs
Object Request Broker
20
CORBA Services
• Naming service
• Event service
• Concurrency control service
• Transaction service
• Relationship service
• Externalization service
• Query service
• Life cycle service
• Persistence service
• Licensing service
• Properties service
• Security service
• Time service 21
Distributed Objects and the System
Life-Cycle
All large systems change with time.
• Dynamic binding of objects combined with polymorphism
permits the addition of extra object types, incremental
changes, etc. to be localized.
Development environments change with time.
• Language bindings and IIOP permit changes.
• Code can be reused in different environments.
Production environments changes with time.
22