Partitioning and Distribution: Client- Server Model A I P C Monolithic A I P 2 1 C C Thin Client Servers A P P C 1 C 2 Fat Client Servers Ubiquitous computing: smart devices, environments and interaction 23
Client Server Model • System configuration (partitioning and distribution) depends upon: – network links; – local resources, – remote service availability; – type of application, – service maintenance model. • Different degrees of resources on access devices (clients) • Resource poor (thin-client server model): – reliance on external servers, network supports remote service access on demand Ubiquitous computing: smart devices, environments and interaction 24
Client Server Model • Processing needed to adapt content to different types of terminals – • Thin-client server model is often considered to be easier to maintain – • Thin-clients offer very limited application platform Ubiquitous computing: smart devices, environments and interaction 25
Client Server Model • How to cope with unreliable and low-performance networks using client-server model? • Argues for a degree of self-reliance & use of local processing and data resources • Fat client model is suitable when? • Type of processing in access device depends on type of application. – E.g., chess game application – E.g., scientific calculation Ubiquitous computing: smart devices, environments and interaction 26
Partitioning & Distributing System Components: Summary of Models A A P A I P I P P 2 1 C C 1 C C 2 C Thin Client Fat Client Monolithic Servers Servers I P A P I A P I 3 2 C 4 1 3 2 C C 6 1 C C C C 5 4 Client Application Data Thin Client Application Bank Content Ubiquitous computing: smart devices, environments and interaction 27
Partitioning & Distributing System Components: Summary of Models • Different designs for Information-based UbiCom systems: – based upon how their A, P and I components are distributed. • Functions can be distributed over multiple different computer nodes or tiers: – 1-tier, monolithic system, appliance model: – 2-tier, thin-client server: – 2-tier, fat-client server model: – Multi-tier (3,4 ... N-Tier) systems: Ubiquitous computing: smart devices, environments and interaction 28
Merchant Interaction Customer Interaction Purchase Catalogue Sales Accounts Inventory Delivery Bank 1. Query 2. Select Check/ 3. SubmitPO update Confirm In stock 4. AckPO DeliveryReq 5. SubmitADN Delivery Arranged 6. SubmitInvoice 7. TransferFundsReq 8. AckTransferFunds Ubiquitous computing: smart devices, environments and interaction 29
Partitioning and Distributed Data (D) Storage • I, P, A and D can themselves be partitioned & distributed • Examples of Partitioned & Distributed D – Transaction Monitors (TM): distributed data transactions; – Data Warehouses , centralised analysis of distributed data – Distributed Databases : distributed queries Ubiquitous computing: smart devices, environments and interaction 30
Distributed Data (D) Storage: Transaction Processing Access1 ¡(A) ¡ Access2 ¡(A) ¡ Transactions Transactions Monitor: ¡Route, ¡ Jobs schedule, ¡monitor ¡ P Transaction ¡Manager: ¡ Lock ¡ record ¡lock, ¡check-‑ R Logs point, ¡log Database ¡1 Rules Ubiquitous computing: smart devices, environments and interaction 31
Distributed Data (D) Storage: Data Warehouse • OLAP Online Analytical processing Access ¡n ¡(A) ¡ Access1 ¡(A) ¡ Data ¡mining ¡(P) OLAP ¡( P ) Metadata Aggregated ¡ repository Data ¡ R Refresh, ¡Load ¡, ¡Clean, ¡Transform Export Export R R Database ¡1 Database ¡1 Ubiquitous computing: smart devices, environments and interaction 32
Distributed Data (D) Storage: Distributed Database Access1 ¡(A) ¡ Access ¡n ¡(A) ¡ Distributed ¡Query ¡( P ) Wrapper ¡(P) Export Export R R Database ¡1 Database ¡ Ubiquitous computing: smart devices, environments and interaction 33
Distributed Processing • Partitioning & distributing processing onto multiple CPUs • Use for computation intensive tasks, e.g., ?? • Time gained in ↓ processing time must be > time to partition & distribute tasks, collect individual results & combine them. Many different architectures • Super-computers - specialised multiple CPU systems • Clusters of networked MTOS computers, e.g., Grids. • Multiple CPUs in MTOS computers. e.g., multi-core processor • P2P computing • Cellular computing What about • distributed UIs? • Distributed communication? Ubiquitous computing: smart devices, environments and interaction 34
Distributed Processing Architectures • Examples can be added here Ubiquitous computing: smart devices, environments and interaction 35
Overview • Smart Device and Service Characteristics • Distributed System Viewpoints • System Abstraction • Partitioning and Distribution of System Components • Proxies and Middleware √ • Service Oriented Computing (SOC) & Grid Computing • Peer-to-Peer Systems • Service Provision Lifecycle √ • Service Discovery • Service Invocation • Service Composition • MTOS, BIOS & VM Ubiquitous computing: smart devices, environments and interaction 36
Proxy based Service Access Advantages of using client proxies • Some applications use a client proxy to simplify access processes in client, How? • Off-load presentation processing and network processing • Hide heterogeneity of terminal types & networks from applications • Simplify and compose access to multiple service providers. • Reduce complexity of communication used in access devices, e.g., ?? • Enable devices to operate intermittently in a disconnected state. • Shield network-based applications from mobility of access devices (DTN style?) Ubiquitous computing: smart devices, environments and interaction 37
Proxy based Service Access Object5 Object6 Object5 Object6 Object4 Object4 Encode / decode data for Object1 Object2 Object3 Object1 Object2 transmission Object3 Client Proxy Server User Query Result Optional confirmation of result received Use of proxies to simplify network access by transparently encoding and decoding the transmitted data on behalf of clients and / or servers Ubiquitous computing: smart devices, environments and interaction 38
Proxy based Service Access What are the disadvantages of Proxy-based access? Where does the proxy reside? Ubiquitous computing: smart devices, environments and interaction 39
Middleware • ↑ Variety & heterogeneity & complexity of services access • Middleware introduced in between applications & OS to simplify access to services • Middleware factors out set of generic services, e.g., database access, file system access etc. to make them: • Advantages for Application? – • Advantages for OS? Ubiquitous computing: smart devices, environments and interaction 40
Middleware: Design Issues • May be useful for applications to have an awareness of lower level interaction, for resource access not to be completely hidden by middleware. • Why? Ubiquitous computing: smart devices, environments and interaction 41
Middleware Application awareness of ICT Context Full Partial None Middleware handles some of the Application sees full Middleware hides complexity in interfacing to ICT ICT system interface, complexity of ICT system system no Middleware used from application Ubiquitous computing: smart devices, environments and interaction 42
Overview • Smart Device and Service Characteristics • Distributed System Viewpoints • System Abstraction • Partitioning and Distribution of System Components • Proxies and Middleware • Service Oriented Computing (SOC ) & Grid Computing √ • Peer-to-Peer Systems • Service Provision Lifecycle √ • Service Discovery • Service Invocation • Service Composition • MTOS, BIOS & VM Ubiquitous computing: smart devices, environments and interaction 43
Service Oriented Computing (SOC) • SOA (Architectures) , also referred to as SOC (Computing) • Services as computational or information processing components – That are autonomous and heterogeneous – Can run on different platforms – Are possibly owned by different organizations. Ubiquitous computing: smart devices, environments and interaction 44
SOC Standards Several different standards for SOC • (XML based) Web Services • Computer Grids OGSI • OASIS SOA RM • Open Group SOA Working Group • Semantic Web Services? Ubiquitous computing: smart devices, environments and interaction 45
Service Oriented Computing (SOC) Notion of service characterised by: • Descriptions : specification of tasks; discoverable • Outcomes : service is the means to achieve a defined outcome for a task • Offers: if an offer is made then the provider is available • Competency : to undertake the task; regulatory authority • Execution : performing the service on behalf of someone • Composition : Multiple services may need to be composed before they can be executed with respect to an outcome and time constraints • Constraints or policies : for a service, which may be specified either by the user, e.g., for a taxi service ‘don’t drive too fast’, or by the provider ‘not exceeding the speed limit Ubiquitous computing: smart devices, environments and interaction 46
Service Oriented Computing (SOC) • Services in a SOA can be separated into three layers of functions: basic (lower), composition (middle) and management (higher layer) Service Management • Service management: Services are managed by third parties, between the user and provider, based upon policies , e.g. SLAs Service Management (H) • Enterprise service bus(Basic Service Composition (M) function): this supports service, message, and event Service Invocation (B) based interactions with appropriate service levels and Service Discovery (B) manageability; Enterprise Service Bus (B) 47 Ubiquitous computing: smart devices, environments and interaction
SOC: Grids • Grid computing: distributed systems that enable: – e large scale coordinated use and sharing of geographically distributed resources • (Early) Grid computing system design tends to focus on high performance computing rather than fault-tolerance & dynamic ad hoc interaction, Ubiquitous computing: smart devices, environments and interaction 48
SOC: Grids Three main types of Grid system occur in practice: • Computational Grids : they have higher aggregate computational capacity available for single applications • Data Grids , provide an infrastructure for synthesising new information from data repositories such as digital libraries or data warehouses • Service Grids: they provide services that are not provided by any single machine Ubiquitous computing: smart devices, environments and interaction 49
Overview • Smart Device and Service Characteristics • Distributed System Viewpoints • System Abstraction • Partitioning and Distribution of System Components • Middleware • Service Oriented Computing (SOC) • Peer-to-Peer Systems √ • Service Provision Lifecycle √ • Service Discovery • Service Invocation • Service Composition • MTOS, BIOS & VM Ubiquitous computing: smart devices, environments and interaction 50
Peer-to-Peer Systems (P2P) P2P can be defined as: • distributed systems consisting of interconnected nodes • able to self-organize into network topologies • with the purpose of sharing resources such as content, CPU cycles, storage and bandwidth, • capable of adapting to failures and accommodating transient populations of nodes • while maintaining acceptable connectivity and performance • without requiring the intermediation or support of a global centralized servers or authorities. Ubiquitous computing: smart devices, environments and interaction 51
P2P Benefits? • lower cost of ownership for content sharing • performance enhancements: the resources of all the nodes can be used for storage, computation and data exchange rather than focusing resources mostly in the server type nodes (equality) • ad hoc resource utilisation and sharing: as demand for particular services peaks • autonomous control and ownership • anonymity and privacy • fault tolerance: there are no central servers that can be attacked or can cause complete system failure Ubiquitous computing: smart devices, environments and interaction 52
P2P System Design Challenges? • More complex coordination is often needed . In contrast, with client server interaction • Nodes can act as freeloaders : nodes may be happy to play a role of service requesters but are always configured to refuse the requests • More complex security may be needed as identification can be masked so access control is harder. • Ad hoc network routes : need to create and discover ad hoc routes between nodes • Service discovery : how to discover the selective nodes where services can be invoked from Ubiquitous computing: smart devices, environments and interaction 53
P2P System: Types • 3 main types of P2P system depending on the types of computer nodes: • Pure P2P uses no notion of fixed clients or servers, only of equal peer nodes that simultaneously function as both dynamic servers and clients (called servents) • Partial P2P : all nodes are not equal, a few superpeers or supernodes are elected to operate as middleware servers, acting as network relays for other nodes • Hybrid P2P networks, a client server organisation is used for specific tasks and interactions, such as searching for services and a P2P organisation is used for others such as service invocation Ubiquitous computing: smart devices, environments and interaction 54
In Hybrid P2Ps • Three basic steps for accessing content: – identify nodes, – register content provision nodes, – Finally, search & retrieve content Ubiquitous computing: smart devices, environments and interaction 55
P2P System Types: Pure, Hybrid search A Link ¡not ¡ B H accessed G Servent ¡ C E F D Node Pure ¡ P2P Hybrid ¡ ¡ N J P2P New ¡ ¡ L search Node I Node ¡ K Centralised with ¡ Directory ¡ content Node ¡(used ¡in ¡ Hybrid ¡P2P ¡ ¡ for ¡searches) Ubiquitous computing: smart devices, environments and interaction 56
P2P System Types : Partial P2P H Super ¡ G Node C E D F Partial ¡ ¡ Node ¡ N P2P with ¡ J content I L K Ubiquitous computing: smart devices, environments and interaction 57
P2P System Types • Can also be grouped into two main types of topologies for P2P systems that overlay the underlying physical network: • Unstructured overlay networks : they are like ad hoc networks and they are independent of any physical network topology and use decentralised and partially decentralised nodes • Structured overlay networks : they are dependent on the physical network topology of nodes and use hybrid decentralised nodes Ubiquitous computing: smart devices, environments and interaction 58
Overview • Smart Device and Service Characteristics • Distributed System Viewpoints • System Abstraction • Partitioning and Distribution of System Components • Proxies & Middleware • Service Oriented Computing (SOC) • Peer-to-Peer Systems • Service Provision Lifecycle √ • Service Discovery • Service Invocation • Service Composition • MTOS, BIOS & VM Ubiquitous computing: smart devices, environments and interaction 59
Service Provision Life-cycle for Smart Devices • Service creation: service processes register themselves in service directories • Service operation: services are invoked and multiple interlinked services may need to be coordinated • Service maintenance phase: service processes, access configurations and service compositions can be updated • Service dissolution: services may be put off line or terminated temporarily by the processes themselves or by requesters Ubiquitous computing: smart devices, environments and interaction 60
Service Provision Life-cycle Terminate ¡(A,P) Announcement ¡(P), ¡Discovery ¡(A) Invoke ¡(A) ¡ Remove ¡registrations ¡(P) Selection ¡(A), ¡Configuration ¡(A|P) Coordinate ¡(A,P) ¡ Composition ¡(A) Creation Execution Dissolution Maintenance Re-‑invoke ¡(A), ¡Update ¡descriptions ¡(P) ¡ Reconfiguration ¡(A), ¡Update ¡composition ¡(A) • A – Access services or clients • P – Process services or services provision Ubiquitous computing: smart devices, environments and interaction 61
Service Provision Life-cycle • Exercise: Consider creation, operation, maintenance, dissolution for the following types of devices & services: • Laptop / Internet • Set-top box audio-video receiver • Mobile phone • Email Service Ubiquitous computing: smart devices, environments and interaction 62
WS SOA Support for Service Life- cycle • Web Services (WS) support machine-to-machine interaction • Service Interfaces are machine-processable, syntactical • WS SOAs consist of many possible WS protocols depending on the application and service requirements. • Core WS SOA protocols are: – SOAP: is a protocol for exchanging structured information in the implementation of Web Services in computer networks. It relies on XML for message format – WSDL: is an XML-based interface description language that is used for describing the functionality offered by a web service; provides a machine readable descriptions (e.g. parameters required) – UDDI : (XML)-based registry by which businesses worldwide can list themselves on the Internet, and a mechanism to register and locate web service applications Ubiquitous computing: smart devices, environments and interaction 63
Overview • Smart Device and Service Characteristics • Distributed System Viewpoints • System Abstraction • Partitioning and Distribution of System Components • Proxies & Middleware • Service Oriented Computing (SOC) • Peer-to-Peer Systems • Service Provision Lifecycle • Service Discovery √ • Service Invocation • Service Composition • MTOS, BIOS & VM Ubiquitous computing: smart devices, environments and interaction 64
Service Announcement, Discovery, Selection and Configuration • Service discovery scope & functions depends on design. • What’s involved in service discovery? – It could just involve asking for the list of available service providers that match a request. – It may or may not include service selection, service configuration, service name to address resolution and even service invocation. • Which happens first in service discovery? • Network discovery Ubiquitous computing: smart devices, environments and interaction 65
Network Discovery What Is it? Why do we need it? • Precedes service registration and service discovery • Dynamic network discovery, used by mobile nodes and when new nodes are introduced into a network. Which Network Protocols support Network Discovery? • Domain Name Service, DNS, maps IP addresses ↔ Names • Some nodes offer long term services – static assigned IP addresses may be assigned – e.g., printers, etc • Common approach to dynamically discover network: DHCP – Ask a DHCP server for an IP address – addresses leased for a given time. – Why is leasing useful? – Complexity in using DHCP is in setting up & managing DHCP servers. Why? – Ubiquitous computing: smart devices, environments and interaction 66
Network Discovery • Why is leasing useful? – enables a limited set of resources, in this case, network addresses, to be periodically renewed by active nodes and; – to be reused and freed from inactive computer nodes • Complexity in using DHCP is in setting up & managing DHCP servers. Why? – because multiple DHCP servers may issues overlapping addresses; – permanent IP addresses can conflict with dynamically assigned ones; – inactive clients may attempt to use an address that has been reassigned Ubiquitous computing: smart devices, environments and interaction 67
Network Discovery: Zeroconf • Zero Configuration Networking (Zeroconf) – techniques that automatically creates a usable IP network without configuration or special servers • Allows inexpert users to connect computers, networked printers etc together & expect them to work automatically. • Without Zeroconf or something similar, need to? – • Zeroconf currently solves automating three tasks – choosing network addresses, – giving oneself an address, – discovering names and discovering service addresses Ubiquitous computing: smart devices, environments and interaction 68
Network Discovery: dynamically assigning IP addresses • Both IPv4 and IPv6 have standard ways of automatically choosing / assigning IP addresses. • IPv4 uses the 169.254.any, link-local set of addresses, see RFC 3927. • IPv6, zeroconf, see RFC 2462 can be used. • 2 similar ways of figuring out which network node has a certain name. – Apple's Multicast DNS (mDNS) – Microsoft's Link-local Multicast Name Resolution (LLMNR) Ubiquitous computing: smart devices, environments and interaction 69
Dynamic Service Discovery • Dynamic versus Static service discovery – If service providers and requesters are static, then there is little need for dynamic service discovery – Dynamic service discovery is needed to • allow service requesters to change providers when requesters or providers are mobile, • when network access is intermittent • when requesters or providers fail • Allow requesters to change providers , Why? Vice-versa? • What is involved in Dynamic Service discovery? – involves decoupling service provision from service requests and supporting dynamic announcements – dynamic discovery of service providers and service requesters Ubiquitous computing: smart devices, environments and interaction 70
Dynamic Service Discovery: Pull versus Push • 2 main approaches : push or pull. Pull: How does it work? Ubiquitous computing: smart devices, environments and interaction 71
Discovery Services: Push Push: How does it work? • Push uses broadcasts or multicasts to announce the available service requests or service capabilities to a number of unknown parties, e.g., Bluetooth • Broadcasting service requests or service descriptions are a sub type of message broadcasts to unknown message receivers Ubiquitous computing: smart devices, environments and interaction 72
Discovery services Push: Design Broadcast / Announcements can be designed to occur: • Periodically irrespective of whether any audience exists or not; • Only when any kind of audience is available; • Only when a specific type of audience is detected – multicast versus broadcast. Ubiquitous computing: smart devices, environments and interaction 73
Discovery Services: Push Pull: How does it work? • Pull uses lookups to search or browse lists of requests or capabilities previously announced to a directory held by some known third party, e.g., Jini, UPnP, UDDI, etc. • The third party does the matching Ubiquitous computing: smart devices, environments and interaction 74
Discovery Services: Pull vs. Push • Advantage of Pull? – Pull minimises network traffic concerning service discovery (i.e. no broadcast messages) • Disadvantage of Pull? – this requires third party administration of the directory, – the directory to be available and – The directory to have a well known location for clients and servers to find it Ubiquitous computing: smart devices, environments and interaction 75
Service Discovery Interaction Patterns Register ¡ Lookup ¡ Services ¡ I Services A P I 1 2 Directory Service C C C 3 Services 4 Directory Client Lookup ¡ Register ¡ ¡ ¡ Requests requests A P I I 2 3 4 1 Blackboard C C C Message Board Client Services A I P I Broker 2 1 4 3 C C C Client Broker Services Ubiquitous computing: smart devices, environments and interaction 76
External versus Internal service selection • External → services to satisfy request exist in virtual environment to the ICT system, rather than internally within the system itself. • How does a requester of a service know if it needs someone else to perform the service? – The process of establishing whether or not a service exists internally involves self descriptions, self awareness and reflection • How does a service requester choose between external service versus internal service invocation when both are available? – Exact matches or inexact wild card or even conditional matches Ubiquitous computing: smart devices, environments and interaction 77
External versus Internal service selection • Process of establishing whether or not a service exists internally can involve – Self-descriptions – Self-awareness – Reflection • See chapter 10 Ubiquitous computing: smart devices, environments and interaction 78
Semantic Web (SW) and Semantic Resource Discovery • Why is Syntactic level matching and discovery challenging in pervasive environments? – Due to the autonomy of service providers and the resulting heterogeneity of their implementations and interfaces devices • What are benefits of Semantic matching rather than syntactic service matching? – leads to a service discovery performance that can give better response time and reduces network load compared to syntactic service discovery Ubiquitous computing: smart devices, environments and interaction 79
Semantic Web (SW) and Semantic Resource Discovery • SW represents resources using RDFS (Resource Description Framework Schema) and OWL – Used for semantic service descriptions • SW defines much richer XML based data structures and relationships – heavier computation resources are needed to process these • Design choices: – Semantic matching of service requests can enable services to be classified and grouped Ubiquitous computing: smart devices, environments and interaction 80
Overview • Smart Device and Service Characteristics • Distributed System Viewpoints • System Abstraction • Partitioning and Distribution of System Components • Proxies & Middleware • Service Oriented Computing (SOC) • Peer-to-Peer Systems • Service Provision Lifecycle • Service Discovery • Service Invocation √ • Service Composition • MTOS, BIOS & VM Ubiquitous computing: smart devices, environments and interaction 81
Distributed Service Invocation • Specifying an application protocol in terms of a set of service descriptions of service actions is often insufficient to invoke a service. Why? – Requesters need to have the know how to invoke the service (e.g. invoking hardware resource services such as printers may involve downloading hardware drivers into the access device) – Requesters may not know in which order to invoke service actions or how to handle out of order message sequences in a process without terminating service processes. – The interaction in the process needs to be coordinated or orchestrated? Ubiquitous computing: smart devices, environments and interaction 82
Distributed Service Invocation • Design of remote interaction across different computer nodes differs from design of local process interaction within the same computer node • Why? • Because it occurs across the network rather than across local shared memory and because different computer nodes are autonomous and heterogeneous Ubiquitous computing: smart devices, environments and interaction 83
Distributed Service Invocation • Multiple heterogeneous processes often need to be interleaved: e.g., when u-commerce (ubiquitous commerce) system purchasing an item – select item, – order item, – receive acknowledgement and receive item, – need to be interleaved with a separate pay for item process. • How to carry this out in a naturally, explicitly supported way? • Need to synchronize multiple processes • What are the available techniques? Ubiquitous computing: smart devices, environments and interaction 84
Distributed Service Invocation: Ordered Service Actions • Service requesters may not know: – in what order to invoke service actions – how to handle out of order message sequences in a process without terminating service processes. • Interaction in the process coordinated needs to be conducted. • Often coordination may be hard-coded into each service API and under the control of the provider. – Makes the coordination of multiple services inflexible. Ubiquitous computing: smart devices, environments and interaction 85
Distributed Service Invocation: Ordered Service Actions • Clients often need to invoke not just individual service actions in isolation but to invoke a whole series of service interactions as part of a business process • Multiple heterogeneous processes often need to be interleaved: • Network Transmission may or may not maintain order of action messages when these are sent • Complex to design in order to make remote communication (remote procedure calls (RPC) or remote method invocation (RMI) look like local calls, e.g., need parameter marshalling Ubiquitous computing: smart devices, environments and interaction 86
Distributed Service Invocation: Fully Ordered Service Actions • Two types of design based upon service action ordering – Full versus Partial 1) Fully ordered system processes of actions • Specify actions executed as fixed sequences of actions. • Earlier actions in sequence output data used by later ones • Control of flow may contain some flexibility in terms of branches, conditions and loops. • Example uses method invocation such as RPC and RMI • Suitable for synchronous executions • Less suitable for loosely coupled infrastrcture Ubiquitous computing: smart devices, environments and interaction 87
Distributed Service Invocation: Partially Ordered Actions • Two types of design based upon action ordering 2) Partially or non ordered system processes of actions Non- ordered System • Specify action triggers (events) and action (responses, handling) • Don’t fully order, but may partially order • Example Uses – LooCI component model • Suitable for open dynamic environments Ubiquitous computing: smart devices, environments and interaction 88
Distributed Service Invocation: fully versus partially ordering • Advantages and disadvantages of full action ordering? • Advantages and disadvantages of partial action ordering? Ubiquitous computing: smart devices, environments and interaction 89
Service Invocation: Separating Coordination & Computation • Should coordination mechanisms be separated from computation mechanisms. This supports several key benefits: • Portability • Heterogeneity • Flexibility Ubiquitous computing: smart devices, environments and interaction 90
Distributed Service Invocation Coordination Models Designs for distributed interaction include: • ( Remote) Procedure Calls / object-oriented Remote Method interaction : • Layered model : • Pipe-filter model • Event-driven Action or EDA Model : • Shared data repositories : Ubiquitous computing: smart devices, environments and interaction 91
Distributed Service Invocation Data Model: RPC model Client Server E 1 E 5 E 8 E 4 Client ¡stub Server ¡ ¡stub E 2 E 6 E 7 E 3 Pipe Uses? Ubiquitous computing: smart devices, environments and interaction 92
Distributed Service Invocation Data Model: RPC model • For ¡each ¡type ¡of ¡ ¡service ¡invoca1on ¡data ¡model ¡we ¡can ¡give ¡ more ¡detail ¡about ¡how ¡the ¡interac1on ¡model ¡works ¡ • (Remote) ¡Procedure ¡Call ¡Model ¡– ¡makes ¡remote ¡calls ¡look ¡like ¡ local ¡calls ¡ • Remote ¡Method ¡Invoca1on ¡– ¡object ¡oriented ¡remote ¡calls ¡in ¡ Java ¡ Ubiquitous computing: smart devices, environments and interaction 93
Distributed Service Invocation Data Model: Layered Model Layer3 Element ¡3-‑1 E 3 E 2 E 14 E 13 Layered ¡ Layer2 Element ¡2-‑1 Element ¡2-‑2 Model ¡ E 4 E 1 E 15 E 12 Element ¡1-‑1 Layer1 Element ¡1-‑2 E 5 E o E 17 E 10 Employed to to hide the details of lower level interaction which is often used as a design to mask and combine the use of multiple network protocols Ubiquitous computing: smart devices, environments and interaction 94
Distributed Service Invocation Data Model: Pipe-Filter Model E 1 E 1 E 2 E 2 Pipe ¡ Filter ¡ Pipe ¡ Pipe-‑Filter ¡ Model ¡ E 2 E 3 Pipe ¡ Filter ¡ often used for streaming and combining multiple media to different applications that use different kinds of content filtering Ubiquitous computing: smart devices, environments and interaction 95
Distributed Service Invocation Data Model: Shared Data Repository • Shared repository system consists of two types of components: – central data structure represents the current state (blackboard) – collection of independent components operate on central data store. (interacting components – consumers and providers) • 2 major sub-types of coordination depending on: – if transactions in an input stream trigger the selection of executing processes, e.g., a database repository – if the current state of the central data structure is the main trigger of selecting processes to execute, e.g., a blackboard repository. Ubiquitous computing: smart devices, environments and interaction 96
Shared Data Repository: Blackboard • Represents & stores data created & used by other components. • Data is input a repository from data producers. • Data is output from a repository to data consumers. Ubiquitous computing: smart devices, environments and interaction 97
Shared Data Repository: Blackboard Consumer In / Read Out Source E 4 E 2 Consumer Source E 4 Black-‑ E 2 E 1 E 3 board Source E 1 Consumer E 3 Source Ubiquitous computing: smart devices, environments and interaction 98
Service Invocation Data Model: EDA Producer E 2 Matching Event ¡Dispatcher Producer E 4 Buffer Registration E 2 E 1 E 3 E 4 Producer E 3 Event ¡ Producer E 1 Loop E 4 E 3 E 2 E 1 E 4 Consumer Filter Filter Filter Consumer Action Action Ubiquitous computing: smart devices, environments and interaction 99
Distributed Service Invocation Data Model: EDA • Event-Driven Architectures or EDA • EDA model is an important design for SOC and MOM (Message Oriented Middleware) Architectures • Event is some input such as a message or procedure call of interest (e.g. if time equals 1pm) • EDA is also known as Publish-and-Subscribe interaction . • Some nodes publish events while others subscribe to being notified when specified events occur Ubiquitous computing: smart devices, environments and interaction 100
Recommend
More recommend