Presentation is loading. Please wait.

Presentation is loading. Please wait.

16 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.

Similar presentations

Presentation on theme: "16 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors."— Presentation transcript:

1 16 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors 3.Object brokers 4.Object monitors 5.Message-oriented middleware 6.Message brokers  

2 16 September 2008CIS 340 # 2 Generative Phases of Middleware Remote Procedure Call sockets TCP, UDP Internet Protocol (IP) Remote Procedure Call: hides communication details behind a procedure call helps bridge heterogeneous platforms sockets: operating system level interface to the underlying communication protocols TCP, UDP: User Datagram Protocol (UDP) transports data packets without guarantees Transmission Control Protocol (TCP) verifies correct delivery of data streams Internet Protocol (IP): moves a packet of data from one node to another Transactional RPC Object oriented RPC (RMI) Asynchronous RPC TP-Monitors Object brokers Message brokers Application servers Specialized forms of RPC typically with additional functionality or properties almost always running on RPC platforms

3 16 September 2008CIS 340 # 3 Basic Middleware: RPC What does an RPC system do? Hides distribution behind procedure calls interface definition language (IDL)Provides an interface definition language (IDL) to describe the services Generates all the additional code necessary to make a procedure call remote and to deal with all the communication aspects binder/bindingProvides a binder/binding in case it has a distributed name and directory service system Basis for 2- tier, client/server First introduction of elements common to all middleware

4 Basic Middleware: Transaction Monitor (TP-M) What is a Transaction? Where is the Problem? Transaction Monitor (TP-M) 16 September 2008CIS 340 # 4

5 11 September 2008CIS 340 # 5 What is a Transaction? Logical unit of work that must be either entirely completed or aborted Reads from and/or writes to a database –Simple SELECT statement –Series of related UPDATE statements changing values in various tables –Series of INSERT statements to add rows to one or more tables –Combination of SELECT, UPDATE, and INSERT statements –Equivalent of a single SQL statement in an application program doing the aboveDef:

6 11 September 2008CIS 340 # 6 Where is the Problem? Successful transaction changes database from one consistent state to another –One in which all data integrity constraints are satisfied integrity Unsuccessful -- improper or incomplete transactions can have devastating effect on database integrity –Some DBMSs offer enforceable integrity constraints –Other integrity rules are enforced automatically by the DBMSDef:

7 Where is the Problem? RPC is a point to point protocol in the sense that it supports the interaction between two entities –the client and the server When there are more entities interacting with each other RPC treats the calls as independent of each other, however, the calls are not independent –a client with two servers, –a client with a server and the server with a database Recovering from partial system failures is very complex. –For instance, the order was placed but the inventory was not updated, –payment was made but the order was not recorded … Avoiding these problems using plain RPC systems is very cumbersome 16 September 2008CIS 340 # 7

8 16 September 2008CIS 340 # 8

9 Transactional RPC (TRPC) The solution to this limitation is to make RPC calls transactional, –that is, instead of providing plain RPC, the system should provide TRPC What is TRPC? –same concept as RPC plus … –additional language constructs and run time support (additional services) to bundle several RPC calls into an atomic unit –usually, it also includes an interface to databases for making end-to-end transactions using the XA standard (implementing 2 Phase Commit)2 Phase Commit –and anything else the vendor may find useful (transactional callbacks, high level locking, etc.) 16 September 2008CIS 340 # 9

10 11 September 2008CIS 340 # 10 XA Protocol Describes how DB should interact in a distributed environment XA compliant is attribute of all major open DB systems “Tuxedo” (orig. AT&T; BEA Inc.) “Encina” (IBM absorbed) “CICS” (IBM) database DBMS client server database DBMS server TM TP monitor XA

11 11 September 2008CIS 340 # 11 Transaction Monitor (TP-M) Software for controlling a transaction server Thread allocation from available pool of threads Acts as intermediary between client, server, and resource managers Since capacity available… Performs systems management Handles transaction security May route messages based on content e.g. DBMS

12 16 September 2008CIS 340 # 12 TP-Monitors = Transactional RPC Extends transactional behavior beyond the database domain Provides the mechanisms and tools necessary to give transactional guarantees via applications Are, perhaps, the best, oldest, and most complex example of middleware Have traditionally been associated with the mainframe world Further, –Their functionality has been incorporated into most middleware tools

13 16 September 2008CIS 340 # 13 client 1. BOT 4. procedure call 10. EOT client stub 2.register txn & create context 5.add txn id & context to call 11.request commit 14.confirm termination client process server 9. procedure server stub 6. extract context and txn id 7. register server for txn 13. participate in 2PC server process transaction manager 3. create txn id register txn register client for txn return txn id 8. lookup txn id register server for txn 12. lookup txn id run 2PC notify client of outcome Copyright Springer Verlag Berlin Heidelberg 2004 “Encapsulating an RPC within Transactional Brackets” (p. 49)

14 16 September 2008CIS 340 # 14 TP-Heavy vs. TP-Light = 2 tier vs. 3 tier TP-Heavy: –A full development environment –Additional services persistent queues transactional services priority scheduling buffering authentication own solutions for “operating systems tasks” –communication –replication –load balancing –storage management TP-Lite: –“Database extension” –No provided development environment –Implemented as threads, not processes –Based on stored procedures, triggers Arose as databases provided more services "methods" stored in the database To perform an explicit data taskDef:

15 16 September 2008CIS 340 # 15 TP-Heavy vs. TP-Light = 2 tier vs. 3 tier TP-Heavy: Main purpose? To provide an execution environment for resource managers (e.g. applications) with guaranteed reasonable performance “traditional”.....CICS, Encina, Tuxedo.....CICS, Encina, Tuxedo TP-Lite: Main purpose? To provide transactional RPC Complex query implemented as a stored procedure client “invoked” the stored procedure, not running the query transaction == stored procedure stored procedure languages: Sybase's Transact- SQLSybase's Transact- SQL Oracle's PL/SQLOracle's PL/SQL.

16 16 September 2008CIS 340 # 16 Databases as a 2 Tier Approach What if business logic requiring data resided IN the database? Not just the data.... Capabilities (tools) needed in the DBMS? Triggers Replication Stored procedures Queuing systems Standard access interfaces EX:ODBC, JDBC user defined application logic database resource manager external application database developing environment client database management system

17 CORBA Common Object Request Broker Architecture Key parts: –Object Request Broker (ORB) in charge of the interaction between components –CORBA services Standard definitions of system services –Standardized IDL language for publication of interfaces –Protocols for allowing ORBs to talk to each other HISTORY? An attempt to modernize RPC How? Object orientation Defined, shared standard Client (CORBA object) Server (CORBA object) client stub (proxy) server stub (skeleton) CORBA library CORBA Basic Object Adaptor Object Request Broker (ORB) Marshalling serialization CORBA services interface to remote calls In charge of component interactions Standardized definition of services defined via IDL accepted standard

18 16 September 2008CIS 340 # 18 CORBA Follows the RPC Model, But Better How? RPC Is an inter-process communication mechanism CORBA Is a reference architecture that includes an inter- process communication mechanism Development Like RPC: –Define the services using IDL –Compile the definition using an IDL compiler –Client stub produced –Method signaturesservices stored in an interface repository –Program the client and link it with its stub –Program the server and link it with its stub Unlike RPC: –Stubs are independent of operating system and a programming language

19 16 September 2008CIS 340 # 19 Objects Everywhere: IIOP and GIOP ORBs maintain correspondence between object reference and “actual” object location CORBA-compliant ORBs use the General Inter-ORB Protocol (GIOP) Internet Inter-ORB Protocol (IIOP) specifies how GIOP messages are translated into TCP/IP Rational idea........however Superseded by Web services Client (CORBA object) Server (CORBA object) ORB 1 ORB 2 GIOP IIOP GIOP IIOP Internet (TCP/IP) ORBs maintain correspondence between object reference and “actual” object location CORBA-compliant ORBs use the General Inter-ORB Protocol (GIOP) Internet Inter-ORB Protocol (IIOP) specifies how GIOP messages are translated into TCP/IP Rational idea........ However too late Superseded by Web services

20 16 September 2008CIS 340 # 20 Best Of Two Worlds: Object Monitors MW is a Evolving technology NOT competing technology Complementing technology OBJECT REQUEST BROKERS (ORBs): Reuse and distribution of components via a standard Object oriented interface Various services/methods to enhance component interaction add semantics to the interaction between components TRANSACTION PROCESSING MONITORS: An environment Focus upon transactional interaction Offers tools necessary to achieve ACID

21 16 September 2008CIS 340 # 21 Best Of Two Worlds: Object Monitors Evolving technology NOT competing technology Complementing technology How about ……… Object Transaction Monitors? Object Monitor = ORB + TP-Monitor

22 16 September 2008CIS 340 # 22 Message-Based Interaction Advantages Better than synchronous systems Particularly for lagged business interactionsParticularly for lagged business interactions Less of a client server flavor More of an exchange of information between partnersMore of an exchange of information between partners Affects how the interactions become / realize interconnected business processes If standardized messages, Then off-the-shelf systems can be created that can process such messagesThen off-the-shelf systems can be created that can process such messages Core paradigm behind new wave interactions of web servicesCore paradigm behind new wave interactions of web services Sounds like goal of EDI ??? ………..Yes, but ……….. technology had not been there

23 16 September 2008CIS 340 # 23 Message-Based Interaction: Message? Generally An information unit System sends to the user or system operator About the status of an operation, an error, or other condition As telecommunication or data access methods The unit of information or data Transmitted from one program or user to another In messaging paradigm The formal exchange of event notification, requests, or replies between programs through a messaging servermessaging server specified formatIt is the data in a specified format Describes an event, a request, or a reply between programs

24 16 September 2008CIS 340 # 24 Message Brokers Advanced queuing systems Capable of associating application logic to a queue Queues no longer passive transmitter of messages Active process   transform or move the message based on business rules defined queue Business processes == Message sequences Paradigm to promote enterprise application integration (EAI) NOTE: Queuing management systems (QMS) Implement queues Move messages No business logic attached BUT …. Enable asynchronous interaction Application logic Message Broker adapter APP 1 adapter APP 1 adapter APP 1 adapter APP 1 adapter APP 1

25 EAI An integration framework composed of a collection of technologies and services which form a middleware to enable integration of systems and applications across the enterprise.middleware Examples –Supply chain management applications (for managing inventory and shipping), Supply chain management –Customer relationship management applications (for managing current and potential customers), business intelligence applications (for finding patterns from existing data from operations),Customer relationship managementbusiness intelligence –and other types of applications (for managing data such as human resources data, health care, internal communications, etc.) typically cannot communicate with one another in order to share data or business rules.human resources Problem –This lack of communication leads to inefficiencies, wherein identical data are stored in multiple locations, or straightforward processes are unable to be automated. Solution –EAI is the process of linking such applications within a single organization together in order to simplify and automate business processes to the greatest extent possible, while at the same time avoiding having to make sweeping changes to the existing applications or data structures. 16 September 2008CIS 340 # 25

26 16 September 2008CIS 340 # 26 Message Brokers Across Organizations Application logic Message broker adapter APP 1 adapter APP 1 adapter APP 1 adapter APP 1 adapter APP 1 Application logic Message broker adapter APP 1 adapter APP 1 adapter APP 1 adapter APP 1 adapter APP 1

27 16 September 2008CIS 340 # 27 Message Brokers: Limitations Very efficient and very flexible infrastructures for EAI IF messages are not too big granularity has to be fine mapping business process   queues is well understood and well documented

28 16 September 2008CIS 340 # 28 “Old-Fashioned” E-Commerce...

29 Using Workflows with ebXML ©BEA SEE: For ebXML …electronic business “Query Price and Availability”

30 16 September 2008CIS 340 # 30 Conventional Middleware Today (p1/2) RPC Core of any middleware platform Even if asynchronous interaction HOWEVER …… part of the low level infrastructure and it is rarely used directly by application developers TP-Monitors Still important NOW …… components in larger systems hidden behind additional layers base for enterprise application integration (EAI) functionality migrating to the low levels of the infrastructure becoming invisible to the developer

31 16 September 2008CIS 340 # 31 Conventional Middleware Today (p2/2) CORBA Being replaced by other platforms “Good aspects” being carried into new MW Inhibiting emerging technologies: 1.Quick adoption of Java & Java Virtual Machine 2.Emergence of Internet and web 3.Rise J2EE and related technologies acceptance for web MW

32 16 September 2008CIS 340 # 32 “Ideal” Middleware Convergence to “Ideal” MANYIn practice, MANY types of middleware needed capabilityVarious products need to be understood based on their capability Existing systems implement a great deal of overlapping functionality: what in CORBA are called the services “Ideal” System COMMON INFRASTRUCTURE process management data management message management object management transaction management

33 16 September 2008CIS 340 # 33 Highlights That’s a lot of technology for 30 years? (1980s) middleware The term middleware first appeared “in the famous report of the 1968 NATO Software Engineering Conference:1968 NATO Software Engineering Conference


35 16 September 2008CIS 340 # 35 A different perspective Read Ch. 10 (dbms-text) Read website Starbucks Does Not Use Two- Phase Commit starbucks.html


37 16 September 2008CIS 340 # 37 Transactional Properties: ACID Test A A tomicity: atomic If several components must come together for a process, then each atomic process operates correctly or entire combination aborts C C onsistency: false or incorrect data is not introduced A service is correct when executed in its entirety and false or incorrect data is not introduced into the component databases I I solation: – isolated -- If several clients request the same service at the same time and access the same data, the overall result will be as if they were alone – isolated -- in the system D D urability: are complete and durable (have duration?) Completed transactions are complete and durable (have duration?) If necessary, redoing and undoing of changes in case of failures can occur TP-Monitor transactional coordination CLIENT services Application 1Application 3Application 2 user program CLIENT SERVER

Download ppt "16 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors."

Similar presentations

Ads by Google