Object-Oriented Middleware for Distributed Systems

Similar documents
Fault Tolerance in Distributed Systems: An Introduction

Communication in Distributed Systems

Jade: Java Agent DEvelopment Framework Overview

Fault Tolerance in Distributed Systems: An Introduction

Introduction to Distributed Systems

Consistency & Replication in Distributed Systems

Processes in Distributed Systems

From Objects to Agents: The Java Agent Middleware (JAM)

Introduction to Distributed Systems

Jade: Java Agent DEvelopment Framework Overview

Processes in Distributed Systems

Naming in Distributed Systems

Software Architectures

Software Architectures

Chapter 16. Layering a computing infrastructure

Distributed Objects. Object-Oriented Application Development

CORBA (Common Object Request Broker Architecture)

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

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Jade: Java Agent DEvelopment Framework Getting Started

CAS 703 Software Design

Appendix A - Glossary(of OO software term s)

Today: Distributed Objects. Distributed Objects

Broker Pattern. Teemu Koponen

Module 1 - Distributed System Architectures & Models

DS 2009: middleware. David Evans

Software Components and Distributed Systems

Application Servers in E-Commerce Applications

A short introduction to Web Services

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

Distributed Middleware. Distributed Objects

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

Building High-Assurance Systems out of Software Components of Lesser Assurance Using Middleware Security Gateways

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

Introduction to Distributed Systems

Distribution and web services

Software Paradigms (Lesson 10) Selected Topics in Software Architecture

Protecting the Hosted Application Server

Universal Communication Component on Symbian Series60 Platform

Software Architecture Patterns

A Report on RMI and RPC Submitted by Sudharshan Reddy B

Lecture 5: Object Interaction: RMI and RPC

What is CORBA? CORBA (Common Object Request Broker Architecture) is a distributed object-oriented client/server platform.

A Strategic Comparison of Component Standards

Distributed Technologies - overview & GIPSY Communication Procedure

1.264 Lecture 16. Legacy Middleware

INTRODUCTION TO Object Oriented Systems BHUSHAN JADHAV

Overview. Communication types and role of Middleware Remote Procedure Call (RPC) Message Oriented Communication Multicasting 2/36

What are the characteristics of Object Oriented programming language?

Distributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.

Message Passing vs. Distributed Objects. 5/15/2009 Distributed Computing, M. L. Liu 1

Patterns for Asynchronous Invocations in Distributed Object Frameworks

Incorporating applications to a Service Oriented Architecture

UNIT 4 CORBA 4/2/2013 Middleware 59

Electronic Payment Systems (1) E-cash

Unit 7: RPC and Indirect Communication

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

Software Architecture

OBJECT-ORIENTED MODELING AND DESIGN. Introduction

Today: Distributed Middleware. Middleware

Introduction to Distributed Systems

Distribution and Integration Technologies

Distributed Systems 8. Remote Procedure Calls

Distributed systems. Distributed Systems Architectures. System types. Objectives. Distributed system characteristics.

Introduction to Distributed Systems

Introduction to Distributed Systems

Communication. Distributed Systems Santa Clara University 2016

CHAPTER - 4 REMOTE COMMUNICATION

Distributed Systems. Lehrstuhl für Informatik 4. RWTH Aachen. Organization. Literature. Classification of the lecture

Lecture 06: Distributed Object

CPE731 Middleware for Distributed Systems

Chapter 5: Distributed objects and remote invocation

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

MODELS OF DISTRIBUTED SYSTEMS

Mohsin Qasim Syed Abbas Ali

Software Architectures

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

Cloud Computing Chapter 2

System types. Distributed systems

02 - Distributed Systems

JAVA S ROLE IN DISTRIBUTED COMPUTING

Lecture 1: Taxonomy for Distributed Systems

CHAPTER 2. Introduction to Middleware Technologies

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

Irbid National University, Irbid, Jordan. 1. The concept of distributed corporate systems

Achieving Architectural Design Concepts with Remote Method Invocations

Patterns in Software Engineering

Introduction to Web Services & SOA

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services

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

IIOP: Internet Inter-ORB Protocol Make your code accessible even in future, with the next universal protocol

The Architecture of the World Wide Web

On the Structure of a Software Product-Line for Mobile Software

Architectural Patterns

Architectural Patterns. Architectural Patterns. Layers: Pattern. Architectural Pattern Examples. Layer 3. Component 3.1. Layer 2

Architectural Design Outline

CSC207H: Software Design SOLID. CSC207 Winter 2018

Gustavo Alonso, ETH Zürich. Web services: Concepts, Architectures and Applications - Chapter 1 2

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

Experiences in the management of an EJB-based e- commerce application. Abstract

Transcription:

Object-Oriented Middleware for Distributed Systems Distributed Systems Sistemi Distribuiti Andrea Omicini andrea.omicini@unibo.it Ingegneria Due Alma Mater Studiorum Università di Bologna a Cesena Academic Year 2010/2011 Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 1 / 32

Outline Outline 1 Middleware Overview 2 Object-Oriented Middleware 3 CORBA & OSGi Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 2 / 32

Disclaimer These Slides...... are derived from a Presentation by Giovanni Rimassa, which we warmly thank Slides were made kindly available by the author Every problem or mistake contained in these slides, however, should be attributed to the sole responsibility of the teacher of this course Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 3 / 32

Outline Middleware Overview 1 Middleware Overview 2 Object-Oriented Middleware 3 CORBA & OSGi Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 4 / 32

What is Middleware? Middleware Overview Traditional definition What is middleware? The word suggests something belonging to the middle But middle between what? The traditional middleware definition The middleware lies in the middle between the Operating System and the applications The traditional definition stresses vertical layers Applications on top of middleware on top of the OS Middleware-to-application interfaces (top interfaces) Middleware-to-OS interfaces (bottom interfaces) Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 5 / 32

Why Middleware? Middleware Overview Behind middleware Problems of today Software development is hard Experienced designers are rare (and costly) Applications become more and more complex What can middleware help with? Middleware is developed once for many applications Higher quality designers can be afforded Middleware can provide services to applications Middleware abstracts away from the specific OS Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 6 / 32

Middleware Overview Middleware and Models I Middlewares A key feature of middleware is interoperability Applications using the same middleware can interoperate This is true of any common platform (e.g. OS file system) But, many incompatible middleware systems exist Applications on middleware A can work together Applications on middleware B can work together, too But, A-applications and B-applications cannot! The Enterprise Application Integration (EAI) task Emphasis on horizontal communication Application-to-application and middleware-to-middleware Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 7 / 32

Middleware Overview Middleware and Models II Conceptual integrity Software development does not happen in vacuum Almost any software project must cope with past systems There is never time nor resources to start from scratch Legacy systems were built with their own approaches System integration is the only way out Take what is already there and add features to it Try to add without modifying existing subsystem First casualty: Conceptual Integrity The property of a system of being understandable and explainable through a coherent, limited set of concepts Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 8 / 32

Middleware Overview Middleware and Models III Models from middleware to applications Real systems are heterogeneous Piecemeal growth is a very troublesome path for software evolution Still, it is very popular being asymptotically the most cost effective when development time goes to zero Middleware technology is an integration technology Adopting a given middleware should ease both new application development and legacy integration To achieve integration while limiting conceptual drift, middleware tries to cast a model on heterogeneous applications. Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 9 / 32

Middleware Overview Middleware and Models IV Integration middleware Before: you have a total mess A lot of systems, using different technologies Ad-hoc interactions, irregular structure Each piece must be described in its own reference frame Then: the Integration Middleware (IM) comes A new, shiny model is supported by the IM Existing systems are re-cast under the Model New model-compliant software is developed After: you have the same total mess But, no, now they are CORBA objects, or TuCSoN agents Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 10 / 32

Middleware Overview Middleware Technologies Abstract vs. concrete middleware Abstract middleware: a common model Concrete middleware: a common infrastructure Example: Distributed Objects Abstractly, any middleware modeling distributed systems as a collection of network reachable objects has the same model: OMG CORBA, Java RMI, MS DCOM, OSGI Architecture... Actually, even at the abstract level there are differences... Concrete implementations, instead, aim at actual interoperability, so they must handle much finer details Until CORBA 2.0, two CORBA implementations from different vendors were not interoperable OSGI easily provides you with specifications technology not so easy to find Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 11 / 32

Middleware Standards Middleware Overview The role of standards Dealing with infrastructure, a key-issue is the so-called network effect The value of a technology grows with the number of its adopters Standardisation efforts become critical to build momentum around an infrastructure technology Large standard consortia are built, which gather several industries together (OMG, W3C, FIPA, OSGi) Big industry players try to push their technology as de facto standards, or set up more open processes for them (Microsoft, IBM, Sun) Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 12 / 32

Middleware Overview Middleware Discussion Template How to (re)present a middleware Presentation and analysis of the model underlying the middleware What do they want your software to look like? Presentation and analysis of the infrastructure created by widespread use of the middleware If they conquer the world, what kind of world will it be? Discussion of implementation issues at the platform and application level What kind of code must I write to use this platform? What kind of code must I write to build my own platform? Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 13 / 32

Outline Object-Oriented Middleware 1 Middleware Overview 2 Object-Oriented Middleware 3 CORBA & OSGi Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 14 / 32

Object-Oriented Middleware Distributed Objects From OO to Distributed OO Distributed systems need quality software, and they are a difficult system domain OOP is a current software best practice Questions are Can we apply OOP to Distributed Systems programming? What changes and what stays the same? Distributed Objects apply the OO paradigm to Distributed Systems Examples: CORBA, DCOM, Java RMI, JINI, EJB, OSGi Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 15 / 32

Object-Oriented Middleware Core of OOP I What is the fundamental concept of OOP? From the very name of object-oriented programming, could it be The Object? Definitely not and you should know this! The fundamental concept of object-oriented programming is! The Class Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 16 / 32

Object-Oriented Middleware Core of OOP II Class: A definition A class is an abstract data type, with an associated module that implements it Writing this as a conceptual equation à la Wirth, Type + Module = Class Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 17 / 32

Object-Oriented Middleware Modules vs. Types Modules & Types Modules and types look very different Modules give structure to the implementation Types specifies how each part can be used But they share the interface concept In modules, the interface selects the public part In types, the interface describes the allowed operations as well as their properties As a result, the interface is at the very core of the notion of class Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 18 / 32

OOP Mechanism Object-Oriented Middleware Method Call The fundamental OOP computation mechanism Result res = obj.meth(par) Target Object Access Operator Method Name Parameter List Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 19 / 32

Object-Oriented Middleware OOP Extensibility Subclassing Subclassing is the main OOP extension mechanism, and it is affected by the dual nature of classes Type + Module = Class Subtyping + Inheritance = Subclassing Subtyping a partial order on types A valid operation on a type is also valid on a subtype Liskov Substitutability Principle: If S is a subtype of T, then replacing objects of type T with objects of type S does not alter the properties of a program Inheritance a partial order on modules A module grants special access to its sub-modules Open/Closed Principle: An OO language must allow the creation of modules closed for use but open for extension Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 20 / 32

Object-Oriented Middleware Distributing the Objects How to? Q How can we extend OOP to a distributed system, preserving all its desirable properties? A Just pretend the system is not distributed, and then do business as usual! This is called transparency As crazy as it may seem, it works! Well, up to a point at least, but generally enough for a lot of applications Problems arise from failure management In reliable and fast networks, things run smooth... Whenever a failure comes from what we abstracted away e.g., a network failure, we are just plain dead Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 21 / 32

Object-Oriented Middleware Core of Distributed OOP What is the fundamental concept of Distributed OOP? Could it be The Object or, again, The Class? Clearly not The fundamental concept of distributed OOP is! The Remote Interface Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 22 / 32

Object-Oriented Middleware Distributed OOP Mechanism Remote Method Call The fundamental Distributed OOP computation mechanism Result Sent back res = obj.meth(par) Target Object Encapsulates address and protocol Parameter List Sent on the network Access Operator Grants location transparency Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 23 / 32

Object-Oriented Middleware Distributed OOP: Communication Model The Distributed Objects communication model...... is implicit Transmission is implicit, everything happens through stubs The stub turns an ordinary call into an Inter-Process Communication (IPC) mechanism As a result, both local and remote calls are handled homogeneously location transparency... is object-oriented Only objects exist, invoking operations on each other Interaction is client/server with respect to the individual call micro C/S, not necessarily macro C/S Each call is attached to a specific target object: the result can depend on the target object state Callers refer to objects through an object reference Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 24 / 32

Broker Architecture Object-Oriented Middleware Broker Architecture Broker architectural pattern [Buschmann et al., 1996] Client 1 Server 1 Client 1 Server 1 Client 2 Server 2 Client 2 Broker Server 2 Client 3 Server 3 Client 3 Server 3 Broker is an architectural pattern in Stock [BMRSS96]. market metaphor Publish/subscribe Stock market metaphor. scheme Extensibility, Publish/subscribe portability, scheme. interoperability Extensibility, portability, interoperability. A broker reduces communication channels from N c xn s to N c + N s A broker reduces logic links from N c N s to N c + N s. Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 25 / 32

Object-Oriented Middleware Proxy and Impl, Stub and Skeleto Proxy and Impl, Stub and Skeleton Client invokes RemoteInterface operation(par : ParType) : ResType RemoteProxy skel : Address connects to Network RemoteSkel RemoteImpl ResType operation(partype par) { // 1. Marshal parameter // 2. Send marshalled data to impl transport address // 3. Receive result from impl transport address // 4. Return Result } ResType operation(partype par) { // Execute the operation normally } void dispatch() { while(active) { // 1. receive from the RemoteProxy // 2. Unmarshal received data // 3. Call operation on RemoteImpl // 4. Send back result } } Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 26 / 32

Outline CORBA & OSGi 1 Middleware Overview 2 Object-Oriented Middleware 3 CORBA & OSGi Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 27 / 32

CORBA & OSGi CORBA Many thanks...... to Giovanni Rimassa for his slides Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 28 / 32

CORBA & OSGi OSGi Many thanks...... to Marcel Offermans for his slides Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 29 / 32

Conclusions Summing Up Object-oriented Middleware...... provides a coherent framework for Distributed OOP, both conceptually and technologically... extends OOP to Distributed Systems... hides the complexity of programming DS... is supported by open standards such as OMG CORBA and OSGi... promotes integration across OSs, networks and languages... counts on a lot of free implementations available Does it solve everything? Of course not. That is why why have a course on Multi-agent Systems, then! Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 30 / 32

References I References Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., and Stal, M. (1996). Pattern-Oriented Software Architecture: A System of Patterns, volume 1. John Wiley & Sons, New York, NY. Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 31 / 32

Object-Oriented Middleware for Distributed Systems Distributed Systems Sistemi Distribuiti Andrea Omicini andrea.omicini@unibo.it Ingegneria Due Alma Mater Studiorum Università di Bologna a Cesena Academic Year 2010/2011 Andrea Omicini (Università di Bologna) 11 OO Middleware A.Y. 2010/2011 32 / 32