Distributed Systems Middleware Prof Nalini Venkatasubramanian Dept of
Distributed Systems Middleware Prof. Nalini Venkatasubramanian Dept. of Information & Computer Science University of California, Irvine 1
CS 237 - Distributed Systems Middleware – Spring 2010 Lecture 1 - Introduction to Distributed Systems Middleware Mondays, Wednesdays 9: 30 -10: 50 p. m. Prof. Nalini Venkatasubramanian nalini@ics. uci. edu Intro to Distributed Systems Middleware 2
Course logistics and details z Course Web page yhttp: //www. ics. uci. edu/~cs 237 z Lectures - MW 9: 30 -10: 50 p. m z Reading List x. Technical papers and reports x. Reference Books Intro to Distributed Systems Middleware 3
Course logistics and details z Homeworks y. Paper summaries y. Survey paper z Course Presentation z Course Project y. Maybe done individually or in groups y. Potential projects will be available on webpage Intro to Distributed Systems Middleware 4
Comp. Sci 237 Grading Policy z Homeworks - 30% • 1 paper summary due every week • (3 randomly selected each worth 10% of the final grade). z Project Survey Paper - 10% z Class Presentation - 10% z Class Project - 50% of the final grade z Final assignment of grades will be based on a curve. Intro to Distributed Systems Middleware 5
Lecture Schedule y. Weeks 1, 2, 3: Fundamentals x. Middleware and Distributed Systems Fundamentals • • • General Purpose Middleware , Adaptive Middleware Distributed Operating Systems Messaging, Communication in Distributed Systems Naming and Directory Services Distributed I/O and Storage Subsystems Distributed Resource Management y. Weeks 5, 6, 7: Middleware Frameworks x. Distributed Computing Frameworks - DCE x. Object-based Middleware –CORBA, COM x. Java Based Technologies – Java RMI, JINI, J 2 EE, EJB x. Database access and integration middleware (ODBC, JDBC, mediators) x. Service Oriented Architectures • . NET, Web Services, SOAP, REST, Service Gateways x. Messaging Technologies • XML Based Middleware, Publish/Subscribe Technologies Intro to Distributed Systems Middleware 6
Course Schedule y. Weeks 8, 9 and 10: Middleware for Distributed Application Environments x. Real-time and Qo. S-enabled middleware x. Middleware for Fault tolerant applications x. Middleware for Mobile and Pervasive Environments x. Middleware for P 2 P architectures x. Middleware for Grid/Cloud Computing x. Middleware for Secure applications Intro to Distributed Systems Middleware 7
What is Middleware? z Middleware is the software between the application programs and the operating System and base networking z Integration Fabric that knits together applications, devices, systems software, data z Middleware provides a comprehensive set of higher-level distributed computing capabilities and a set of interfaces to access the capabilities of the system. Intro to Distributed Systems Middleware 8
The Evergrowing Alphabet Soup Distributed Computing Environment (DCE) Orbix IOP IIOP GIOP WSDL WS-BPEL WSIL Java Transaction API (JTA) JNDI LDAP JMS BPEL BEA Tuxedo® Object Request Broker (ORB) EAI RTCORBA SOAP Message Queuing (MSMQ) Distributed Component XQuery Object Model (DCOM) opal. ORB XPath Remote Method Invocation TM INI ORBlite Encina/9000 (RMI) Rendezvous Enterprise BEA Web. Logic® Java. Beans Remote Procedure Call Technology (RPC) (EJB) Extensible Markup Language (XML) ZEN IDL J Borland® Visi. Broker®
Distributed Systems Multiple independent computers that appear as one y. Lamport’s Definition x“ You know you have one when the crash of a computer you have never heard of stops you from getting any work done. ” y“A number of interconnected autonomous computers that provide services to meet the information processing needs of modern enterprises. ” Intro to Distributed Systems Middleware 11
Examples of Distributed Systems z Banking systems z Communication - email z Distributed information systems y. WWW y. Federated Databases z Manufacturing and process control z Inventory systems z General purpose (university, office automation) Intro to Distributed Systems Middleware 12
Characterizing Distributed Systems z Multiple Computers yeach consisting of CPU’s, local memory, stable storage, I/O paths connecting to the environment z Interconnections ysome I/O paths interconnect computers that talk to each other z Shared State ysystems cooperate to maintain shared state ymaintaining global invariants requires correct and coordinated operation of multiple computers. Intro to Distributed Systems Middleware 13
Why Distributed Computing? z Inherent distribution y. Bridge customers, suppliers, and companies at different sites. z Speedup - improved performance z Fault tolerance z Resource Sharing y. Exploitation of special hardware z Scalability z Flexibility Intro to Distributed Systems Middleware 14
Why are Distributed Systems Hard? z Scale ynumeric, geographic, administrative z Loss of control over parts of the system z Unreliability of message passing yunreliable communication, insecure communication, costly communication z Failure y. Parts of the system are down or inaccessible y. Independent failure is desirable Intro to Distributed Systems Middleware 15
Design goals of a distributed system z Sharing y. HW, SW, services, applications z Openness(extensibility) yuse of standard interfaces, advertise services, microkernels z Concurrency ycompete vs. cooperate z Scalability yavoids centralization z Fault tolerance/availability z Transparency ylocation, migration, replication, failure, concurrency Intro to Distributed Systems Middleware 16
• Personalized Environment • Predictable Response • Location Independence • Platform Independence • Flexibility • Code Reusability • Real-Time Access • Increased • Interoperability to information Complexity • Portability • Lack of Mgmt. • Scalability • Reduced Tools • Faster Developmt. Complexity And deployment of • Changing Business Solutions Technology ORGANIZATION Intro to Distributed Systems Middleware System Administrator Application Developer END-USER [Khanna 94] 17
Application Systems: support enterprise systems Distributed Computing Platform • Application Support Services (OS, DB support, Directories, RPC) • Communication Network Services (Network protocols, Physical devices) • Hardware Intro to Distributed Systems Middleware Interoperability Portability Integration Management and Support Network Management Enterprise Systems: Perform enterprise activities 18
Application Systems: User Processing Data files & Interfaces programs Databases Distributed Computing Platform • Application Support Services Dist. Data Distributed C/S Support Trans. Mgmt. OS Interoperability Portability Integration Management and Support Network Management Enterprise Systems: • Engineering systems • Manufacturing • Office systems • Business systems Common Network Services • Network protocols & interconnectivity OSI TCP/IP SNA protocols Intro to Distributed Systems Middleware 19
Classifying Distributed Systems z Based on degree of synchrony y. Synchronous y. Asynchronous z Based on communication medium y. Message Passing y. Shared Memory z Fault model y. Crash failures y. Byzantine failures Intro to Distributed Systems Middleware 20
Computation in distributed systems z Asynchronous system y no assumptions about process execution speeds and message delivery delays z Synchronous system y make assumptions about relative speeds of processes and delays associated with communication channels y constrains implementation of processes and communication z Models of concurrency y Communicating processes y Functions, Logical clauses y Passive Objects y Active objects, Agents Intro to Distributed Systems Middleware 21
Concurrency issues z Consider the requirements of transaction based systems y. Atomicity - either all effects take place or none y. Consistency - correctness of data y. Isolated - as if there were one serial database y. Durable - effects are not lost z General correctness of distributed computation y. Safety y. Liveness Intro to Distributed Systems Middleware 22
Communication in Distributed Systems z Provide support for entities to communicate among themselves y. Centralized (traditional) OS’s - local communication support y. Distributed systems - communication across machine boundaries (WAN, LAN). z 2 paradigms y. Message Passing x. Processes communicate by sharing messages y. Distributed Shared Memory (DSM) x. Communication through a virtual shared memory. Intro to Distributed Systems Middleware 23
Message Passing z Basic communication primitives y Send message y Receive message z Modes of communication y Synchronous xatomic action requiring the participation of the sender and receiver. x. Blocking send: blocks until message is transmitted out of the system send queue x. Blocking receive: blocks until message arrives in receive queue y Asynchronous x. Non-blocking send: sending process continues after message is sent x. Blocking or non-blocking receive: Blocking receive implemented by timeout or threads. Non-blocking receive proceeds while waiting for message. Message is queued(BUFFERED) upon arrival. Intro to Distributed Systems Middleware 24
Reliability issues z Unreliable communication y. Best effort, No ACK’s or retransmissions y. Application programmer designs own reliability mechanism z Reliable communication y. Different degrees of reliability y. Processes have some guarantee that messages will be delivered. y. Reliability mechanisms - ACKs, NACKs. Intro to Distributed Systems Middleware 25
Reliability issues z Unreliable communication y. Best effort, No ACK’s or retransmissions y. Application programmer designs own reliability mechanism z Reliable communication y. Different degrees of reliability y. Processes have some guarantee that messages will be delivered. y. Reliability mechanisms - ACKs, NACKs. Intro to Distributed Systems Middleware 26
Distributed Shared Memory z Abstraction used for processes on machines that do not share memory y. Motivated by shared memory multiprocessors that do share memory z Processes read and write from virtual shared memory. y. Primitives - read and write y. OS ensures that all processes see all updates z Caching on local node for efficiency y. Issue - cache consistency Intro to Distributed Systems Middleware 27
Remote Procedure Call z Builds on message passing y extend traditional procedure call to perform transfer of control and data across network y Easy to use - fits well with the client/server model. y Helps programmer focus on the application instead of the communication protocol. y Server is a collection of exported procedures on some shared resource y Variety of RPC semantics x“maybe call” x“at least once call” x“at most once call” Intro to Distributed Systems Middleware 28
Fault Models in Distributed Systems z Crash failures y. A processor experiences a crash failure when it ceases to operate at some point without any warning. Failure may not be detectable by other processors. x. Failstop - processor fails by halting; detectable by other processors. z Byzantine failures ycompletely unconstrained failures yconservative, worst-case assumption for behavior of hardware and software ycovers the possibility of intelligent (human) intrusion. Intro to Distributed Systems Middleware 29
Other Fault Models in Distributed Systems z Dealing with message loss y. Crash + Link x. Processor fails by halting. Link fails by losing messages but does not delay, duplicate or corrupt messages. y. Receive Omission xprocessor receives only a subset of messages sent to it. y. Send Omission xprocessor fails by transmitting only a subset of the messages it actually attempts to send. y. General Omission x. Receive and/or send omission Intro to Distributed Systems Middleware 30
Other distributed system issues z Concurrency and Synchronization z Distributed Deadlocks z Time in distributed systems z Naming z Replication yimprove availability and performance z Migration yof processes and data z Security yeavesdropping, masquerading, message tampering, replaying Intro to Distributed Systems Middleware 31
Traditional Systems Client/Server Computing z Client/server computing allocates application processing between the client and server processes. z A typical application has three basic components: y. Presentation logic y. Application logic y. Data management logic Intro to Distributed Systems Middleware 32
Client/Server Models z There at least three different models for distributing these functions: y. Presentation logic module running on the client system and the other two modules running on one or more servers. y. Presentation logic and application logic modules running on the client system and the data management logic module running on one or more servers. y. Presentation logic and a part of application logic module running on the client system and the other part(s) of the application logic module and data management module running on one or more servers Intro to Distributed Systems Middleware 33
Distributed Systems Middleware y. Enables the modular interconnection of distributed software (typically via services) xabstract over low level mechanisms used to implement resource management services. y. Computational Model x. Support separation of concerns and reuse of services y. Customizable, Composable Middleware Frameworks x. Provide for dynamic network and system customizations, dynamic invocation/revocation/installation of services. x. Concurrent execution of multiple distributed systems policies. Intro to Distributed Systems Middleware 34
Modularity via Middleware Services Application Program API Middleware Service 1 API Middleware Service 2 Intro to Distributed Systems Middleware API Middleware Service 3 35
Useful Middleware Services y. Naming and Directory Service y. State Capture Service y. Event Service y. Transaction Service y. Fault Detection Service y. Trading Service y. Replication Service y. Migration Service Intro to Distributed Systems Middleware 36
Types of Middleware Services z Integrated Sets of Services -- DCE z Domain Specific Integration frameworks z Distributed Object Frameworks z Component services and frameworks y. Provide a specific function to the requestor y. Generally independent of other services y. Presentation, Communication, Control, Information Services, computation services etc. z Web-Service Based Frameworks Intro to Distributed Systems Middleware 37
Integrated Sets Middleware z An Integrated set of services consist of a set of services that take significant advantage of each other. z Example: DCE Intro to Distributed Systems Middleware 38
Distributed Computing Environment (DCE) z DCE is from the Open Software Foundation (OSF), and now X/Open, offers an environment that spans multiple architectures, protocols, and operating systems. y. DCE supported by major software vendors. z It provides key distributed technologies, including RPC, a distributed naming service, time synchronization service, a distributed file system, a network security service, and a threads package. Intro to Distributed Systems Middleware 39
DCE Distributed File Service DCE Security DCE Other Basic Service Distributed Directory Services Time Service Management Applications DCE Remote Procedure Calls DCE Threads Services Operating System Transport Services Intro to Distributed Systems Middleware 40
Integration Frameworks Middleware z Integration frameworks are integration environments that are tailored to the needs of a specific application domain. z Examples y. Workgroup framework - for workgroup computing. y. Transaction Processing monitor frameworks y. Network management frameworks Intro to Distributed Systems Middleware 41
Distributed Object Computing z Combining distributed computing with an object model. y. Allows software reusability y. More abstract level of programming y. The use of a broker like entity or bus that keeps track of processes, provides messaging between processes and other higher level services y. Examples x. CORBA, COM, DCOM x. JINI, EJB, J 2 EE x. NET, E-SPEAK Distributed Systems x. Note: DCE uses. Intro a to procedure-oriented distributed Middleware systems model, not an object model. 42
Issues with Distributed Objects y. Abstraction y. Performance y. Latency y. Partial failure y. Synchronization y. Complexity Intro to Distributed Systems Middleware 43
Techniques for object distribution y. Message Passing x. Object knows about network; Network data is minimum y. Argument/Return Passing x. Like RPC. Network data = args + return result + names y. Serializing and Sending Object x. Actual object code is sent. Might require synchronization. Network data = object code + object state + sync info y. Shared Memory xbased on DSM implementation to Distributed Systems x. Network Data Intro = Data touched + synchronization info Middleware 44
CORBA z CORBA is a standard specification for developing object-oriented applications. z CORBA was defined by OMG in 1990. z OMG is dedicated to popularizing Object. Oriented standards for integrating applications based on existing standards. Intro to Distributed Systems Middleware 45
The Object Management Architecture (OMA) Common facilities Application Objects Object Request Broker Object Services Intro to Distributed Systems Middleware 46
OMA z ORB: the communication hub for all objects in the system z Object Services: object events, persistent objects, etc. z Common facilities: accessing databases, printing files, etc. z Application objects: document handling objects. Intro to Distributed Systems Middleware 47
- Slides: 46