Web Services. Copyright 2011 Srdjan Komazec



Similar documents
Middleware Lou Somers

Chapter 2: Enterprise Applications from a Middleware Perspective

Infrastructure that supports (distributed) componentbased application development

Chapter 2: Remote Procedure Call (RPC)

Chapter 6. CORBA-based Architecture. 6.1 Introduction to CORBA 6.2 CORBA-IDL 6.3 Designing CORBA Systems 6.4 Implementing CORBA Applications

Service-Oriented Architecture and Software Engineering

Introduction to CORBA. 1. Introduction 2. Distributed Systems: Notions 3. Middleware 4. CORBA Architecture

Middleware: Past and Present a Comparison

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Overview of CORBA 11.1 I NTRODUCTION TO CORBA Object services 11.5 New features in CORBA Summary

Event-based middleware services

Distributed Objects and Components

MIDDLEWARE 1. Figure 1: Middleware Layer in Context

Enterprise Application Integration

What is Middleware? Software that functions as a conversion or translation layer. It is also a consolidator and integrator.

Module 17. Client-Server Software Development. Version 2 CSE IIT, Kharagpur

Service Oriented Architectures

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Middleware for Heterogeneous and Distributed Information Systems

Introduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University

Interface Definition Language

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

25 May Code 3C3 Peeling the Layers of the 'Performance Onion John Murphy, Andrew Lee and Liam Murphy

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Middleware. Chapter 8: Middleware

Lesson 4 Web Service Interface Definition (Part I)

Chapter 4. Architecture. Table of Contents. J2EE Technology Application Servers. Application Models

XII. Distributed Systems and Middleware. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

System types. Distributed systems

The Service Revolution software engineering without programming languages

Contents. Client-server and multi-tier architectures. The Java 2 Enterprise Edition (J2EE) platform

Layering a computing infrastructure. Middleware. The new infrastructure: middleware. Spanning layer. Middleware objectives. The new infrastructure

Outline SOA. Properties of SOA. Service 2/19/2016. Definitions. Comparison of component technologies. Definitions Component technologies

Service Oriented Architecture

Tier Architectures. Kathleen Durant CS 3200

What Is the Java TM 2 Platform, Enterprise Edition?

Invocación remota (based on M. L. Liu Distributed Computing -- Concepts and Application

Distributed Systems Architectures

Lecture 7: Java RMI. CS178: Programming Parallel and Distributed Systems. February 14, 2001 Steven P. Reiss

Lesson 18 Web Services and. Service Oriented Architectures

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

A standards-based approach to application integration

Elements of Advanced Java Programming

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

Implementing Java Distributed Objects with JDBC

Version Overview. Business value

Challenges and Opportunities for formal specifications in Service Oriented Architectures

Sun Microsystems Inc. Java Transaction Service (JTS)

Research on the Model of Enterprise Application Integration with Web Services

Virtual machine interface. Operating system. Physical machine interface

Introduction to Web Services

Object-Oriented Middleware for Distributed Systems

Client Server Architecture

WEB SERVICES. Revised 9/29/2015

App Servers & J2EE Platform. Contents: Transaction Processing Monitors. TP Monitors (cont) TP-Monitors. TP Standards. TP Monitors (cont)

How To Write A Network Operating System For A Network (Networking) System (Netware)

COM 440 Distributed Systems Project List Summary

Distributed Systems. Distributed Systems

How To Create A C++ Web Service

Grid Computing. Web Services. Explanation (2) Explanation. Grid Computing Fall 2006 Paul A. Farrell 9/12/2006

Client-Server Applications

Service Oriented Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

A distributed system is defined as

Middleware and Distributed Systems. Introduction. Dr. Martin v. Löwis

Introduction to Service Oriented Architectures (SOA)

Architecture of Transaction Processing Systems

Report of the case study in Sistemi Distribuiti A simple Java RMI application

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Chapter 16 Distributed Processing, Client/Server, and Clusters

Base One's Rich Client Architecture

Architecture of the CORBA Component Model CORBA 3.0

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Communication. Layered Protocols. Topics to be covered. PART 1 Layered Protocols Remote Procedure Call (RPC) Remote Method Invocation (RMI)

Principles and Foundations of Web Services: An Holistic View (Technologies, Business Drivers, Models, Architectures and Standards)

Distributed Systems. Outline. What is a Distributed System?

PERFORMANCE COMPARISON OF COMMON OBJECT REQUEST BROKER ARCHITECTURE(CORBA) VS JAVA MESSAGING SERVICE(JMS) BY TEAM SCALABLE

EJB & J2EE. Component Technology with thanks to Jim Dowling. Components. Problems with Previous Paradigms. What EJB Accomplishes

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19

B. WEB APPLICATION ARCHITECTURE MODELS

E-Commerce Systems Technology Infrastructure

DISTRIBUTED AND PARALLELL DATABASE

How To Write A Microsoft.Net Event Management System (Mnet)

It is the thinnest layer in the OSI model. At the time the model was formulated, it was not clear that a session layer was needed.

Distributed Systems. REK s adaptation of Prof. Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 1

T Network Application Frameworks and XML Web Services and WSDL Tancred Lindholm

Glassfish, JAVA EE, Servlets, JSP, EJB

Transcription:

Web Services Middleware Copyright 2011 Srdjan Komazec 1

Where are we? # Title 1 Distributed Information Systems 2 Middleware 3 Web Technologies 4 Web Services 5 Basic Web Service Technologies 6 Web 2.0 Services 7 Web Service Security 2

Outline Motivation i Technical solution Understanding Middleware Remote Procedure Call (RPC) and Related Middleware Transaction Processing (TP) Monitors Object Brokers Message-Oriented Middleware Illustration by a larger example Summary Resources 3

Motivation 4

Motivation Efficient i solutions are needed d to enable seamless integration ti of servers and applications (2-tier, 3-tier, and N-tier architectures). The problems encountered in the context are reoccurring Synchronous and asynchronous communication between the distributed nodes. Transactional guarantees over the distributed resources. Solutions to the problems can be useful to many different users. Conventional middleware platforms are providing well developed, standardized, robust and tested solutions to the reoccurring problems. Used in restricted settings like LANs or over a collection of systems which are physically close. 5

Technical Solution Understanding Middleware 6

Understanding Middleware Middleware as a Programming Abstraction Middleware hides some of the complexities of building a distributed application Programmer can focus on business-related functionality. The functionality of middleware should otherwise be developed from scratch. 7

Understanding Middleware Middleware as Infrastructure Infrastructure t is needed d to implement programming abstractions. ti It usually has a large footprint complex software systems. Simplest form of RPC requires IDL, compiler and supporting software libraries. Development vs. run-time parts of infrastructure. Extensions and enhancements make programming abstractions more expressive, flexible and easier to use But also make systems more complex and the learning curve steeper. E.g., authentication, dynamic binding support, etc. Components may get more complex interfaces, allowing direct access to low-level details. 8

Technical Solution Remote Procedure Call (RPC) and Related Middleware 9

RPC and Related Middleware Introduction Introduced at the beginning of 1980s by Birell and Nelson. RPC was introduced as a way to transparently call procedures located on other machines. It became the basis for building 2-tier systems and it established various notions: Client/Server computing, Interface Definition Language (IDL), Name and Directory Services, Dynamic Binding, etc. RPC is a clean way to deal with the distribution Relies on the concept of procedure No need to change the programming language or paradigm to create distributed applications. Whether RPC should be transparent or not? Simplicity vs. changing of program nature (functional and non-functional concerns) 10

RPC and Related Middleware How RPC works development time 11

RPC and Related Middleware How RPC works? RPC has a clearly defined methodology: 1. Defining i the interface for the remote procedure Relies on Interface Definition Language (IDL) abstract representation of the procedure Specification of services provided by the server. 2. Compiling IDL description by using interface compiler to produce Client stubs Piece of code to be compiled and linked with the client. Client makes actually local call to the stub. Stub locates server, formats the data (marshaling and serialization), communicates to server and provides the response as the procedure response. Server stubs Similar in nature to client stubs. Implementing the server side invocation. Code templates and references Auxiliary files headers, code templates, etc. Stubs are handling all of the network programming details Different interfaces can give different level of detail exposure. 12

RPC and Related Middleware How RPC works run-time 13

RPC and Related Middleware Binding in RPC Binding is the process during which h a client creates a local l association for a given server in order to invoke a remote procedure. The process can be Static Hardcoded reference to the server. Simple and effective, no additional infrastructure is required. Client and Server are becoming tightly coupled (e.g., failures, relocations and load balancing are problematic). Dynamic Relies on specialized services to locate servers (additional layer of indirection). Usually called Name and Directory Service or Binder Service. Client stub communicates to binder to discover suitable service May implement load balancing, relocation of services Cost is in additional infrastructure, protocol and registration primitives. The complexities may be reduced by stubs. Binding can be based on method signature but also based on non-functional properties (traders). 14

RPC and Related Middleware Dynamic Binding in RPC 15

RPC and Related Middleware RPC and Heterogeneity Push towards 2-tier systems made systems heterogeneous. RPC is a mechanism to bridge heterogeneous systems Client and server platforms may be different. Naïve approach is to make all possible combinations of C/S stubs More efficient approach is to use some intermediate representation Client and server stubs need to know how to translate between their native and the intermediate representation IDL can be used to define such a mapping from concrete to intermediate representation We can ignore differences in terms of machine architecture, programming language and used type system. Used to define the exchange data representation, parameter values, etc. 16

RPC and Related Middleware Extensions to RPC RPC is inherently a call to a local l function in a program synchronous, sequential, blocking for a client. threading model employed at the server side. Asynchronous RPC Basis for Message-Oriented Middleware and Message Brokers Non-blocking at the client side Client stub provides two entry points to invoke a procedure and to retrieve the result Result retrieval can generate error (result not ready!!!) or failure code (server side problem). Stubs basically execute synchronously while client has an illusion of async behavior. Much more sophisticated infrastructure is needed than stubs Recovery from failures is problematic, it requires some queuing which eventually lead to TP monitors and Message Brokers. 17

Technical Solution Transaction Processing (TP) Monitor 18

TP Monitor Introduction Transaction Processing (TP) Monitor Oldest, well understood, well studied, tested, most efficient form of middleware. IBM Customer Information and Control System (CICS) 1960s and still in use today Efficient multiplexing of resources among concurrent users of mainframes. Relying on heavy usage of multithreading and data consistency which eventually lead to transactions. Developed to bypass the limitations of early operating systems CICS can create and dispatch a thread faster than operating systems. TP-Lite vs. TP-Heavy Lite has only a core functionality of TP Monitor as an additional layer over database management systems. Cornerstone of many N-tier systems nowadays IBM CICS, Microsoft MTS, BEA Tuxedo, etc. 19

TP Monitor Transactional RPC TP Monitor supports the execution of distributed transactions. It is implemented as an abstraction layer over RPC called Transactional RPC (TRPC). RPC assumes independency between multiple calls even though they may be interrelated. In case of partial system failures these interdependencies may be problematic. Without any middleware support mechanism must be implemented by client itself. The solution is to extend RPC protocol to wrap a series of calls into a transaction. 20

TP Monitor Transactional RPC Concept of transaction is developed in the context of Database Management Systems (DBMS). Transaction represents a set of operations characterized by the so called ACID properties. TRPC provides a possibility to enforce ACID properties when dealing with data distributed across multiple (and heterogeneous) systems. Procedure calls enclosed within the transactional brackets are an atomic unit of work. Beginning g of Transaction (BOT) and End of Transaction (EOT) RPC call. Infrastructure guarantees their atomicity. Transaction Management module is responsible to coordinate interactions between clients and servers. 21

TP Monitor Encapsulating an RPC call in transactional brackets 22

TP Monitor Two-Phase Commit (2PC) Distributed transactions are done in a context of 2PC protocol Commercially first used within CICS, Standardized within X/Open specification. Commit is executed in context of two phases Phase 1 Contacting each server involved in transaction by sending a prepare to commit message If server successfully executed the TRPC procedure it answers with ready to commit. In opposite server replies with abort. Phase 2 Transaction manager examines all answers and decides what to do In case of all ready to commit answers it instructs each and every server to commit the local changes. If at least one server responded with abort all servers are requested to roll back. Fault tolerance in 2PC is achieved through logging Situation before the failure occurred can be reconstructed to recover the system. It can have performance impacts. 23

TP Monitor Functionality of a TP Monitor TP Monitor provides functionality necessary to develop, run, manage, and maintain transactional distributed systems which includes: Basic RPC functionality Programming abstractions to deal with TRPC (BOT, EOT, callback, commit, etc.) Transactional Manager which includes logging, recovery, locking, etc. Monitor systems for scheduling, assigning priorities, load balancing. Run-time environment as a computational ti background for all the applications suing TPM Specialized components such as protocol managers for interacting with different systems, s, and Tools for installing, managing and monitoring the performance of all these components. 24

Technical Solution Object Brokers 25

Object Brokers Introduction Object Broker represents a middleware to support interoperability between objects. They appeared in 1990s as the natural evolution of RPC to cope with the increasingly popular object-oriented programming paradigm. They also provide services that simplify the development of distributed OO applications. i At the beginning g they offered exactly the same functionality as RPC provides Hiding abstraction of distributed calls. Features of the object-oriented paradigm (inheritance and polymorphism) are making the process a bit more complex. Later they have been added location transparency, dynamic binding, object lifecycle management, and persistence. 26

Object Brokers CORBA Common Object Request Broker Architecture t (CORBA) is the bestknown example of object broker paradigm Architecture and specification, no reference implementation. It gained tremendous popularity in 1990s. Developed in early 1990s by Object Management Group (OMG). Other popular solutions include: Distributed COM by Microsoft.NET by Microsoft Java 2 Enterprise Edition (J2EE) by Sun Microsystems (now Oracle). OMG is trying to align CORBA with recent trends and to extend it with richer feature set provided by J2EE. 27

Object Brokers System Architecture 28

Object Brokers System Architecture CORBA-based system is made of 3 parts: Object Request Broker provides basic object interoperability functionality. CORBA services A set of services accessible through APIs Provide common and standardized functionality persistence, security, life cycle, etc. CORBA facilities High-level services needed by applications rather than individual objects like document management, i18n, mobile agent support, etc. 29

Object Brokers How CORBA works? 30

Object Brokers How CORBA works? In order to be accessible through h an ORB object needs to declare interface Similarly to RPC we rely on CORBA s IDL. Supported OO features such as inheritance and polymorphism. Compiler generates stubs and skeletons. All programmer needs to know is server s IDL interface. 31

Object Brokers CORBA Dynamic Service Selection and Invocation Alongside with of static ti interface binding CORBA allows dynamic discovery and invocation of objects by relying on two components: Interface repository Stores IDL definitions of all objects associated to an ORB. Applications can access the repository to browse, edit and delete IDLs. Dynamic invocation interface Provides operations such as get_interface and create_request request for repository browsing and dynamic method invocation construction. References to service objects are retrieved through CORBA s Naming and Trading services Trading service enables search for service objects based on their properties Naming service resolves object names into object references. Semantics is an issues ontologies shared between clients and service objects are missing. 32

Object Brokers CORBA Encapsulation Encapsulation refers to the possibility to hide the internals of an object implementation pe e tato from clients. It s present to some extent already in RPC and TP Monitor approaches, but it fits perfectly with CORBA. In CORBA there is no need to use same programming g languages g and operating systems Client and server are totally detached. IDL represents the connecting point. CORBA standardizes mappings between IDL and various programming languages This feature is eliminating the heterogeneous behavior of IDL compilers. Location independence contributes to encapsulation Reference to a server object is just an identifier. 33

Technical Solution Message-Oriented Middleware 34

Message-Oriented Middleware Introduction Asynchronous communication is in the heart of Message-Oriented Oi Middleware (MOM) RPC also had an extension to cope with asynchronous calls TP Monitors introduced queues to implement message-based interactions. Modern MOM is descendent of queuing systems found in TP Monitors Used for batch processing but later switched to cope with the interoperability issues in the context of multiple heterogeneous systems and programming languages. Major approach to integrate information systems and applications today is by relying on MOM Current solutions in the area include IBM Web Sphere MQ, Microsoft Message Queuing (MSQM), but also CORBA has it s service. 35

Message-Oriented Middleware Message-Based Interoperability It refers to an interaction ti paradigm where clients and service providers communicate by exchanging messages. Message is a structured data set characterized by its type and a set of pairs consisting of names and values. Client and service provider must agree on the set of message types exchanged during the communication. MOM supports message-based interoperability. Difference between client and server is here blurred. 36

Message-Oriented Middleware Message Queues Messages sent by a MOM client are placed into a queue. Queue is identified by a name and possibly bound to a specific intended recipient. Recipient picks up and processes the message when suitable. More robust on failures, flexible in terms of performance optimizations: Queues may be shared between applications. Messages may have priorities. 37

Message-Oriented Middleware Transactional Queues Transactional queuing = reliable messaging. Messages will be delivered once and only once even if MOM goes down between delivery Messages are persisted. The system also copes with failures Recipients mat bundle a couple of messages into atomic the units. In cased of failure at consumer side the messages are placed back in the queue to be consumed again. From the producer point of view messages in the queue inside the transactional brackets are valid and visible only until execution of atomic unit is completed. In case of some unrecoverable failures they must be deleted from the queue. Putting back messages in the queue may be problematic Messages may be trapped between the failing receiver and queue. Sender mat not be notified about the problem. 38

Illustration By a Larger Example 39

Illustration by a larger example Java RMI Java Standard Edition comes bundled with the compilers and libraries needed to implement solutions based on object-oriented RPC Java TM Remote Method Invocation (RMI) Java TM RMI enables development of Java2Java based applications in which methods of remote Java objects can be invoked from other JVMs. It uses object serialization to marshal and unmarshal parameters. The Hello World example http://java.sun.com/javase/technologies/core/basic/rmi/index.jsp 40

Illustration by a larger example Java RMI Steps needed d to implement, compile and execute RMI application in Java: 1. Define the remote interface 2. Implement the server 3. Implement the client 4. Compile the source files 5. Start the Java RMI registry, server, and client 41

Illustration by a larger example Define the Remote Interface 42

Illustration by a larger example Implement the Server 43

Illustration by a larger example Implement the Client 44

Illustration by a larger example Compile the Source Files and Starting the System Compiling the source files Starting the RMI Registry, Server Object and Client 45

Summary 46

Summary Middleware represents a set of solutions to the common problems occurring during the integration of systems and application in the multitier systems. During the previous years a number of middleware solutions have been proposed according to the different programming paradigms RPC, TP Monitors, Object Brokers, and Message-Oriented Middleware. As such middleware is today indispensable in course of creating robust, fail safe and complex distributed information systems. 47

References 48

References Mandatory reading Gustavo Alonso, Fabio Casati, Harumi Kuno, and Vijay Machiraju. Web Services - Concepts, Architectures and Applications. Springer-Verlag, 2004. second chapter Wiki and Web references Middleware http://en.wikipedia.org/wiki/middleware IDL http://en.wikipedia.org/wiki/interface p _ description _ language g RPC http://en.wikipedia.org/wiki/remote_procedure_call Transaction processing http://en.wikipedia.org/wiki/transaction_processing CICS http://en.wikipedia.org/wiki/cics ACID http://en.wikipedia.org/wiki/acid Two phase commit http://en.wikipedia.org/wiki/2pc CORBA http://en.wikipedia.org/wiki/common_object_request_broker_architecture ORB http://en.wikipedia.org/wiki/object_request_broker MOM http://en.wikipedia.org/wiki/message-oriented_middleware J2EE http://en.wikipedia.org/wiki/j2ee / iki/j2ee 49

Next Lecture # Title 1 Distributed Information Systems 2 Middleware 3 Web Technologies 4 Web Services 5 Basic Web Service Technologies 6 Web 2.0 Services 7 Web Service Security 50

Questions? 51