Download presentation
Presentation is loading. Please wait.
Published byEthan Knight Modified over 9 years ago
1
© City University London, Dept. of Computing Distributed Systems / 2 - 1 Distributed Systems Session 2: Distributed Software Engineering Christos Kloukinas Dept. of Computing City University London Software Engineering: the study of techniques used to produce high-quality software
2
© City University London, Dept. of Computing Distributed Systems / 2 - 2 Outline 0 LAST Session Summary + additional material. 1 Motivation 2 The CORBA Object Model 3 The OMG Interface Definition Language (IDL) 4 Other Approaches 5 Summary
3
© City University London, Dept. of Computing Distributed Systems / 2 - 3 Summary & Key Points of Lecture 1 l What is a Distributed System? l Adoption of DS is driven by Non-Functional Requirements l Distribution needs to be transparent to users and application designers l Transparency has several dimensions l Transparency dimensions depend on each other
4
© City University London, Dept. of Computing Distributed Systems / 2 - 4 Definition l A distributed system consists of a collection of autonomous computers, connected through a network and distributed operating system software, which enables computers to coordinate their activities and to share the resources of the system, so that users perceive the system as a single, integrated computing facility. l Certain common characteristics can be used to assess distributed systems: Resource Sharing, Openness, Concurrency, Scalability, Fault Tolerance, and Transparency
5
© City University London, Dept. of Computing Distributed Systems / 2 - 5 Distributed System Types (Enslow 1978) Fully Distributed Data Processors Control Fully replicated Not fully replicated master directory Local data, local directory Master-slave Autonomous transaction based Autonomous fully cooperative Homog. special purpose Heterog. special purpose Homog. general purpose Heterog. general purpose
6
© City University London, Dept. of Computing Distributed Systems / 2 - 6 Dimensions Of Transparency Scalability Transparency Migration Transparency Access Transparency Performance Transparency Replication Transparency Location Transparency Failure Transparency Concurrency Transparency
7
© City University London, Dept. of Computing Distributed Systems / 2 - 7 1.3 Model of a Distributed System Component 1 Component n Middleware Network Operating System Hardware Host 1 Component 1 Component n Middleware Network Operating System Hardware Host n.. ………... Network
8
© City University London, Dept. of Computing Distributed Systems / 2 - 8 Middleware Examples l Transaction-oriented »IBM CICS »BEA Tuxedo »IBM Encina »MS Transaction Server l Message-oriented »MS Message Queue »NCR TopEnd »IBM MQSeries »Sun Tooltalk »Sun JavaSpaces l Procedural »Sun ONC »Linux RPCs »OSF DCE l Object-oriented »OMG CORBA »Sun Java/RMI »Microsoft COM »Sun Enterprise Java Beans
9
© City University London, Dept. of Computing Distributed Systems / 2 - 9 0.3 Client-Server Computing(O’Leary 2000) l A client is defined as a requester of services l A server is defined as a provider of services l A single machine can be both a client and a server depending on the software configuration
10
© City University London, Dept. of Computing Distributed Systems / 2 - 10 0.4 Client-Server (O’Leary 2000) l Processing can be improved because client and server share processing loads »Client/server computing considers that the client has computing power that is not being used »Fundamental idea is to break apart an application into components that can run on different platforms l Thin vs. Fat Clients: »a thin client has most of the functionality with server; »a fat client has most of the functionality with the client.
11
© City University London, Dept. of Computing Distributed Systems / 2 - 11 0.5 Two tier architectures l The user system interface is usually located in the user's desktop environment. l Database management services are usually in a server that is a more powerful machine that services many clients. l Processing management is split between the user system interface environment and the database management server environment. l The database management server provides stored procedures and triggers. l Good for LAN with work group users < 100
12
© City University London, Dept. of Computing Distributed Systems / 2 - 12 0.6 Three-Tiered Architecture l Three Tiered Architecture is an information model with distinct pieces -- client, applications services and data sources -- that can be distributed across a network. l Client Tier -- The user component displays information, processes, graphics, communications, keyboard input and local applications. l Applications Service Tier -- A set of sharable multitasking components that interact with clients and the data tier. It provides the controlled view of the underlying data sources. l Data Source Tier -- One or more sources of data such as mainframes, servers, databases, data warehouses, legacy applications etc.
13
© City University London, Dept. of Computing Distributed Systems / 2 - 13 0.7 Examples of three tier architectures l Three tier architecture with transaction processing monitor technology l Three tier with message server l Three tier with an application server l Three tier with an ORB architecture( e.g CORBA) l Distributed/collaborative enterprise architecture.
14
© City University London, Dept. of Computing Distributed Systems / 2 - 14 ORB CORBA IIOP ORB DBMS Lotus Notes TP Monitors Tier 2 Server Objects Tier 1 View Objects Legacy Applications Tier 3 Business Objects 0.8 Three Tier Client/Server Object Style
15
© City University London, Dept. of Computing Distributed Systems / 2 - 15 1 CORBA – Motivation & Overview l Distributed Systems consist of multiple components. l Components are heterogeneous. l Components still have to be interoperable. l There has to be a common model for components, which expresses »component states, »component services, and »interaction of components with other components.
16
© City University London, Dept. of Computing Distributed Systems / 2 - 16 1.1 Example1: Java Object Model & Java Language l Object »Runtime entity instance of class l Interface »declare a set of methods for a Java object without implementation l Method Invocation »primitive type passed by value »object references passed by value
17
© City University London, Dept. of Computing Distributed Systems / 2 - 17 1.2 Ex 2: Distributed Object Model (Wolrath et al) l Remote object »object whose methods can be accessed from another address space l Remote interface »an interface that declares the methods of a remote object throws Remote Exception to deal with different failure models l RMI »non-remote object passed by value »remote object passed by remote reference
18
© City University London, Dept. of Computing Distributed Systems / 2 - 18 1.3 CORBA Object Model & OMG IDL l Model describes components, states, interactions and other concepts l OMG/IDL is a language for expressing all concepts of the CORBA object model. »separation of interface from implementation »Enables interoperability and transparency »IDL compiles into client stubs and server skeletons »Stubs and skeletons serve as proxies for clients and servers, respectively
19
© City University London, Dept. of Computing Distributed Systems / 2 - 19 1.4 CORBA Client Object Request Broker Client Stub Request CORBA Object Implementations CORBA Services C++AdaCobolSmalltalkJavaC Server Skeleton IDL C++AdaCobolSmalltalkJavaC
20
© City University London, Dept. of Computing Distributed Systems / 2 - 20 1.5 Example1: StockQuoter IDL Interface module Quoter { //stock quoter server, some interface to query the prices of stock exception Invalid_Stock_Symbol {}; interface Stock; interface Stock_Factory { Stock get_stock (in string stock_symbol) raises (Invalid_Stock_Symbol); }; interface Stock { readonly attribute string symbol; // Get the stock symbol. readonly attribute string full_name; // Get the name. double price (); // Get the price }; };
21
© City University London, Dept. of Computing Distributed Systems / 2 - 21 2.3 Example 2: ATM Controller
22
© City University London, Dept. of Computing Distributed Systems / 2 - 22 Teller Controller IDL Definition interface ATM; interface TellerCtrl { typedef sequence ATMList; exception InvalidPIN; exception NotEnoughMoneyInAccount {...}; readonly attribute ATMList ATMs; readonly attribute BankList banks; void accept_request(in Requester req, in short amount) raises(InvalidPIN,NotEnoughMoneyInAccount); };
23
© City University London, Dept. of Computing Distributed Systems / 2 - 23 2 The CORBA Object Model Components objects. Component state object attributes. Usable component services object operations. Component interactions operation execution requests. Component service failures exceptions.
24
© City University London, Dept. of Computing Distributed Systems / 2 - 24 3 The OMG Interface Definition Language l OMG/IDL is a language for expressing all concepts of the CORBA object model. l IDL is a 'contractual' language that lets you specify a component's (object's) boundaries and its interfaces with potential clients l CORBA IDL is language neutral and totally declarative, i.e., it does not define implementations details l Provides operating system and programming language independent interfaces to all services and objects that reside on the CORBA bus. l Different programming language bindings are available. (We’ll work with Java)
25
© City University London, Dept. of Computing Distributed Systems / 2 - 25 2.1 Types of Distributed Objects l Attributes and operations and exceptions are properties defined in object types. l Object types are those properties that are shared by similar objects. Only their identity and values of their attributes differ. l Objects may export these properties to other objects. l Objects are instances of types. l Object types are specified through interfaces that determine the operations that clients can request, that is, they define a contract that binds the interaction between client and sever objects.
26
© City University London, Dept. of Computing Distributed Systems / 2 - 26 3.1 Types A type is one of the following: l Atomic types ( void, boolean, short, long, float, char, string ), Object types ( interface ), l Constructed types: »Records ( struct ), »Variants ( union ), and »Lists ( sequence ), or Named types – aliases ( typedef ).
27
© City University London, Dept. of Computing Distributed Systems / 2 - 27 3.1 Types (Examples) struct Requester { int PIN; string AccountNo; string Bank; }; typedef sequence ATMList;
28
© City University London, Dept. of Computing Distributed Systems / 2 - 28 2.2 Attributes l Attributes have a (unique) name and a type l Type can be an object type or a non-object type (e.g., Boolean values, characters or numbers). l Attributes are readable by other components Attributes may or may not be modifiable by other components ( readonly ). l Attributes correspond to one or two operations (get/set). l Attributes are declared within an interface. l Attribute name must be unique within interface.
29
© City University London, Dept. of Computing Distributed Systems / 2 - 29 2.2 Attributes (Examples) readonly attribute ATMList ATMs; readonly attribute BankList banks; readonly attribute string symbol; readonly attribute string full_name;
30
© City University London, Dept. of Computing Distributed Systems / 2 - 30 2.3 Operations l Operations modify the state of an object or just compute functions l Used for service requests l Operations have a signature that consists of »a name, »a list of in, out, or inout parameters, »a return value type (result) or void if none, and »a list of exceptions that the operation can raise.
31
© City University London, Dept. of Computing Distributed Systems / 2 - 31 2.3 Operations (Examples) void accept_request(in Requester req, in short amount) raises(InvalidPIN, NotEnoughMoneyInAccount); short money_in_dispenser(in ATM dispenser) raises(InvalidATM);
32
© City University London, Dept. of Computing Distributed Systems / 2 - 32 2.4 Operation Execution Requests l A client object can request an operation execution from a server object. l Operation request is expressed by sending a message (operation name) to server object. l Conceptually, an object request is a triple consisting of an object reference, the name of an operation and a list of actual parameters. l Parameters are marshaled (packaged and transmitted, e.g., serialisation ) l Client have to react to exceptions that the operation may raise.
33
© City University London, Dept. of Computing Distributed Systems / 2 - 33 2.5 Exceptions l Service requests may not be executed properly. l Exceptions have a unique name. l Exceptions may declare additional data structures. l Exceptions are used to explain (and locate) the reason of failure to the requester of the operation l Operation execution failures may be »generic (system), raised by the middleware, e.g., an unreachable server object; or »specific, raised by the server object, when the execution of a request would violate the object’s integrity, e.g., not enough money in a bank account.
34
© City University London, Dept. of Computing Distributed Systems / 2 - 34 2.5 Exceptions cont… exception InvalidPIN; exception InvalidATM; exception NotEnoughMoneyInAccount { short available; }; l Specific Failures may be explained by specific exceptions l Example
35
© City University London, Dept. of Computing Distributed Systems / 2 - 35 3.5 Interfaces l In distributed systems, services are syntactically specified through interfaces that capture the names of the functions available together with types of the parameters, return values, possible exceptions, etc. l There is no legal way a process can access or manipulate the state of an object other than invoking methods made available to it through an object’s interface.
36
© City University London, Dept. of Computing Distributed Systems / 2 - 36 3.5 Interfaces l Attributes, exceptions and operations are defined in interfaces. l Interfaces have an identifier, which denotes the object type associated with the interface. l Interfaces must be declared before they can be used. l Interfaces can be declared in a forward manner
37
© City University London, Dept. of Computing Distributed Systems / 2 - 37 3.5 Interfaces (Example) interface ATM; /* forward declaration! */ interface TellerCtrl { typedef sequence ATMList; exception InvalidATM; exception InvalidPIN; exception NotEnoughMoneyInAccount {short available;}; readonly attribute ATMList ATMs; readonly attribute BankList banks; void accept_request(in Requester req, in short amount) raises(InvalidPIN,NotEnoughMoneyInAccount); };
38
© City University London, Dept. of Computing Distributed Systems / 2 - 38 3.6 Modules l A single global name space for all identifiers is unreasonable. IDL includes Modules to restrict visibility of identifiers. l Access to identifiers from other modules by qualification with module identifier: moduleName::identifierName
39
© City University London, Dept. of Computing Distributed Systems / 2 - 39 3.6 Modules (Example) module Bank { interface AccountDB {}; }; module ATMNetwork { typedef sequence BankList; exception InvalidPIN; interface ATM; interface TellerCtrl {...}; };
40
© City University London, Dept. of Computing Distributed Systems / 2 - 40 2.6 Sub-typing/Inheritance l Object types are organised in a type hierarchy. l Subtypes inherit attributes, exceptions and operations from their supertypes. l Subtypes can add more specific properties. l Subtypes can redefine inherited properties. l Advantages: »Reuse »Changes are easier to manage »Abstraction makes designing DS elegant and easier to understand »Enables polymorphism (an attribute or parameter can refer to instances of different types).
41
© City University London, Dept. of Computing Distributed Systems / 2 - 41 3.7 Inheritance l Notation to define object type hierarchy. l Type hierarchy has to form an acyclic graph. Type hierarchy graph has one root called ( Object ). l Subtypes inherit the attributes, exceptions and operations of all super-types.
42
© City University London, Dept. of Computing Distributed Systems / 2 - 42 3.7 Inheritance (Examples) interface Controllee; interface Ctrl { typedef sequence CtrleeList; readonly attribute CtrleeList controls; void add(in Controllee new_controllee); void discard(in Controllee old_controllee); }; interface ATM : Controllee {...}; interface TellerCtrl : Ctrl {...};
43
© City University London, Dept. of Computing Distributed Systems / 2 - 43 3.7 Multiple Inheritance l An object type can inherit from more than one super-type. l May cause name clashes if different super-types export the same identifier. l Example: interface Set { void add(in Element new_elem); }; interface TellerCtrl:Set, Ctrl {... }; l Name clashes are not allowed!
44
© City University London, Dept. of Computing Distributed Systems / 2 - 44 3.8 Redefinition l Behaviour of an operation as defined in a super-type may not be appropriate for a subtype. l Operation can be re-defined in the subtype. l Binding messages to operations is dynamic. l Operation signature must not be changed. l Operations in (abstract) super-types are not implemented.
45
© City University London, Dept. of Computing Distributed Systems / 2 - 45 3.8 Redefinition (Example) interface Ctrl { void add(in Controllee new_controllee); }; interface TellerCtrl : Ctrl { void add(in ATM new_controllee); }; TellerCtrl cannot redefine add’s interface – only its behaviour! It cannot overload it either!
46
© City University London, Dept. of Computing Distributed Systems / 2 - 46 3.9 Polymorphism l Objects can be assigned to an attribute or passed as a parameter, even though they are instances of subtypes of the attribute’s/parameter’s respective type. l Attributes, parameters and operations are polymorph. l Example: Using Polymorphism, instances of type ATM can be inserted into attribute controls that Ctrl has inherited from Ctrl.
47
© City University London, Dept. of Computing Distributed Systems / 2 - 47 2.7 Problems of the Model l Interactions between components are not defined in the model. l No concept for abstract or deferred types. l Model does not include primitives for the behavioural specification of operations. l Semantics of the model is only defined informally.
48
© City University London, Dept. of Computing Distributed Systems / 2 - 48 4 Other Approaches: (D)COM l (D)COM is Microsoft’s Distributed Component Object Model (http://microsoft.com/com/). l Evolved from OLE/COM. l Weaker than CORBA object model since it »does not support inheritance, »does not have a strong type system and »does not support exceptions.
49
© City University London, Dept. of Computing Distributed Systems / 2 - 49 4. Other Approaches: Darwin l Experimental language developed at Imperial College http://www-dse.doc.ic.ac.uk/Research/Darwin l Supports dynamic configuration of distributed components. l Graphical and textual notation. l Components provide and require services. l Primitive for binding service requester to service provider. Formal semantics based on Milner’s -calculus.
50
© City University London, Dept. of Computing Distributed Systems / 2 - 50 5 Summary l Client-Server vs n-Tier Architecture l Why do we need a component model? l What are the primitives of the CORBA object model? l What is OMG/IDL? l What are the strengths and weaknesses of the CORBA approach?
51
© City University London, Dept. of Computing Distributed Systems / 2 - 51 EXTRA MATERIAL (Not to be examined)
52
© City University London, Dept. of Computing Distributed Systems / 2 - 52 0.2 Further Examples:Computational Grids l Inspired by the electrical power grid’s pervasiveness, reliability and easy to use, computer scientists in the mid-90s began exploring the design and development of an analogous infrastructure called the computational power Grid
53
© City University London, Dept. of Computing Distributed Systems / 2 - 53 Vision l To build an environment that enables »sharing, »selection, »aggregation of a wide variety of l geographically distributed resources including »supercomputers, »storage systems, data sources, and »specialised devices owned by different organisations for solving large-scale resource intensive problems in science, engineering, and commerce (Buyya, 2002).
54
© City University London, Dept. of Computing Distributed Systems / 2 - 54 0.2 Computational Grid l Motivation: Small computing resources such as PCs have the potential to provide vast computing power when connected. And yet… l Many of these resources lie idle most of the time. Millions of online-PCs are only involved in tasks like word processing or browsing the Internet. The computing resources of many organisations are often severely under-utilised, specially outside of peak business hours. l At the same time, there are many individuals and organisations that have intensive computations to perform but only have limited access to resources that are available to execute them.
55
© City University London, Dept. of Computing Distributed Systems / 2 - 55 Possible exploitation (Source: IBM) l Analyze the value of an investment portfolio in minutes rather than hours? l Unite research teams with others around the world to take advantage of the most up-to-date knowledge? l Significantly accelerate the drug discovery process? l Scale your business to meet cyclical demand? l Cut the design time of your products in half while reducing the instances of defects? Source: http://www-1.ibm.com/grid/about_grid/index.shtml
56
© City University London, Dept. of Computing Distributed Systems / 2 - 56 DOE X-ray grand challenge: ANL, USC/ISI, NIST, U.Chicago tomographic reconstruction real-time collection wide-area dissemination desktop & VR clients with shared controls Advanced Photon Source Online Access to Scientific Instruments archival storage
57
© City University London, Dept. of Computing Distributed Systems / 2 - 57 Image courtesy Harvey Newman, Caltech Data Grids for High Energy Physics Tier2 Centre ~1 TIPS Online System Offline Processor Farm ~20 TIPS CERN Computer Centre FermiLab ~4 TIPS France Regional Centre Italy Regional Centre Germany Regional Centre Institute Institute ~0.25TIPS Physicist workstations ~100 MBytes/sec ~622 Mbits/sec ~1 MBytes/sec There is a “bunch crossing” every 25 nsecs. There are 100 “triggers” per second Each triggered event is ~1 MByte in size Physicists work on analysis “channels”. Each institute will have ~10 physicists working on one or more channels; data for these channels should be cached by the institute server Physics data cache ~PBytes/sec ~622 Mbits/sec or Air Freight (deprecated) Tier2 Centre ~1 TIPS Caltech ~1 TIPS ~622 Mbits/sec Tier 0 Tier 1 Tier 2 Tier 4 1 TIPS is approximately 25,000 SpecInt95 equivalents
58
© City University London, Dept. of Computing Distributed Systems / 2 - 58 Network for Earthquake Engineering Simulation l NEESgrid: national infrastructure to couple earthquake engineers with experimental facilities, databases, computers, & each other l On-demand access to experiments, data streams, computing, archives, collaboration NEESgrid: Argonne, Michigan, NCSA, UIUC, USC
59
© City University London, Dept. of Computing Distributed Systems / 2 - 59 l Community = »1000s of home computer users »Philanthropic computing vendor (Entropia) »Research group (Scripps) l Common goal= advance AIDS research Home Computers Evaluate AIDS Drugs
60
© City University London, Dept. of Computing Distributed Systems / 2 - 60 Computational Grids Resourses l Global Grid Forum (http://www.gridforum.org/): community- initiated forum of 5000+ individual researchers and practitioners working on distributed computing, or "grid" technologies l GridComputing (http://www.gridcomputing.com/) l myGrid (http://www.mygrid.org.uk/), an EPSRC project l Platforms: »Globus (http://www.globus.org/) »Unicore (http://www.unicore.org/) »Load Sharing Facility (http://www.platform.com/)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.