SlideShare a Scribd company logo
1 of 71
Architecture Styles &
       Patterns
Architecture Styles & Patterns

Architectural Styles
      Defines ways of selecting and presenting
       architectural building blocks

Architectural Design Patterns
      Tried and tested high-level designs of
       architectural building blocks.

Choice of style and patterns used is requirement
dependent
Families of Architectural styles
 Call/Return
      Main Program/Subroutine
      Remote Procedure Call (RPC)
      Layered (API)
      Object Oriented
 Virtual Machine
      Interpreter
      Rule-based e.g. Prolog System
 Data-Flow
      Batch Sequential
      Pipe and Filter
 Data-Centered
      Repository
      Blackboard
 Independent Components (Loosely Coupled)
      Communicating Processes
      Event Based  Implicit Invocation, Explicit Invocation
Some Architectural Styles

                   Independent Components

   Communicating                                Event systems
     processes
                                      Implicit             Explicit
                                    invocation           invocation


         Data Flow                    Data-Centered
   Batch              Pipes
 sequential                        Repository         Blackboard
                    and filters


    Virtual Machine                     Call / Return
                                  Main program        Layered
                                  & subroutine
Interpreter        Rule-based
                    system            RPC             Object-
                                                      oriented
Call and Return architectures

 Achieve modifiability and scalability.
 Sub-styles:
      Main Program and Subroutine
          hierarchically decompose a program
          each component get control and data from its parent and
           pass it to children.
      Remote Procedure Call
          Main Program and Subroutine where parts are distributed
           on a network.
          Increase performance (multiple processors).
      Layered (accessed via API)
      Object Oriented
Main Program/Subroutine Style

Early goals: reuse, independent development
Example: hierarchical call/return style

                      Main Program



       Subroutine 1   Subroutine 2   Subroutine 3
Object-Oriented/Abstract Data Style
 Goals
      More natural modelling of real world
      Reuse by refinement (sub-classing & polymorphism)
 Encapsulation: Information hiding
 Objects
      Maintain data integrity
      Hide data representation
      Communicate through messages
 Advantages
      System is a set of independent agents
      Improve maintenance and evolution
      Good for reuse.
 Disadvantages
      For interaction, an objects must know the identity of the target
      Scale up can be inefficient and slow
Layered Hierarchies
 Goals: Increased Cohesion, Portability, Packaging, Standardization
  Examples: ISO Open Systems, 7 Layer model, TCP/IP, Motif
 Components:
  Hierarchical organization in layers
   
     Each layer provides services to the one outside it
   
     Each layer acts as a client to the layer inside it
   
     Some cases all layers have access to all or some other layers
   
     Other systems constrain access only to close layers
 Connectors:
  API and the protocols between layers.
 Advantages:
    Supports design by abstraction levels.
    Supports evolution: Easy to add and/or modify a current layer
 Disadvantages:
    System performance may suffer from unnecessary layering
     overhead (function calls)
    Not always easy to structure in clean layers.
    Requirements don't make it evidently clear
Data-Centered Style

                                  Shared
                                   Data




             Client                Client                Client

• Goals: Integrability, Scalability (new clients/data)

• Components
    - Central data store - current state.
    - Independent components operating on the data store.

 •
     Data Centered Repository: Traditional Database
     Transaction type selects and triggers the process for execution.
 •
     Blackboard
     Data Store’s State selects and triggers the process for execution.
Blackboard Architecture

Applications
    Complex data interpretation (signal processing,

     speech/pattern recognition)
    Shared access to data with loosely coupled agents



Components:
 Blackboard: To manage Central data
 Knowledge Sources
    Evaluate their applicability

    Compute a result

    Update Blackboard

 Control
    Monitor Blackboard

    Schedule Knowledge Sources activities
Blackboard Architecture Algorithm

             1. Start Control::loop
             2. Control::nextSource
             3. determine potential knowledge sources
                by calling Blackboard::inspect
             4. Invoke KnowledgeSource::execCondition
               of each candidate knowledge source
             5. Each candidate knowledge source
                invokes Blackboard::inspect to
                determine if/how it can contribute to
                current state of solution
             6. Control chooses a knowledge
                source to invoke by calling
                KnowledgeSource::execAction
             7. Executes
                 KnowledgeSource::updateBlackboard
             8. Calls Blackboard::inspect
             9. Calls Blackboard::update
Blackboard: Hearsay- A Speech Recognition System


   Input: waveform representation of speech
   Output: machine representation of phrases
Virtual Machine Style - Interpreters
Goal: Simulate non-native functionality for portability or
prototyping
Examples
       - Interpreters, e.g. Perl
       - Rule-based systems, e.g. Prolog
       - Command language processors
       - JVM (Intermediate language)
         inputs          Data                                  Program being
                    (Program State)                              Interpreted

                                                  State data
                    Data        Updates                               Program
                                                                      Instructions


          outputs    Interpretation   Selected instruction
                                                                  Internal
                         Engine       Selected data
                                                                    State
Microkernel
 Allows adaptability to changing system requirements
 Separates the functional core from extended
  functionality and customer-specific parts
 Selects and uses primitives to provide and implement
  new interfaces
 Offers communication facilities
 Encapsulates system dependencies
 Manages and control resources
  e.g. process creation and cloning.
Examples of Microkernals
 Chorus
 Windows NT – offers external servers for, OS/2, POSIX, Win32
  applications
 Mach
Microkernel
Microkernel Components
Internal Server:
    Extends the microkernel
        Implements additional services

        Encapsulates some system specifics

    Example: Drivers: device, comm etc
External Server:
     Uses Microkernel for implementing its own view of
      application domain (layer of abstraction on top of
      mechanisms), i.e.
        Provides programming interfaces for its clients

     Implement an existing application platform
      Example: OS/2 external server, UNIX external server
Microkernel Components
   Client
     An application associated with exactly one external
       server
   Adapter
    - An interface between clients and their external servers
    - Hides system dependencies from clients (e.g: Comm
    facilities)
    - Invokes methods of external servers on behalf of clients
    Example:
    External server implements OS/2,
    Adapter implements OS/2 programming interface
Microkernel
Independent Components

 Consists of independent processes or objects
  communicating through messages.
 No control between components.
 Achieve modifiability (decouple various portions of the
  computation).
 Include:
    Communicating Processes

       Possible topologies (ring, star, etc)
        Peer to Peer

        Client /Server.

      Event Systems:
          Implicit Invocation: based on change notification
          Explicit Invocation  Tight coupling
Middle Tier infrastructure (Middle-Ware)

 Connectivity software
   consists of a set of enabling services

   allow multiple processes running on one or

    more machines to interact across a network

 Examples:
    Object Management Group's Common Object

     Request Broker Architecture (CORBA),
    Microsoft's

     Component Object Model (COM), DCOM
Middleware: A More Effective Approach
             INTERNETWORKING ARCH
                                                                MIDDLEWARE ARCH




RTP           TFTP           FTP           HTTP
                                                                   Middleware
                                                                   Applications


       DNS                        TELNET


                                                                   Middleware
                                                                    Services
         UDP                       TCP




                       IP
                                                                   Middleware




                 Fibre Channel                        Solaris                     VxWorks




      Ethernet              ATM            FDDI   Win2K             Linux              LynxOS


        20th Century                                      21st Century
Middleware: A More Effective Approach
         Applications                          Applications                        Applications

        Sensors                            Controllers                          Actuators



     Domain-Specific                      Domain-Specific                     Domain-Specific
        Services                             Services                            Services



        Common                               Common                               Common
        Services                             Services                             Services



       Distribution                         Distribution                        Distribution
       Middleware                           Middleware                          Middleware



      Infrastructure                       Infrastructure                       Infrastructure
       Middleware                           Middleware                           Middleware


Operating                            Operating                            Operating
System                               System                               System


              Endsystem   Networks                 Endsystem   Networks                 Endsystem
Middle Tier Infrastructure (Middle-ware)
 Application Programming Interfaces (API)
  allow applications:
     Location transparently across the network,
      providing interaction with another application
      or service
     To be independent from network services
     To be reliable and available
     To scale up in capacity without losing
      functionality
Common Object Request Broker Architecture (CORBA)

  Specification of a standard architecture for
   Object Request Brokers (ORBs)
  Purpose
      Allow ORB products development that support
        Application portability and inter-operability
        Across different programming languages, hardware

         platforms, operating systems, and ORB
         implementations
Common Object Request Broker Architecture (CORBA)


  All objects defined in CORBA use an
   Interface Definition Language (IDL).
  Language mappings are defined from
   IDL  C, C++, Ada95, and Smalltalk80.
     Allows language heterogeneity


   IDL                          C++
   Interface MineToCee          Class MineToCee:
   { void myOper (long ArgA);   public vitural CORBA::Object
   }                            { virtual void myOper (CORBA::long ArgA);
                                 }
Common Object Request Broker Architecture (CORBA)
Common Object Request Broker Architecture (CORBA)


  ORB Core - CORBA runtime infrastructure.
  ORB Interface - Standard interface (defined in IDL)
   to functions provided by all CORBA- compliant
   ORBs.
  IDL Stubs
     Generated by the IDL processor for each interface

      defined in IDL
     Hide low-level networking details of object

      communication from the client,
     Present a high-level, object type-specific

      application programming interface (API).
Common Object Request Broker Architecture (CORBA): Details 1


  Object Request Broker (ORB):
 - Decouples Client from Service
            Location and Functional Transparency
 - Client requests appear to him to be local procedure
   calls.
    When a client invokes an operation, the ORB is responsible
   for finding the object implementation, transparently
   activating it if necessary, delivering the request to the
   object, and returning any response to the caller.
  ORB Interface –
   A set of tasks and libraries providing functions for
 - Converting object references to strings and vice versa,
 - Creating argument lists for requests made through the
   Dynamic Invocation Interface (DII)
Common Object Request Broker Architecture (CORBA): Details 2


    CORBA IDL Stubs and Skeletons:
    - Client Side is called IDL Stub
    - Server Side is called IDL Skeleton

    + Produced by IDL Compiler in the target programming
      language
    + Stubs and the Skeleton are the ``glue'' between the client
      and server applications, and the ORB.
    + Only allows remote invocation through RPC (Remote
      Procedure Calls). RPC’s can be implemented by
      providing the address pointer to the client to the (server)
      procedure it needs to invoke.
Common Object Request Broker Architecture (CORBA): Details 3


How to Implement Remote Procedure Calls

      Clientj                              Servant
                      Invoke request
                                                     Locate service
                 Return RPC address to j             Remember Client j
                                                     Get address of service
                       Invoke RPC
                                                Execute            Proc1
                                                                   Proc2
                Ship Result to Client j
                                                 Result            Proc3
                                                                   Proc4
Common Object Request Broker Architecture (CORBA): Details 4


      Dynamic Invocation Interface (DII) Client Side
      This interface allows a client to directly access
      services provided by the ORB.

      Applications use the DII to dynamically issue
      requests to objects without requiring IDL
      interface-specific stubs to be linked in.

      Unlike IDL stubs (which only allow RPC-style
      requests), the DII also allows clients to make

      -Non-blocking requests
      -Oneway (send-only) calls.
Common Object Request Broker Architecture (CORBA): Details 4

Dynamic Skeleton Interface (DSI) – Server side

Allows an ORB to deliver requests
to an object implementation that
does not have compile-time knowledge of
the type of the object it is implementing.

The client making the request has no idea whether
the implementation is using the type-specific
IDL skeletons or is using the dynamic skeletons.

Object Adapter
Assists the ORB with delivering requests to the object and
activating the object. The Adapter hides the details of the
object, e.g. whether it is a DB object or a library object.
IDL Use Example HelloWorld:
              Interface, Component and Home


                                         IDL Definitions for
interface Hello
{                                       • Interface Hello
  void sayHello (in string username);
};
                                        •Component:
                                        HelloWorld
component HelloWorld supports Hello
{
};                                      •Home
home HelloHome manages HelloWorld       Management:
{                                       HelloHome
};
                                        (You also need a
                                        Client for HelloWorld
                                        component)
Simple HelloWorld & HelloHome Executors

interface Hello                       class HelloHome_Impl
{ void sayHello                         : public virtual HelloHome,
   (in string username);                  public virtual
};                                        CORBA::LocalObject
component HelloWorld supports Hello   { public:
                                        HelloHome_Impl () {}
{};                                     ~HelloHome_Impl () {}
home HelloHome manages HelloWorld
{};
class HelloWorld_Impl                 Components::EnterpriseComponent_ptr
  : public virtual HelloWorld,
    public virtual                        create ()
    CORBA:: LocalObject                   { return new HelloWorld_Impl ();
{ public:                                 }
  HelloWorld_Impl () {}               };
  ~HelloWorld_Impl () {}
                                      •    Implement behaviors of HelloWorld
 void sayHello (const char *usern)         component
    { cout << “Hello World from ”
           << usern                   •    Implement a lifecycle management
           << endl;                        strategy of HelloWorld component
    }                                 •    Client will call HelloWorld
};                                         Component
CLIENT for Helloworld Component

Int main (int argc, char *argv[])             1. Obtain object reference
{CORBA::ORB_var orb =                            to home
        CORBA::ORB_init (argc, argv);         2. Create component
CORBA::Object_var obj =                       3. Invoke remote method
 orb->resolve_initial_references
                           ("NameService");   4. Remove component
CosNaming::NamingContextExt_var                  instance
nc CosNaming::NamingContextExt::              5. Clients don’t always
                              _narrow(obj);      manage component
obj = nc->resolve_str ("HelloHome");             lifecycle directly
HelloHome_var hh = HelloHome::_narrow(obj);
    HelloWorld_var hw = hh->create ();
                                              OUTPUT
    hw->sayHello (“John”);
                                              $>./hello-client
    hw->remove ();
                                              Hello World from John
    return 0;
}
Other Brokers:
    Microsoft’s Component Object Model (COM, DCOM)


 COM
   Framework for integrating components.

   Allows developers to build systems by assembling

     reusable components from different vendors.
 Distributed COM (DCOM)
   For distributed network-based interactions.

 OLE (Object Linking & Embedding), ActiveX, MTS
   Higher-level application services built on top of

     COM
MS, Component Object Model (COM, DCOM)

 OLE
  Provides services (Object Linking and Embedding) used in
  the creation of compound documents (documents generated
  from multiple tool sources)
 ActiveX
  extension to allow components to be embedded in Web sites.
 MTS
  extension with enterprise services (e.g: transaction, security)
  to allow Enterprise Information Systems (EIS) to be built using
  COM components.
 COM+
    Integrates MTS services and message queuing into COM,

      and makes COM programming easier
    integration with Visual Basic, Visual C++, J++
MS, Component Object Model (COM, DCOM)

 Services implemented by COM objects are
 exposed through a set of interfaces
   COM defines a binary structure for the

    interface between the client and the object.
   COM objects and interfaces specified using

    Microsoft Interface Definition Language
    (IDL)
Other Brokers: Component Object Model (COM, DCOM)
Component Object Model (COM, DCOM)

 Every COM object runs inside a server:
    In-process server: client and server execute in the

     same process
    Local Object Proxy: server running in a different

     process but on the same machine.
       Communication through inter-process
        communication.
    Remote Object Proxy: remote server on another

     machine.
       Communication through DCE RPC (supported by
        DCOM).
    All COM objects are registered with a component

     database.
Component Object Model (COM, DCOM)

All COM objects are registered with the component
database.
Peer-to-Peer Architecture
 No distinction between processes (nodes)
 Each maintain
     its own data-store, as well as
     a dynamic routing table of addresses of other
      nodes
 Examples: gnutella, freenet.
Event-Based (Implicit Invocation)
 Some components announce (broadcast) events
 Other components register interest in events
    Associate a routine to each event, automatically

     executed when the event is produced.
 A part of the system is in charge of transmitting events
  between producers and consumers.

 Semantic constraints
    Announcers of events don't know which components

     are affected
    No assumption about order of processing

 Uses:
    Integrate tools

    Ensure database consistency
Event-Based (Implicit Invocation)

 Advantages
    High reuse potential

    Ease evolution

 Disadvantages
    Components/Procedures have to register for an event

    No insurance that an event will be treated

    Exchange of data

       a shared repository is often needed.
    Difficult to reason about system correctness.

    Compiler can no longer do early detection

    Difficulty to trace without debugging tools

    Data typing becomes very weak
Client/Server Architectures
Advantages
   - Users only get information on demand
   - Design addresses presentation details
   - Different ways to view the same data
Disadvantages
   - Need for more sophisticated security, systems
   management
   - Applications development requires more resources to
   implement
   - Distribution Problems
Types:
Tier 1: User system interface
Tier 2: Middle-tier provides
   Process management (business logic and rules execution)
   and
   Functions (e.g: queuing, application execution, and
   database staging)
One & Two Tier Client/Server Architectures

Processing management split between user system interface
environment and database management server environment.

Tier 1: user system interface: In user's desktop environment
Tier 2: database management services: In a server

Limitations
   Performance deteriorate when number of clients is large
   (>100 users)
   Flexibility and choice of DBMS for applications reduced (by
   process management at server level – stored procedures)
   Limited flexibility in moving program functionality between
   servers
Three Tier Client/Server Architecture
• Centralizes process logic
• Improve performance, flexibility, maintainability, reusability,
  and scalability
• Changes must only be written once and placed on the
  middle tier server to be available throughout the system
• Distributed database integrity more easily enforced
• Access to resources based on names
Proxy Pattern
 Proxy:
  Is a representative, surrogate or placeholder
  for another object (a server object)
 Allows:
     transparency and simplicity of access to servers
         e.g: to make calls to remote objects with the same
          syntax as a local call
     run-time efficiency, cost-effectiveness, safety
Proxy Pattern - Components

 Client
     uses interface provided by proxy to request
      services
 Original (RealSubject)
     implements a service
 Proxy
     provides the interface of the original to clients
     ensures a safe, efficient and correct access to the
      original
 AbstractOriginal (Subject)
     abstract base class for proxy and original
Proxy Pattern - Components
Proxy Pattern - Variants

 Remote Proxy
     Local representative for an object in a
      different address space
 Cache Proxy
     Local clients can share results from remote
      components
 Protection Proxy
     Controls access to the original object
 Firewall Proxy
     Controls access from outside world.
Broker Pattern

 Client-Server pattern to:
      hide system/implementation details from clients
     allow remote, location-transparent service access
     allow exchange, addition, deletion of components at
      run-time
 Examples of implementations
     CORBA
     OLE (On Line Extension)
     COM/DCOM (MS Component Object Model)
Broker Pattern - Components
Broker Pattern - Components
 Client
    Implements user functionality

    Sends requests to servers through a client-side

     proxy
 Server
    Implements services

    Registers itself with the local broker

    Sends responses and exceptions back to client

     through server-side proxy
Broker Pattern - Components

 Broker:
    (un-)register servers

    offers APIs

    transfers messages

    ensures error recovery

    interoperates with other brokers

    locates servers

 Related Pattern, Bridge:
    encapsulates network-specific functionality

    mediates between local broker and remote broker
Broker Pattern - Components
 Client-side Proxy
     Encapsulates system-specific functionality
     Mediates between client and broker
 Server-side Proxy
     Calls services within server
     Encapsulates system-specific functionality
     Mediates between server and broker
Broker Pattern – Runtime (High-level)
Broker Pattern – Runtime (Detailed)
Observer Pattern
Data Flow Patterns
 Achieve reuse and modifiability
 System is a succession of transformations on pieces of
  input data
 Include:
    Batch Sequential

       Components, independent programs, execute and

        complete one after the other.
       Data transmitted as a whole between steps.

    Pipes and Filters

       incremental transformation of data by successive

        components.
       Data flows as a stream between between

        components.
Pipes and Filters
   Filters
    Read a stream of data on its inputs and produce a stream
    of data on its outputs.
   Connectors (pipes)
    Transmit output produced by filters to other filters.
Pipe & Filter example: Compiler
                   ASCII program text
         Lexical Analyzer
                   token stream
          Syntax Analyzer
                   abstract syntax tree

         Semantic Analyzer
                   program

     Intermediate Code Generator

                    optimized program
Process Control Systems
 Continually running system used for maintaining correct
  values. The errors are compensated for through feedback.
 Examples
    Temperature control system

    Power plant control system

 Variables
    Process variables

       properties of the process that can be measured

       value obtained by sensors
    Controlled variables

       process variables whose value the system intend to
        control
    Reference value (set point)

       desired value for a controlled variable
Process Control Architectures

 Open Loop system
     doesn't use information about process
      variables to adjust the system.
     rarely suited to physical processes in the real
      world.
 Closed Loop system
     uses information about process variables to
      manipulate process variables in order to
      compensate for variations in process
      variables and operation conditions.
Process Control (Closed Loop)
 Feedback control system
     Measures a controlled variable
     Adjusts the process accordingly to keep it
      near an acceptable set point
Process Control (Closed Loop)
 Feedforward control system
     Anticipate changes to controlled variables
      by monitoring other process variables.
Process Control - Issues
   Computational elements
      process definition (include mechanisms for changing

       process variables)
      control algorithm (how to decide when and how to make

       changes)
   Data elements (process variables, set point)
   Control loop scheme
    (open-loop, closed-feedback, closed-feed forward)

Drawbacks - One must decide
   What variables to monitor
   What sensors to use
   How to calibrate them
   How to deal with timing of sensing and control
Domain-Specific Architectures
 Library of different architecture styles
 Provides information for new systems in
  the same area
 Avoids rework on already known
  assumptions and relationships

Heterogeneous systems.
     Locational
     Simultaneous
     Hierarchical
Example: Locational Heterogeneity

 A-7E used a cooperating process style in
  function drivers and call/return style
  elsewhere.
Example: Hierarchical Heterogeneity
 Event system is a Blackboard, but, when
  decomposed, the component shows a
  layered style
Example: Simultaneous Heterogeneity

 A-7E simultaneously used layered,
  cooperating process, and object-based styles

More Related Content

What's hot

Tutorial on J2EE versus .NET for .NET Programmers
Tutorial on J2EE versus .NET for .NET Programmers Tutorial on J2EE versus .NET for .NET Programmers
Tutorial on J2EE versus .NET for .NET Programmers David Freitas
 
Linaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISALinaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISAPatrick Bellasi
 
Mission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsMission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsIvano Malavolta
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdpMohd Arif
 
Cs556 section2
Cs556 section2Cs556 section2
Cs556 section2farshad33
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitivesStudent
 
An Introduction to OpenSAF 5.17.2011
An Introduction to OpenSAF 5.17.2011An Introduction to OpenSAF 5.17.2011
An Introduction to OpenSAF 5.17.2011OpenSAF Foundation
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Sri Prasanna
 
Chapter 15 distributed mm systems
Chapter 15 distributed mm systemsChapter 15 distributed mm systems
Chapter 15 distributed mm systemsAbDul ThaYyal
 
OpenSAF Symposium - Intro to OpenSAF_9.13.11
OpenSAF Symposium - Intro to OpenSAF_9.13.11OpenSAF Symposium - Intro to OpenSAF_9.13.11
OpenSAF Symposium - Intro to OpenSAF_9.13.11OpenSAF Foundation
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess CommunicationDeepak H L
 
OOP - Basing Software Development on Reusable
OOP - Basing Software Development on Reusable OOP - Basing Software Development on Reusable
OOP - Basing Software Development on Reusable 17090AshikurRahman
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 

What's hot (20)

Distributed System
Distributed System Distributed System
Distributed System
 
Middleware
MiddlewareMiddleware
Middleware
 
Tutorial on J2EE versus .NET for .NET Programmers
Tutorial on J2EE versus .NET for .NET Programmers Tutorial on J2EE versus .NET for .NET Programmers
Tutorial on J2EE versus .NET for .NET Programmers
 
On MQ Series & JMS
On MQ Series & JMSOn MQ Series & JMS
On MQ Series & JMS
 
Linaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISALinaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISA
 
Middleware
MiddlewareMiddleware
Middleware
 
Mission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsMission planning of autonomous quadrotors
Mission planning of autonomous quadrotors
 
Technical Architectures
Technical ArchitecturesTechnical Architectures
Technical Architectures
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdp
 
Cs556 section2
Cs556 section2Cs556 section2
Cs556 section2
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitives
 
An Introduction to OpenSAF 5.17.2011
An Introduction to OpenSAF 5.17.2011An Introduction to OpenSAF 5.17.2011
An Introduction to OpenSAF 5.17.2011
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)
 
Middleware Technologies ppt
Middleware Technologies pptMiddleware Technologies ppt
Middleware Technologies ppt
 
Chapter 15 distributed mm systems
Chapter 15 distributed mm systemsChapter 15 distributed mm systems
Chapter 15 distributed mm systems
 
OpenSAF Symposium - Intro to OpenSAF_9.13.11
OpenSAF Symposium - Intro to OpenSAF_9.13.11OpenSAF Symposium - Intro to OpenSAF_9.13.11
OpenSAF Symposium - Intro to OpenSAF_9.13.11
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess Communication
 
OOP - Basing Software Development on Reusable
OOP - Basing Software Development on Reusable OOP - Basing Software Development on Reusable
OOP - Basing Software Development on Reusable
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 

Similar to Arch stylesandpatternsmi

Software architecture unit 4
Software architecture unit 4Software architecture unit 4
Software architecture unit 4yawani05
 
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...netvis
 
Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Waqar Sheikh
 
SystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptxSystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptxBlackGoku18
 
SDN - a new security paradigm?
SDN - a new security paradigm?SDN - a new security paradigm?
SDN - a new security paradigm?Sophos Benelux
 
Client Server Architecture
Client Server ArchitectureClient Server Architecture
Client Server ArchitectureRence Montanes
 
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014SAMeh Zaghloul
 
EU-Taiwan Workshop on 5G Research, PRISTINE introduction
EU-Taiwan Workshop on 5G Research, PRISTINE introductionEU-Taiwan Workshop on 5G Research, PRISTINE introduction
EU-Taiwan Workshop on 5G Research, PRISTINE introductionICT PRISTINE
 
Network Monitoring System ppt.pdf
Network Monitoring System ppt.pdfNetwork Monitoring System ppt.pdf
Network Monitoring System ppt.pdfkristinatemen
 
network monitoring system ppt
network monitoring system pptnetwork monitoring system ppt
network monitoring system pptashutosh rai
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)Sri Prasanna
 
SDN, OpenFlow, NFV, and Virtual Network
SDN, OpenFlow, NFV, and Virtual NetworkSDN, OpenFlow, NFV, and Virtual Network
SDN, OpenFlow, NFV, and Virtual NetworkTim4PreStartup
 
dotnet_remoting
dotnet_remotingdotnet_remoting
dotnet_remotingOPENLANE
 

Similar to Arch stylesandpatternsmi (20)

Software architecture unit 4
Software architecture unit 4Software architecture unit 4
Software architecture unit 4
 
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
 
Unit_2_Midddleware_2.ppt
Unit_2_Midddleware_2.pptUnit_2_Midddleware_2.ppt
Unit_2_Midddleware_2.ppt
 
Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.
 
SystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptxSystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptx
 
Netkit
NetkitNetkit
Netkit
 
SDN - a new security paradigm?
SDN - a new security paradigm?SDN - a new security paradigm?
SDN - a new security paradigm?
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Client Server Architecture
Client Server ArchitectureClient Server Architecture
Client Server Architecture
 
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
 
EU-Taiwan Workshop on 5G Research, PRISTINE introduction
EU-Taiwan Workshop on 5G Research, PRISTINE introductionEU-Taiwan Workshop on 5G Research, PRISTINE introduction
EU-Taiwan Workshop on 5G Research, PRISTINE introduction
 
Network Monitoring System ppt.pdf
Network Monitoring System ppt.pdfNetwork Monitoring System ppt.pdf
Network Monitoring System ppt.pdf
 
network monitoring system ppt
network monitoring system pptnetwork monitoring system ppt
network monitoring system ppt
 
Ead pertemuan-7
Ead pertemuan-7Ead pertemuan-7
Ead pertemuan-7
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
 
Middleware
MiddlewareMiddleware
Middleware
 
Middleware1
Middleware1Middleware1
Middleware1
 
Remote Web Desk
Remote Web DeskRemote Web Desk
Remote Web Desk
 
SDN, OpenFlow, NFV, and Virtual Network
SDN, OpenFlow, NFV, and Virtual NetworkSDN, OpenFlow, NFV, and Virtual Network
SDN, OpenFlow, NFV, and Virtual Network
 
dotnet_remoting
dotnet_remotingdotnet_remoting
dotnet_remoting
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Arch stylesandpatternsmi

  • 2. Architecture Styles & Patterns Architectural Styles  Defines ways of selecting and presenting architectural building blocks Architectural Design Patterns  Tried and tested high-level designs of architectural building blocks. Choice of style and patterns used is requirement dependent
  • 3. Families of Architectural styles  Call/Return  Main Program/Subroutine  Remote Procedure Call (RPC)  Layered (API)  Object Oriented  Virtual Machine  Interpreter  Rule-based e.g. Prolog System  Data-Flow  Batch Sequential  Pipe and Filter  Data-Centered  Repository  Blackboard  Independent Components (Loosely Coupled)  Communicating Processes  Event Based  Implicit Invocation, Explicit Invocation
  • 4. Some Architectural Styles Independent Components Communicating Event systems processes Implicit Explicit invocation invocation Data Flow Data-Centered Batch Pipes sequential Repository Blackboard and filters Virtual Machine Call / Return Main program Layered & subroutine Interpreter Rule-based system RPC Object- oriented
  • 5. Call and Return architectures  Achieve modifiability and scalability.  Sub-styles:  Main Program and Subroutine  hierarchically decompose a program  each component get control and data from its parent and pass it to children.  Remote Procedure Call  Main Program and Subroutine where parts are distributed on a network.  Increase performance (multiple processors).  Layered (accessed via API)  Object Oriented
  • 6. Main Program/Subroutine Style Early goals: reuse, independent development Example: hierarchical call/return style Main Program Subroutine 1 Subroutine 2 Subroutine 3
  • 7. Object-Oriented/Abstract Data Style  Goals  More natural modelling of real world  Reuse by refinement (sub-classing & polymorphism)  Encapsulation: Information hiding  Objects  Maintain data integrity  Hide data representation  Communicate through messages  Advantages  System is a set of independent agents  Improve maintenance and evolution  Good for reuse.  Disadvantages  For interaction, an objects must know the identity of the target  Scale up can be inefficient and slow
  • 8. Layered Hierarchies  Goals: Increased Cohesion, Portability, Packaging, Standardization Examples: ISO Open Systems, 7 Layer model, TCP/IP, Motif  Components: Hierarchical organization in layers  Each layer provides services to the one outside it  Each layer acts as a client to the layer inside it  Some cases all layers have access to all or some other layers  Other systems constrain access only to close layers  Connectors: API and the protocols between layers.  Advantages:  Supports design by abstraction levels.  Supports evolution: Easy to add and/or modify a current layer  Disadvantages:  System performance may suffer from unnecessary layering overhead (function calls)  Not always easy to structure in clean layers.  Requirements don't make it evidently clear
  • 9. Data-Centered Style Shared Data Client Client Client • Goals: Integrability, Scalability (new clients/data) • Components - Central data store - current state. - Independent components operating on the data store. • Data Centered Repository: Traditional Database Transaction type selects and triggers the process for execution. • Blackboard Data Store’s State selects and triggers the process for execution.
  • 10. Blackboard Architecture Applications  Complex data interpretation (signal processing, speech/pattern recognition)  Shared access to data with loosely coupled agents Components:  Blackboard: To manage Central data  Knowledge Sources  Evaluate their applicability  Compute a result  Update Blackboard  Control  Monitor Blackboard  Schedule Knowledge Sources activities
  • 11. Blackboard Architecture Algorithm 1. Start Control::loop 2. Control::nextSource 3. determine potential knowledge sources by calling Blackboard::inspect 4. Invoke KnowledgeSource::execCondition of each candidate knowledge source 5. Each candidate knowledge source invokes Blackboard::inspect to determine if/how it can contribute to current state of solution 6. Control chooses a knowledge source to invoke by calling KnowledgeSource::execAction 7. Executes KnowledgeSource::updateBlackboard 8. Calls Blackboard::inspect 9. Calls Blackboard::update
  • 12. Blackboard: Hearsay- A Speech Recognition System  Input: waveform representation of speech  Output: machine representation of phrases
  • 13. Virtual Machine Style - Interpreters Goal: Simulate non-native functionality for portability or prototyping Examples - Interpreters, e.g. Perl - Rule-based systems, e.g. Prolog - Command language processors - JVM (Intermediate language) inputs Data Program being (Program State) Interpreted State data Data Updates Program Instructions outputs Interpretation Selected instruction Internal Engine Selected data State
  • 14. Microkernel  Allows adaptability to changing system requirements  Separates the functional core from extended functionality and customer-specific parts  Selects and uses primitives to provide and implement new interfaces  Offers communication facilities  Encapsulates system dependencies  Manages and control resources e.g. process creation and cloning. Examples of Microkernals  Chorus  Windows NT – offers external servers for, OS/2, POSIX, Win32 applications  Mach
  • 16. Microkernel Components Internal Server: Extends the microkernel  Implements additional services  Encapsulates some system specifics Example: Drivers: device, comm etc External Server:  Uses Microkernel for implementing its own view of application domain (layer of abstraction on top of mechanisms), i.e.  Provides programming interfaces for its clients  Implement an existing application platform Example: OS/2 external server, UNIX external server
  • 17. Microkernel Components  Client An application associated with exactly one external server  Adapter - An interface between clients and their external servers - Hides system dependencies from clients (e.g: Comm facilities) - Invokes methods of external servers on behalf of clients Example: External server implements OS/2, Adapter implements OS/2 programming interface
  • 19. Independent Components  Consists of independent processes or objects communicating through messages.  No control between components.  Achieve modifiability (decouple various portions of the computation).  Include:  Communicating Processes Possible topologies (ring, star, etc)  Peer to Peer  Client /Server.  Event Systems:  Implicit Invocation: based on change notification  Explicit Invocation  Tight coupling
  • 20. Middle Tier infrastructure (Middle-Ware)  Connectivity software  consists of a set of enabling services  allow multiple processes running on one or more machines to interact across a network  Examples:  Object Management Group's Common Object Request Broker Architecture (CORBA),  Microsoft's Component Object Model (COM), DCOM
  • 21. Middleware: A More Effective Approach INTERNETWORKING ARCH MIDDLEWARE ARCH RTP TFTP FTP HTTP Middleware Applications DNS TELNET Middleware Services UDP TCP IP Middleware Fibre Channel Solaris VxWorks Ethernet ATM FDDI Win2K Linux LynxOS 20th Century 21st Century
  • 22. Middleware: A More Effective Approach Applications Applications Applications Sensors Controllers Actuators Domain-Specific Domain-Specific Domain-Specific Services Services Services Common Common Common Services Services Services Distribution Distribution Distribution Middleware Middleware Middleware Infrastructure Infrastructure Infrastructure Middleware Middleware Middleware Operating Operating Operating System System System Endsystem Networks Endsystem Networks Endsystem
  • 23. Middle Tier Infrastructure (Middle-ware)  Application Programming Interfaces (API) allow applications:  Location transparently across the network, providing interaction with another application or service  To be independent from network services  To be reliable and available  To scale up in capacity without losing functionality
  • 24. Common Object Request Broker Architecture (CORBA)  Specification of a standard architecture for Object Request Brokers (ORBs)  Purpose  Allow ORB products development that support  Application portability and inter-operability  Across different programming languages, hardware platforms, operating systems, and ORB implementations
  • 25. Common Object Request Broker Architecture (CORBA)  All objects defined in CORBA use an Interface Definition Language (IDL).  Language mappings are defined from IDL  C, C++, Ada95, and Smalltalk80.  Allows language heterogeneity IDL C++ Interface MineToCee Class MineToCee: { void myOper (long ArgA); public vitural CORBA::Object } { virtual void myOper (CORBA::long ArgA); }
  • 26. Common Object Request Broker Architecture (CORBA)
  • 27. Common Object Request Broker Architecture (CORBA)  ORB Core - CORBA runtime infrastructure.  ORB Interface - Standard interface (defined in IDL) to functions provided by all CORBA- compliant ORBs.  IDL Stubs  Generated by the IDL processor for each interface defined in IDL  Hide low-level networking details of object communication from the client,  Present a high-level, object type-specific application programming interface (API).
  • 28. Common Object Request Broker Architecture (CORBA): Details 1  Object Request Broker (ORB): - Decouples Client from Service  Location and Functional Transparency - Client requests appear to him to be local procedure calls. When a client invokes an operation, the ORB is responsible for finding the object implementation, transparently activating it if necessary, delivering the request to the object, and returning any response to the caller.  ORB Interface – A set of tasks and libraries providing functions for - Converting object references to strings and vice versa, - Creating argument lists for requests made through the Dynamic Invocation Interface (DII)
  • 29. Common Object Request Broker Architecture (CORBA): Details 2 CORBA IDL Stubs and Skeletons: - Client Side is called IDL Stub - Server Side is called IDL Skeleton + Produced by IDL Compiler in the target programming language + Stubs and the Skeleton are the ``glue'' between the client and server applications, and the ORB. + Only allows remote invocation through RPC (Remote Procedure Calls). RPC’s can be implemented by providing the address pointer to the client to the (server) procedure it needs to invoke.
  • 30. Common Object Request Broker Architecture (CORBA): Details 3 How to Implement Remote Procedure Calls Clientj Servant Invoke request Locate service Return RPC address to j Remember Client j Get address of service Invoke RPC Execute Proc1 Proc2 Ship Result to Client j Result Proc3 Proc4
  • 31. Common Object Request Broker Architecture (CORBA): Details 4 Dynamic Invocation Interface (DII) Client Side This interface allows a client to directly access services provided by the ORB. Applications use the DII to dynamically issue requests to objects without requiring IDL interface-specific stubs to be linked in. Unlike IDL stubs (which only allow RPC-style requests), the DII also allows clients to make -Non-blocking requests -Oneway (send-only) calls.
  • 32. Common Object Request Broker Architecture (CORBA): Details 4 Dynamic Skeleton Interface (DSI) – Server side Allows an ORB to deliver requests to an object implementation that does not have compile-time knowledge of the type of the object it is implementing. The client making the request has no idea whether the implementation is using the type-specific IDL skeletons or is using the dynamic skeletons. Object Adapter Assists the ORB with delivering requests to the object and activating the object. The Adapter hides the details of the object, e.g. whether it is a DB object or a library object.
  • 33. IDL Use Example HelloWorld: Interface, Component and Home IDL Definitions for interface Hello { • Interface Hello void sayHello (in string username); }; •Component: HelloWorld component HelloWorld supports Hello { }; •Home home HelloHome manages HelloWorld Management: { HelloHome }; (You also need a Client for HelloWorld component)
  • 34. Simple HelloWorld & HelloHome Executors interface Hello class HelloHome_Impl { void sayHello : public virtual HelloHome, (in string username); public virtual }; CORBA::LocalObject component HelloWorld supports Hello { public: HelloHome_Impl () {} {}; ~HelloHome_Impl () {} home HelloHome manages HelloWorld {}; class HelloWorld_Impl Components::EnterpriseComponent_ptr : public virtual HelloWorld, public virtual create () CORBA:: LocalObject { return new HelloWorld_Impl (); { public: } HelloWorld_Impl () {} }; ~HelloWorld_Impl () {} • Implement behaviors of HelloWorld void sayHello (const char *usern) component { cout << “Hello World from ” << usern • Implement a lifecycle management << endl; strategy of HelloWorld component } • Client will call HelloWorld }; Component
  • 35. CLIENT for Helloworld Component Int main (int argc, char *argv[]) 1. Obtain object reference {CORBA::ORB_var orb = to home CORBA::ORB_init (argc, argv); 2. Create component CORBA::Object_var obj = 3. Invoke remote method orb->resolve_initial_references ("NameService"); 4. Remove component CosNaming::NamingContextExt_var instance nc CosNaming::NamingContextExt:: 5. Clients don’t always _narrow(obj); manage component obj = nc->resolve_str ("HelloHome"); lifecycle directly HelloHome_var hh = HelloHome::_narrow(obj); HelloWorld_var hw = hh->create (); OUTPUT hw->sayHello (“John”); $>./hello-client hw->remove (); Hello World from John return 0; }
  • 36. Other Brokers: Microsoft’s Component Object Model (COM, DCOM)  COM  Framework for integrating components.  Allows developers to build systems by assembling reusable components from different vendors.  Distributed COM (DCOM)  For distributed network-based interactions.  OLE (Object Linking & Embedding), ActiveX, MTS  Higher-level application services built on top of COM
  • 37. MS, Component Object Model (COM, DCOM)  OLE Provides services (Object Linking and Embedding) used in the creation of compound documents (documents generated from multiple tool sources)  ActiveX extension to allow components to be embedded in Web sites.  MTS extension with enterprise services (e.g: transaction, security) to allow Enterprise Information Systems (EIS) to be built using COM components.  COM+  Integrates MTS services and message queuing into COM, and makes COM programming easier  integration with Visual Basic, Visual C++, J++
  • 38. MS, Component Object Model (COM, DCOM)  Services implemented by COM objects are exposed through a set of interfaces  COM defines a binary structure for the interface between the client and the object.  COM objects and interfaces specified using Microsoft Interface Definition Language (IDL)
  • 39. Other Brokers: Component Object Model (COM, DCOM)
  • 40. Component Object Model (COM, DCOM)  Every COM object runs inside a server:  In-process server: client and server execute in the same process  Local Object Proxy: server running in a different process but on the same machine.  Communication through inter-process communication.  Remote Object Proxy: remote server on another machine.  Communication through DCE RPC (supported by DCOM).  All COM objects are registered with a component database.
  • 41. Component Object Model (COM, DCOM) All COM objects are registered with the component database.
  • 42. Peer-to-Peer Architecture  No distinction between processes (nodes)  Each maintain  its own data-store, as well as  a dynamic routing table of addresses of other nodes  Examples: gnutella, freenet.
  • 43. Event-Based (Implicit Invocation)  Some components announce (broadcast) events  Other components register interest in events  Associate a routine to each event, automatically executed when the event is produced.  A part of the system is in charge of transmitting events between producers and consumers.  Semantic constraints  Announcers of events don't know which components are affected  No assumption about order of processing  Uses:  Integrate tools  Ensure database consistency
  • 44. Event-Based (Implicit Invocation)  Advantages  High reuse potential  Ease evolution  Disadvantages  Components/Procedures have to register for an event  No insurance that an event will be treated  Exchange of data  a shared repository is often needed.  Difficult to reason about system correctness.  Compiler can no longer do early detection  Difficulty to trace without debugging tools  Data typing becomes very weak
  • 45. Client/Server Architectures Advantages - Users only get information on demand - Design addresses presentation details - Different ways to view the same data Disadvantages - Need for more sophisticated security, systems management - Applications development requires more resources to implement - Distribution Problems Types: Tier 1: User system interface Tier 2: Middle-tier provides Process management (business logic and rules execution) and Functions (e.g: queuing, application execution, and database staging)
  • 46. One & Two Tier Client/Server Architectures Processing management split between user system interface environment and database management server environment. Tier 1: user system interface: In user's desktop environment Tier 2: database management services: In a server Limitations Performance deteriorate when number of clients is large (>100 users) Flexibility and choice of DBMS for applications reduced (by process management at server level – stored procedures) Limited flexibility in moving program functionality between servers
  • 47. Three Tier Client/Server Architecture • Centralizes process logic • Improve performance, flexibility, maintainability, reusability, and scalability • Changes must only be written once and placed on the middle tier server to be available throughout the system • Distributed database integrity more easily enforced • Access to resources based on names
  • 48. Proxy Pattern  Proxy: Is a representative, surrogate or placeholder for another object (a server object)  Allows:  transparency and simplicity of access to servers  e.g: to make calls to remote objects with the same syntax as a local call  run-time efficiency, cost-effectiveness, safety
  • 49. Proxy Pattern - Components  Client  uses interface provided by proxy to request services  Original (RealSubject)  implements a service  Proxy  provides the interface of the original to clients  ensures a safe, efficient and correct access to the original  AbstractOriginal (Subject)  abstract base class for proxy and original
  • 50. Proxy Pattern - Components
  • 51. Proxy Pattern - Variants  Remote Proxy  Local representative for an object in a different address space  Cache Proxy  Local clients can share results from remote components  Protection Proxy  Controls access to the original object  Firewall Proxy  Controls access from outside world.
  • 52. Broker Pattern  Client-Server pattern to:  hide system/implementation details from clients  allow remote, location-transparent service access  allow exchange, addition, deletion of components at run-time  Examples of implementations  CORBA  OLE (On Line Extension)  COM/DCOM (MS Component Object Model)
  • 53. Broker Pattern - Components
  • 54. Broker Pattern - Components  Client  Implements user functionality  Sends requests to servers through a client-side proxy  Server  Implements services  Registers itself with the local broker  Sends responses and exceptions back to client through server-side proxy
  • 55. Broker Pattern - Components  Broker:  (un-)register servers  offers APIs  transfers messages  ensures error recovery  interoperates with other brokers  locates servers  Related Pattern, Bridge:  encapsulates network-specific functionality  mediates between local broker and remote broker
  • 56. Broker Pattern - Components  Client-side Proxy  Encapsulates system-specific functionality  Mediates between client and broker  Server-side Proxy  Calls services within server  Encapsulates system-specific functionality  Mediates between server and broker
  • 57. Broker Pattern – Runtime (High-level)
  • 58. Broker Pattern – Runtime (Detailed)
  • 60. Data Flow Patterns  Achieve reuse and modifiability  System is a succession of transformations on pieces of input data  Include:  Batch Sequential  Components, independent programs, execute and complete one after the other.  Data transmitted as a whole between steps.  Pipes and Filters  incremental transformation of data by successive components.  Data flows as a stream between between components.
  • 61. Pipes and Filters  Filters Read a stream of data on its inputs and produce a stream of data on its outputs.  Connectors (pipes) Transmit output produced by filters to other filters.
  • 62. Pipe & Filter example: Compiler ASCII program text Lexical Analyzer token stream Syntax Analyzer abstract syntax tree Semantic Analyzer program Intermediate Code Generator optimized program
  • 63. Process Control Systems  Continually running system used for maintaining correct values. The errors are compensated for through feedback.  Examples  Temperature control system  Power plant control system  Variables  Process variables  properties of the process that can be measured  value obtained by sensors  Controlled variables  process variables whose value the system intend to control  Reference value (set point)  desired value for a controlled variable
  • 64. Process Control Architectures  Open Loop system  doesn't use information about process variables to adjust the system.  rarely suited to physical processes in the real world.  Closed Loop system  uses information about process variables to manipulate process variables in order to compensate for variations in process variables and operation conditions.
  • 65. Process Control (Closed Loop)  Feedback control system  Measures a controlled variable  Adjusts the process accordingly to keep it near an acceptable set point
  • 66. Process Control (Closed Loop)  Feedforward control system  Anticipate changes to controlled variables by monitoring other process variables.
  • 67. Process Control - Issues  Computational elements  process definition (include mechanisms for changing process variables)  control algorithm (how to decide when and how to make changes)  Data elements (process variables, set point)  Control loop scheme (open-loop, closed-feedback, closed-feed forward) Drawbacks - One must decide  What variables to monitor  What sensors to use  How to calibrate them  How to deal with timing of sensing and control
  • 68. Domain-Specific Architectures  Library of different architecture styles  Provides information for new systems in the same area  Avoids rework on already known assumptions and relationships Heterogeneous systems.  Locational  Simultaneous  Hierarchical
  • 69. Example: Locational Heterogeneity  A-7E used a cooperating process style in function drivers and call/return style elsewhere.
  • 70. Example: Hierarchical Heterogeneity  Event system is a Blackboard, but, when decomposed, the component shows a layered style
  • 71. Example: Simultaneous Heterogeneity  A-7E simultaneously used layered, cooperating process, and object-based styles

Editor's Notes

  1. This diagram shows a small catalog of architectural styles, organized by is-a relations. Each related group shows a different style type and its substyles. For example, in the box at the top of the diagram,  event systems  is a substyle of  independent components.  Event systems themselves have two substyles: implicit and explicit invocation. In the next section of the lecture, we will take a closer look some of these styles.
  2. The main-program-and-subroutine architecture, as shown in the figure above, is the classical programming paradigm. The goal is to decompose a program into smaller pieces to help achieve modifiability and enable reuse. A program is decomposed hierarchically. There is typically a single thread of control and each component in the hierarchy gets this control (optionally along with some data) from its parent and passes it along to its children. In addition to facilitating modifiability, this hierarchy of subroutines also enables independent development of various parts of the program to be developed separately by different work teams.
  3. The object-oriented or abstract data types systems, as shown in the figure above, are the modern version of call-and-return architectures. The object-oriented paradigm, like the abstract data type paradigm from which it evolved, emphasizes the bundling of data and the knowledge of how to manipulate and access that data. The goal is to achieve the quality of modifiability. This bundle is an encapsulation that hides its internal secrets from its environment. Access to the object is allowed only through provided operations, typically known as methods, which are constrained forms of procedure calls. This encapsulation promotes reuse and modifiability, principally because it promotes separation of concerns: the user of a service need not know, and should not know, anything about how that service is implemented. The main features that distinguish the object-oriented paradigm from abstract data types are inheritance (the hierarchical sharing of definitions and code) and polymorphism (the ability to determine the semantics of an operation at runtime).
  4. The data-centered style shown here has a passive repository (you can tell this because no control enters it). At the heart of this style is a centralized data store that communicates with a number of clients. The means of communication (sometimes called the coordination model) distinguishes the two subtypes: repository (the one shown above) and blackboard. A blackboard sends notification to subscribers when data of interest changes, and thus, is active. A blackboard differs from the figure shown above in that it would be drawn with control arrows emanating from the shared data. Note that when the clients are built as independently executing processes, what we have is a client-server style that belongs in the independent-component section of the style catalog. Thus, we see that styles are not rigidly separated from one another.
  5. The figure shows three kinds of data: the program being interpreted, the program  s data (such as the values of variables assigned in the execution of the program), and the internal state of the interpreter (such as the values of registers or the current statement being executed). The interpretation engine selects an instruction from the program being interpreted, updates its internal state, and based on the instruction, potentially updates the program  s data. Executing a program via an interpreter adds flexibility through the ability to interrupt and query the program and introduce modifications at runtime, but there is a performance cost because of the additional computation involved in execution.
  6. Systems are seldom built from a single style; rather, most systems use a mixture of styles, and we say that such systems are heterogeneous. There are three types of heterogeneous systems: locational, simultaneous, and hierarchical. The following three slides examine each of these types in turn.
  7. Systems are seldom built from a single style; rather, most systems use a mixture of styles, and we say that such systems are heterogeneous. There are three types of heterogeneous systems: locational, simultaneous, and hierarchical. The following three slides examine each of these types in turn.
  8. Systems are seldom built from a single style; rather, most systems use a mixture of styles, and we say that such systems are heterogeneous. There are three types of heterogeneous systems: locational, simultaneous, and hierarchical. The following three slides examine each of these types in turn.