Professional Documents
Culture Documents
Part 2
A Software Architecture
is an Abstraction
•Implicit Invocation-
• instead of invoking a procedure directly, a component
can announce (or broadcast) one or more events.
• Other components in the system can register an
interest in an event by associating a procedure with the
event.
• When the event is announced the system itself invokes
all of the procedures that have been registered for the
event.
• Thus an event 'implicitly' causes the invocation of
procedures in other modules."
Software Architecture styles
•Layered
• A layered system is organized hierarchically, each layer
serving the layer above. In some systems, inner layers
are hidden in all but the adjacent outer layer.
•Interpreter
•Process-Control
•Client/Server
Can a system have
more that one structure?
• Yes.
• For small systems the architecture may be trivial.
• For large systems it definitely exists in the software
product, but may not have been documented.
Why is Software Architecture Important?
Development
Logical View
View
Business
Scenarios Analysts
Integrators Infrastructure
Engineers
• Why scenarios:
• A mechanism to discover the key architectural elements and connectors
• Validation of the architecture design after the other views are created
• Addresses the concerns of both the functional and non-functional
requirements
State of Practice
Style
An architectural style represents a family of
related systems
Defines the design vocabulary (and
constraints) for the components, connectors,
ports, roles, bindings and properties.
Architectural Styles of
Software Systems
• Components:
• A central data structure representing the current state of the system.
• A collection of independent components that operate on the central data
structure.
• Connectors:
• Typically procedure calls or direct memory accesses.
Repository Style (Cont’d)
Memory Access
Computation
Shared Data
Memory
Repository Style Specializations
• Information Systems
• Programming Environments
• Graphical Editors
• AI Knowledge Bases
• Reverse Engineering Systems
Repository Style Advantages
object
obj obj
obj
obj
obj
obj
obj
obj
Object-Oriented Invariants
• Distributed Objects
• Objects with Multiple Interfaces
Object-Oriented Advantages
filter
pipes
Pipe and Filter Invariants
Network
• File Servers:
• Primitive form of data service.
• Useful for sharing files across a network.
• The client passes requests for files over the network to the file server.
Client-Server Style
Examples (Cont’d)
• Database Servers:
• More efficient use of distributing power than file servers.
• Client passes SQL requests as messages to the DB server; results are
returned over the network to the client.
• Query processing done by the server.
• No need for large data transfers.
• Transaction DB servers also available.
Client-Server Style
Examples (Cont’d)
• Object Servers:
• Objects work together across machine and network boundaries.
• ORBs allow objects to communicate with each other across the network.
• IDLs (Interactive Data Language) define interfaces of objects that
communicate via the ORB.
• ORBs are the evolution of the RPC.
RPCs Versus ORBs
Client Server
Client Server
Object X Object Y
call foo Code Data call foo call foo Data Data
on on
Object X Object Y Code Code
execute foo
Broadcasting System
Implicit Invocation Invariants
Useful System
sets of
procedures
Basic Utilities
Core Layer
procedure
calls
Layered Style Specializations
Plain Cooked
Socket
File Cooked Raw Raw TTY
Block Block TTY
File Interface Interface Interface Line
Protocols
System Disc.
Network
Block Device Driver Character Device Driver
Interface
Hardware
Layered Style Advantages
Memory
Current State
inputs Program
of
Being
Program Being
Interpreted
Interpreted
Computation
State Machine store
selected
outputs instruction Current
Execution State of
Engine Execution
Selected Engine
data (fetch)
Interpreter Style Examples
Java Bytecode
Source Verifier
Code
Class
Loader
Java Interpreter
Compiler
INTERNET Run-time
Environment
Java Hardware
Bytecode
Interpreter Style Disadvantages
Queue Manager
put get
A B
Queue
Programs Communicating via a Queue on
the Same Workstation
Queue Manager
put
A
Transmission Queue
Channel
Queue Manager
get
B
Queue
Programs Communicating via a Queue on
Different Workstations
• The destination queue manager puts the message on the queue that
is specified by program A.
• Once a message is placed on the destination queue, the queue
manager can invoke program B automatically and B can then get the
queued message.
Using MQSeries to Create a Server that
Handles a Single Service S1
Trigger
Client
Request Queue
Manager
(QM) S1
Data
(Response)
R
Scaling-Up to Multiple Queues and Services
Q1
Trigger
Q2 S1
Client Data
Requests Trigger (Response)
Queue
Manager S2
(QM)
Data
R (Response)
Q3
S3
Trigger
CORBA
• The skeleton code transforms the call and parameters into the
required implementation-specific format before calling the object.
CORBA Platform Independence
• The client may only invoke methods that are specified in the CORBA
object’s interface.
• Object interfaces are defined using OMG’s Interface Definition
Language (IDL).
• Different ORBs communicate via the Internet InterORB Protocol
(IIOP).
Server Objects in CORBA
S1 S2 S3 S4
Adapter
(CORBA OBJECT)
ORB
Object Adapters in CORBA
Client
objects
Server objects
Object
adapter
Interface
CORBA services
repository