Architecture and Design of Distributed Dependable Systems TI-ARDI POSA2: Interceptor Architectural Pattern

Similar documents
Chapter 10 DISTRIBUTED OBJECT-BASED SYSTEMS

Today: Distributed Objects. Distributed Objects

Distributed Technologies - overview & GIPSY Communication Procedure

CAS 703 Software Design

Today: Distributed Middleware. Middleware

Artix ESB. Developing Advanced Artix Plug-Ins in C++ Version 5.5, December 2008

Analysis of Passive CORBA Fault Tolerance Options for Real-Time Applications Robert A. Kukura, Raytheon IDS Paul V. Werme, NSWCDD

Lecture 5: Object Interaction: RMI and RPC

CORBA (Common Object Request Broker Architecture)

Distributed Objects. Object-Oriented Application Development

Broker Pattern. Teemu Koponen

Distributed Object-based Systems CORBA

Lookup. Michael Kircher & Prashant Jain Siemens AG, Corporate Technology Munich, Germany

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR (ODD SEMESTER) QUESTION BANK

Distributed Object-Based Systems The WWW Architecture Web Services Handout 11 Part(a) EECS 591 Farnam Jahanian University of Michigan.

Distributed Object-Based. Systems. Chapter 9

Appendix A - Glossary(of OO software term s)

Lecture 06: Distributed Object

Active Object. Concurrent Object, Actor

Verteilte Systeme (Distributed Systems)

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Distributed Systems Principles and Paradigms

Advanced Topics in Operating Systems

Communication. Distributed Systems Santa Clara University 2016

Artix Version Developing Advanced Artix Plugins in C++

Evictor. Prashant Jain Siemens AG, Corporate Technology Munich, Germany

Distributed Middleware. Distributed Objects

Chapter 6 Enterprise Java Beans

CHAPTER - 4 REMOTE COMMUNICATION

Chapter 5: Distributed objects and remote invocation

Electronic Payment Systems (1) E-cash

UNIT 4 CORBA 4/2/2013 Middleware 59

JAYARAM. COLLEGE OF ENGINEERING AND TECHNOLOGY Pagalavadi, Tiruchirappalli (An approved by AICTE and Affiliated to Anna University)

A QoS-aware CORBA Component Model for Distributed Real-time and Embedded System Development

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Adaptive Middleware. Self-Healing Systems. Guest Lecture. Prof. Priya Narasimhan. Assistant Professor of ECE and ISRI Carnegie Mellon University

Limitations of Object-Based Middleware. Components in CORBA. The CORBA Component Model. CORBA Component

Intelligent Event Processing in Quality of Service (QoS) Enabled Publish/Subscribe (Pub/Sub) Middleware

Software Components and Distributed Systems

CORBA and COM TIP. Two practical techniques for object composition. X LIU, School of Computing, Napier University

Distributed Objects. Chapter Distributing Objects Overview

Broker Revisited. Markus Voelter Copyright 2004, Kircher, Voelter, Jank, Schwanninger, Stal D5-1

Automatic Code Generation for Non-Functional Aspects in the CORBALC Component Model

Distributed Object-based Systems CORBA

RMI: Design & Implementation

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

CSE 358 Spring 2006 Selected Notes Set 8

A short introduction to Web Services

Overview. Distributed Systems. Distributed Software Architecture Using Middleware. Components of a system are not always held on the same host

1.264 Lecture 16. Legacy Middleware

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

Distributed Systems. 5. Remote Method Invocation

Extending Tuscany. Apache Tuscany. Slide 1

Software Architecture Patterns

DS 2009: middleware. David Evans

Quality Objects (QuO): Adaptive Management and Control Middleware for End-to-End QoS

Towards Generic and Middleware-independent Support for Replicated, Distributed Objects

Efficiently and Transparently Automating Scalable On-demand Activation and Deactivation of Services with the Activator Pattern

An Object-level Gateway Supporting Integrated-Property Quality of Service

COMPONENT BASED TECHNOLOGY (IT-1401)

Software Paradigms (Lesson 10) Selected Topics in Software Architecture

Object-Oriented Systems Design RMI

The Design and Performance of a Pluggable Protocols Framework for Real-time Distributed Object Computing Middleware

object/relational persistence What is persistence? 5

Object Management Group. minimumcorba. Presented By Shahzad Aslam-Mir Vertel Corporation Copyright 2001 Object Management Group

Oracle Tuxedo. Using CORBA Request-Level Interceptors 12c Release 1 (12.1.1) June 2012

CAS 703 Software Design

Java J Course Outline

Communication Framework

Implementing Real-time CORBA with Real-time Java

DISTRIBUTED SYSTEMS [COMP9243] Lecture 7: Middleware MIDDLEWARE. Distributed Object based: Slide 1. Slide 3. Message-oriented: Slide 4

CORBA Request Portable Interceptors: A Performance Analysis

As related works, OMG's CORBA (Common Object Request Broker Architecture)[2] has been developed for long years. CORBA was intended to realize interope

Object Interaction. Object Interaction. Introduction. Object Interaction vs. RPCs (2)

Chapter 5: Remote Invocation. Copyright 2015 Prof. Amr El-Kadi

Lecture 15: Network File Systems

CS 5523 Operating Systems: Remote Objects and RMI

Distributed Programming with RMI. Overview CORBA DCOM. Prepared By: Shiba R. Tamrakar

Distributed Systems. The main method of distributed object communication is with remote method invocation

Lightweight Security Service for CORBA. Bob Burt

Android Services & Local IPC: The Activator Pattern (Part 2)

The UNIVERSITY of EDINBURGH. SCHOOL of INFORMATICS. CS4/MSc. Distributed Systems. Björn Franke. Room 2414

5 Distributed Objects: The Java Approach

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

PROFESSOR: DR.JALILI BY: MAHDI ESHAGHI

IMS Adapters Administrator s Guide. Version 6.2, May 2005

Chapter 5: Concurrency Patterns

Migrating IONA Orbix 3 Applications

Active Object. Concurrent Object

Distributed Software Systems

Active Object. an Object Behavioral Pattern for Concurrent Programming. R. Greg Lavender Douglas C. Schmidt

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

Java RMI Middleware Project

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

COMERA: COM Extensible Remoting Architecture

A Flexible and Extensible Object Middleware: CORBA and Beyond

Announcements. me your survey: See the Announcements page. Today. Reading. Take a break around 10:15am. Ack: Some figures are from Coulouris

Unit 7: RPC and Indirect Communication

OpenFusion Implementation Repository Version 1.0. User Guide

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

Transcription:

Version: 29.10.2014 Architecture and Design of Distributed Dependable Systems TI-ARDI POSA2: Interceptor Architectural Pattern

Abstract The Interceptor architectural pattern allows services to be added transparently to a framework and triggered automatically when certain events occur 2

Context Developing frameworks that can be extended transparently 3

Problem Frameworks cannot anticipate all the services they must offer to users Framework developers must address the following three forces: A framework should allow integration of additional services These integrations should not affect existing framework components Applications using a framework may need to monitor and control its behavior 4

Solution Allow applications to register out-of-band services with the framework via predefined interfaces Let the framework trigger these services automatically when certain events occur Open the frameworks implementation for the out-of-band services allowing the services to access and control certain aspects of the framework s behavior 5

Application +do_work() * Concrete Interceptor +event1_callback() +event2_callback() Interceptor Structure FW «register» «remove» Interceptor +event1_callback() +event2_callback() * «uses» Concrete Framework +event() +access_internals() +service() 1 «creates» Context +set_value() +get_value() +consume_service() 1 * Dispatcher List of Interceptors +dispatch() +register() +remove() +iterate_list() 6

:Application Dynamics :Concrete Framework ci:concrete Interceptor register(ci) :Dispatcher co:context object dispatch(co) event() get_value() consume_ service() event1_callback(co) access_internals() service() iterate_ list() 7

Implementation Steps 1. Model the internal behavior of the concrete framework (e.g. as a state machine) 2. Identify and model interception points 3. Specify the context objects 4. Specify the interceptors 5. Specify the dispatchers 6. Implement the callback mechanisms in the concrete framework 7. Implement the concrete interceptors 8

State Chart for Client ORB Framework Initializing shutdown() Binding Idle bindrequest() Proxy Creation Connecting [ok] methodrequest() [already bound] Bind Error [not ok] Sending requests and receiving replies Transmission Error [not ok] [ok] Marshaling Demarshaling [ok] Delivering [ok] Receiving result 9

2. Identify and model Interception Points 2.1 Identify concrete framework state transitions subject to interceptions (=interception points) 2.2 Partition interception points into reader and writer sets 2.3 Integrate the interception points into the state machine model - by introducing intermediary states 2.4 Partition the interception points into disjoint interception groups - e.g. OutRequest, InRequest, InReply 10

2.1 Example of Interception Points Interception Points Shut-down Binding PreMarshalRequest PostMarshalRequest PreMarshalReply PostMarshalReply Reader/Writer Reader Reader Reader+Writer Reader Reader Reader+Writer 11

1 main() Client ClientRequest Interceptor +onpremarshalrequest() +onpostmarshalrequest() ClientRequest Interceptor «register» «remove» +onpremarshalrequest() +onpostmarshalrequest() Example «uses» «uses» Concrete Framework +event() +access_internals() +service() 1 1 «creates» * 1 ClientRequest Unmarshaled Request Marshaled Request 1 Dispatcher +dispatchclient RequestPreMarshal() +register() +remove() +iterate_list() 12

3. Specify the Context Objects - Example public interface UnmarshaledRequest // Context object { // JAVA public String gethost(); public void sethost(string host); public long getport(); public void setport(long newport); public String getobjname(); public void setobjname(string newname); public String getmethod(); public void setmethod(string name); public Enumeration getparameters(); public Object getarg(long i); // get i_th arg public void setarg(long i, Object o); // set i_th arg public void addinfo(object info); // } 13

4. Specify the Interceptors - Example Interceptor interface for Request interception group: public interface ClientRequestInterceptor { public void onpremarshalrequest(unmarshaledrequest context); public void onpostmarshalrequest(marshaledrequest context); } Each interception point in the group results in a separate hook method 14

6. Implement the Callback mechanism public class ClientRequestDispatcher { // JAVA Code // public void dispatchclientrequestinterceptorpremarshal( UnmarshaledRequest context) { Vector interceptors; synchronized (this) { interceptors= (Vector) interceptors_.clone(); } for (int i=0; i < interceptors.size(); i++) { ClientRequestInterceptor ic= (ClientRequestInterceptor) interceptors.elementat(i); // dispatch callback hook method ic.onpremarshalrequest(context); } } // } 15

7. Implement the Concrete Interceptor public class Client { // JAVA Code static final void main (string args[]) { ClientRequestInterceptor myinterceptor = // use an anonymous inner class new ClientRequestInterceptor() { public void onpremarshalrequest( UnmarshaledRequest context) { System.out.println(context.getObj() + called ); // } public void onpostmarshalrequest( MarshaledRequest context) { /*.. */ } }; ClientRequestDispatcher.theInstance().register(myInterceptor); // do normal work } // end main } 16

Load Balancing Example :Client 1. invoke: x.f() 5. request() 6. call operation: f() ORB A x:x Client ORB x:x 2. dispatch 4. use(a) ORB B ORB Load Table A: 10 % B: 25 % C: 90 % :RequestInterceptor 3. lookup ORB C x:x 17

Variants: Interceptor Proxy (Delegator) Client Machine Server Machine configure Client call intercept and delegate :Proxy Server «creates» Concrete Framework :Server «creates» 18

Variants: Implicit Interceptor Registration Dynamic load of interceptors Strategy 1: search and load interceptor libraries from predefined locations Strategy 2: using a run-time configuration mechanism i.e. Component Configurator pattern Interpretation of a script file, defining which interceptors to link, where to find the DLLs and how to initialize them in the framework 19

Known Uses Component-based application servers EJB, CORBA Components, COM+ CORBA implementations (TAO, Orbix) OMG s CORBA Portable Interceptor specification Fault-tolerant ORB frameworks Web browsers allow plug-ins for specific media types The dynamictao reflective ORB Using component configurators 20

Component-based Application Servers Client call read configuration Configuration Interface (Proxy) Interceptor delegate Use services Transaction Component Security Persistence Lifecycle_ Event() Service() Container (Concrete Framework) 21

Interceptor Benefits Extensibility and flexibility Separation of concerns Support for monitoring and control of frameworks Layer symmetry Reusability 22

Interceptor Liabilities Complex design issues Malicious or erroneous interceptors Potential interception cascades 23

Relation to other POSA2 patterns 24