SSC0156 – Computação Pervasiva
Chapter 3 Smart Devices and Services
- Prof. Jó Ueyama
1 Ubiquitous computing: smart devices, environments and interaction
SSC0156 Computao Pervasiva Chapter 3 Smart Devices and Services - - PowerPoint PPT Presentation
SSC0156 Computao Pervasiva Chapter 3 Smart Devices and Services Prof. J Ueyama Ubiquitous computing: smart devices, 1 environments and interaction Related Links Basic Distributed Computer Interaction Models in this chapter are
1 Ubiquitous computing: smart devices, environments and interaction
– Sense & Control systems (Chapter 6) – Context-based Systems (Chapter 7) – Reflexive Intelligent Systems (Chapter 8)
2 Ubiquitous computing: smart devices, environments and interaction
3 Ubiquitous computing: smart devices, environments and interaction
4 Ubiquitous computing: smart devices, environments and interaction
Mobile Devices Client Server RPC Grid Architectures Discovery Operating Systems Service Provision Life-cycle VM BIOS Middleware SOC Proxy Interaction P2P Shared Repository
Smart Devices
iHCI with Devices Smart Services MTOS Composition Abstraction Virtualisation Network Viewpoints Partitioning & Distribution Processing Multi-Tier MOM Data Service Resource Device V
ESB Caches EDA Read Ahead Delayed Writes Interoperability Orchestration Choreography Types
5 Ubiquitous computing: smart devices, environments and interaction
remote vs. local application services
intermittent resource access.
Applications
6 Ubiquitous computing: smart devices, environments and interaction
7 Ubiquitous computing: smart devices, environments and interaction
viewpoints with respect to:
models that capture the essential elements of an ICT system architecture and its interrelationships. Multiple viewpoints:
– Individual user view – Enterprise user view: – Information system, service or computation platform view: – Network view: network elements and computer nodes
8 Ubiquitous computing: smart devices, environments and interaction
A = Access/presentation, I = Info./data, P = Processing/computation, C=Comms/ networking
C
m s &
h e r m i d d l e w a r e s e r v i c e s Resource (R) Management Service Processes (P) User Interface (A) Service / Platform View Network View Network (C) Computer (P,I) User View Users (A) Information (I) Tasks (P) Enterprise View Users (A) Policies (I) Roles (I) Services (I,P) Information Sensors Controls
9 Ubiquitous computing: smart devices, environments and interaction
10 Ubiquitous computing: smart devices, environments and interaction
both a separation of concerns using modularisation & transparency
– high cohesion – loose-coupling
– Decomposability: – Composability: – Understandability: – Continuity: – Protection:.
11 Ubiquitous computing: smart devices, environments and interaction
the outside, is also called an interface.
12 Ubiquitous computing: smart devices, environments and interaction
Data ¡as ¡parts ¡of ¡ ¡magnetic ¡ disk ¡tracks ¡and ¡sectors Disk ¡Manager DBMS File ¡Manager Data ¡as ¡pages ¡(minimum ¡ chunk ¡of ¡data ¡on ¡disk) Data ¡as ¡records ¡in ¡files SQL ¡Commands Database ¡ Applications ¡ File ¡Applications ¡e.g., ¡Text ¡ Processing, ¡Email, ¡etc Resource ¡ Management Processing Web ¡Browser Access Information ¡System ¡Resources
13 Ubiquitous computing: smart devices, environments and interaction
– Access transparency: – Concurrency transparency – Failure transparency (Fault Tolerance) – Migration transparency – Scaling transparency
the time, under all conditions is hard to achieve
– Usually only when the distributed system is operating normally.
14 Ubiquitous computing: smart devices, environments and interaction
– System interfaces designed for a particular platform do not support interoperability
15 Ubiquitous computing: smart devices, environments and interaction
16 Ubiquitous computing: smart devices, environments and interaction
Copy of data or applications downloaded onto device, then it is used
17 Ubiquitous computing: smart devices, environments and interaction
18 Ubiquitous computing: smart devices, environments and interaction
19 Ubiquitous computing: smart devices, environments and interaction
ways to distribute these, e.g.,
20 Ubiquitous computing: smart devices, environments and interaction
Network Usage Low High CPU Usage Low High
Discuss How to partition a 2 player Person versus Machine Chess Application in terms of a client-server design / for use on a mobile device
Low High Data Memory Usage
21 Ubiquitous computing: smart devices, environments and interaction
– Synchronization between clients which starts requesting while servers start waiting for client requests
22 Ubiquitous computing: smart devices, environments and interaction
1 2
1 2
23 Ubiquitous computing: smart devices, environments and interaction
– network links; – local resources, – remote service availability; – type of application, – service maintenance model.
– reliance on external servers, network supports remote service access on demand
24 Ubiquitous computing: smart devices, environments and interaction
–
–
25 Ubiquitous computing: smart devices, environments and interaction
client-server model?
resources
– E.g., chess game application – E.g., scientific calculation
26 Ubiquitous computing: smart devices, environments and interaction
Client Data
1 2 3 4
Application Fat Client Servers
1 2
Thin Client Servers Thin Client Application
1 6
Bank
3 4 1 2
Monolithic Content
5 2
27 Ubiquitous computing: smart devices, environments and interaction
– based upon how their A, P and I components are distributed.
– 1-tier, monolithic system, appliance model: – 2-tier, thin-client server: – 2-tier, fat-client server model: – Multi-tier (3,4 ... N-Tier) systems:
28 Ubiquitous computing: smart devices, environments and interaction
Purchase Sales
Inventory Delivery Bank
DeliveryReq
Delivery Arranged Check/ update Confirm In stock Catalogue
Customer Interaction Merchant Interaction
Accounts
29 Ubiquitous computing: smart devices, environments and interaction
– Transaction Monitors (TM): distributed data transactions; – Data Warehouses, centralised analysis of distributed data – Distributed Databases: distributed queries
30 Ubiquitous computing: smart devices, environments and interaction
Jobs Access1 ¡(A) ¡ Transactions Database ¡1 Monitor: ¡Route, ¡ schedule, ¡monitor ¡ Transaction ¡Manager: ¡ record ¡lock, ¡check-‑ point, ¡log Lock ¡ Logs Access2 ¡(A) ¡ Transactions R
P
Rules
31 Ubiquitous computing: smart devices, environments and interaction
Aggregated ¡ Data ¡ Data ¡mining ¡(P) Export Refresh, ¡Load ¡, ¡Clean, ¡Transform Metadata repository OLAP ¡(P) Database ¡1 R R Access1 ¡(A) ¡ Access ¡n ¡(A) ¡ Export Database ¡1 R
32 Ubiquitous computing: smart devices, environments and interaction
processing
Export Export Database ¡1 Database ¡ R R Distributed ¡Query ¡(P) Wrapper ¡(P) Access1 ¡(A) ¡ Access ¡n ¡(A) ¡
33 Ubiquitous computing: smart devices, environments and interaction
distribute tasks, collect individual results & combine them. Many different architectures
What about
34 Ubiquitous computing: smart devices, environments and interaction
35 Ubiquitous computing: smart devices, environments and interaction
36 Ubiquitous computing: smart devices, environments and interaction
37 Ubiquitous computing: smart devices, environments and interaction
Use of proxies to simplify network access by transparently encoding and decoding the transmitted data on behalf of clients and / or servers
Encode / decode data for transmission Client User Query Result Server Optional confirmation
Proxy
38 Ubiquitous computing: smart devices, environments and interaction
39 Ubiquitous computing: smart devices, environments and interaction
–
40 Ubiquitous computing: smart devices, environments and interaction
41 Ubiquitous computing: smart devices, environments and interaction
Application awareness of ICT Context
Middleware hides complexity of ICT system from application Application sees full ICT system interface, no Middleware used Middleware handles some of the complexity in interfacing to ICT system Full None Partial
42 Ubiquitous computing: smart devices, environments and interaction
43 Ubiquitous computing: smart devices, environments and interaction
– That are autonomous and heterogeneous – Can run on different platforms – Are possibly owned by different organizations.
44 Ubiquitous computing: smart devices, environments and interaction
45 Ubiquitous computing: smart devices, environments and interaction
46 Ubiquitous computing: smart devices, environments and interaction
Enterprise Service Bus (B) Service Discovery (B) Service Invocation (B) Service Composition (M) Service Management (H)
47 Ubiquitous computing: smart devices, environments and interaction
– e large scale coordinated use and sharing of geographically distributed resources
48 Ubiquitous computing: smart devices, environments and interaction
49 Ubiquitous computing: smart devices, environments and interaction
50 Ubiquitous computing: smart devices, environments and interaction
51 Ubiquitous computing: smart devices, environments and interaction
52 Ubiquitous computing: smart devices, environments and interaction
53 Ubiquitous computing: smart devices, environments and interaction
54 Ubiquitous computing: smart devices, environments and interaction
– identify nodes, – register content provision nodes, – Finally, search & retrieve content
55 Ubiquitous computing: smart devices, environments and interaction
A B D H G F I E C J L K N
Servent ¡ Node New ¡ ¡ Node Centralised Directory ¡ Node ¡(used ¡in ¡ Hybrid ¡P2P ¡ ¡ for ¡searches)
Pure ¡ P2P Hybrid ¡ ¡ P2P
Node ¡ with ¡ content search search Link ¡not ¡ accessed
56 Ubiquitous computing: smart devices, environments and interaction
Super ¡ Node
Node ¡ with ¡ content
57 Ubiquitous computing: smart devices, environments and interaction
58 Ubiquitous computing: smart devices, environments and interaction
59 Ubiquitous computing: smart devices, environments and interaction
60 Ubiquitous computing: smart devices, environments and interaction
Invoke ¡(A) ¡ Coordinate ¡(A,P) ¡ Terminate ¡(A,P) Remove ¡registrations ¡(P) Re-‑invoke ¡(A), ¡Update ¡descriptions ¡(P) ¡ Reconfiguration ¡(A), ¡Update ¡composition ¡(A) Announcement ¡(P), ¡Discovery ¡(A) Selection ¡(A), ¡Configuration ¡(A|P) Composition ¡(A)
Creation Execution Dissolution Maintenance
61 Ubiquitous computing: smart devices, environments and interaction
62 Ubiquitous computing: smart devices, environments and interaction
– 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
63 Ubiquitous computing: smart devices, environments and interaction
64 Ubiquitous computing: smart devices, environments and interaction
– 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.
65 Ubiquitous computing: smart devices, environments and interaction
What Is it? Why do we need it?
nodes are introduced into a network. Which Network Protocols support Network Discovery?
– static assigned IP addresses may be assigned – e.g., printers, etc
– 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? –
66 Ubiquitous computing: smart devices, environments and interaction
– 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
– because multiple DHCP servers may issues overlapping addresses; – permanent IP addresses can conflict with dynamically assigned
– inactive clients may attempt to use an address that has been reassigned
67 Ubiquitous computing: smart devices, environments and interaction
68 Ubiquitous computing: smart devices, environments and interaction
– techniques that automatically creates a usable IP network without configuration or special servers
–
– choosing network addresses, – giving oneself an address, – discovering names and discovering service addresses
– Apple's Multicast DNS (mDNS) – Microsoft's Link-local Multicast Name Resolution (LLMNR)
69 Ubiquitous computing: smart devices, environments and interaction
– If service providers and requesters are static, then there is little need for dynamic service discovery – Dynamic service discovery is needed to
providers are mobile,
– involves decoupling service provision from service requests and supporting dynamic announcements – dynamic discovery of service providers and service requesters
70 Ubiquitous computing: smart devices, environments and interaction
71 Ubiquitous computing: smart devices, environments and interaction
72 Ubiquitous computing: smart devices, environments and interaction
– multicast versus broadcast.
73 Ubiquitous computing: smart devices, environments and interaction
74 Ubiquitous computing: smart devices, environments and interaction
– Pull minimises network traffic concerning service discovery (i.e. no broadcast messages)
– 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
75 Ubiquitous computing: smart devices, environments and interaction
Directory Service Blackboard Broker
Directory Client
3 Services 4 2
1 Register ¡ Services ¡ Lookup ¡ Services
Message Board Client Services
4 1
3 2 Register ¡ ¡ ¡ requests Lookup ¡ Requests
Client Services
1 3 4 2
Broker
76 Ubiquitous computing: smart devices, environments and interaction
– The process of establishing whether or not a service exists internally involves self descriptions, self awareness and reflection
– Exact matches or inexact wild card or even conditional matches
77 Ubiquitous computing: smart devices, environments and interaction
– Self-descriptions – Self-awareness – Reflection
78 Ubiquitous computing: smart devices, environments and interaction
– Due to the autonomy of service providers and the resulting heterogeneity of their implementations and interfaces devices
– leads to a service discovery performance that can give better response time and reduces network load compared to syntactic service discovery
79 Ubiquitous computing: smart devices, environments and interaction
– Used for semantic service descriptions
– heavier computation resources are needed to process these
– Semantic matching of service requests can enable services to be classified and grouped
80 Ubiquitous computing: smart devices, environments and interaction
81 Ubiquitous computing: smart devices, environments and interaction
– 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
without terminating service processes. – The interaction in the process needs to be coordinated or
82 Ubiquitous computing: smart devices, environments and interaction
83 Ubiquitous computing: smart devices, environments and interaction
– select item, – order item, – receive acknowledgement and receive item, – need to be interleaved with a separate pay for item process.
84 Ubiquitous computing: smart devices, environments and interaction
– in what order to invoke service actions – how to handle out of order message sequences in a process without terminating service processes.
– Makes the coordination of multiple services inflexible.
85 Ubiquitous computing: smart devices, environments and interaction
86 Ubiquitous computing: smart devices, environments and interaction
– Full versus Partial
87 Ubiquitous computing: smart devices, environments and interaction
– LooCI component model
88 Ubiquitous computing: smart devices, environments and interaction
89 Ubiquitous computing: smart devices, environments and interaction
90 Ubiquitous computing: smart devices, environments and interaction
91 Ubiquitous computing: smart devices, environments and interaction
Uses?
92 Ubiquitous computing: smart devices, environments and interaction
93 Ubiquitous computing: smart devices, environments and interaction
Layered ¡ Model ¡ 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
94 Ubiquitous computing: smart devices, environments and interaction
Pipe ¡ Filter ¡
E1 E1 E2
Pipe ¡
E2
Pipe-‑Filter ¡ Model ¡ Pipe ¡ Filter ¡
E2 E3
different applications that use different kinds of content filtering
95 Ubiquitous computing: smart devices, environments and interaction
– central data structure represents the current state (blackboard) – collection of independent components operate on central data store. (interacting components – consumers and providers)
– 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.
96 Ubiquitous computing: smart devices, environments and interaction
97 Ubiquitous computing: smart devices, environments and interaction
Source
Source Source Source Consumer Consumer Consumer
98 Ubiquitous computing: smart devices, environments and interaction
Consumer
Producer
E2
Event ¡Dispatcher
E2 E1E3E4 E1 E4 E2 E3
Event ¡ Loop Registration Buffer Matching
E4
Filter Action Filter Filter Action
Producer E4 Producer E3 Producer E1
Consumer
99 Ubiquitous computing: smart devices, environments and interaction
100 Ubiquitous computing: smart devices, environments and interaction
– e.g., a flat tyre triggers a vehicle driver to slow down
– e.g., after travelling a certain number of miles, a vehicle must be serviced to maintain it in a roadworthy state
– e.g., at a certain time record a certain audio video program
– e.g., the wheel brake pads are too worn and need to be replaced.
101 Ubiquitous computing: smart devices, environments and interaction
– Event floods: solved by prioritising and using event expiration? – EDA generally have no persistence – Can be difficult to keep things running through a failure
– Prioritising events – Event persistence – Event coordination (event coordination may be needed by applications when events can arrive in any order) – Highly selective event generation and transmission
102 Ubiquitous computing: smart devices, environments and interaction
103 Ubiquitous computing: smart devices, environments and interaction
104 Ubiquitous computing: smart devices, environments and interaction
– E.g. e-commerce
– E.g., catalogue-based purchase
– E.g., clients issues several requests to discover suitable sevices
– E.g., purchasing travel (tickets, hotels, car rent, etc.)
105 Ubiquitous computing: smart devices, environments and interaction
Service invocation e.g., what is the best flight given these constraints?
Wireless Network Decode data Encode data for transmission Mobile Application Capture User Query Result Server Optional confirmation result received
106 Ubiquitous computing: smart devices, environments and interaction
107 Ubiquitous computing: smart devices, environments and interaction
Purchasing Sales SubmitPO AckPO SubmitASN SubmitInvoice SubmitPayment
(ASN = Advanced Shipping Notice) (PO = Purchase Order)
AckPayment
Inventory Shipping Bank TransferFundsRequest AckTransferFunds ReqShipping ShippingArranged For Next day Check/update Confirm / instock
108 Ubiquitous computing: smart devices, environments and interaction
– It ensures server based processing in the network – Look up in the catalogue
– Process transaction – Dynamic Server-side device profiling of clients
109 Ubiquitous computing: smart devices, environments and interaction
110 Ubiquitous computing: smart devices, environments and interaction
111 Ubiquitous computing: smart devices, environments and interaction
– Limited network area converage – Intermittent low bandwidth access via some networks – Hand offs – Interference – Variable signal reception
112 Ubiquitous computing: smart devices, environments and interaction
– Because requests will block or terminate and may need to be repeated and restarted
– use of asynchronous communication – handling unreliable communication (ACK/NACK? )and – message caching
113 Ubiquitous computing: smart devices, environments and interaction
– They provide concurrent access to shared data occurs. This concurrency may occur at two different – levels: remote versus local and write versus read
114 Ubiquitous computing: smart devices, environments and interaction
– Check message integrity – ACK/NACK – Caches
115 Ubiquitous computing: smart devices, environments and interaction
– They buffer sent messages or retain some intermediate states about the messages
116 Ubiquitous computing: smart devices, environments and interaction
– e.g. pressing an elevator call button again because the response has not yet been completed
– e.g. a message request that withdraws funds from one bank account
117 Ubiquitous computing: smart devices, environments and interaction
– the sender may not be able to distinguish between a sender crash before the message is sent, – a sent message being lost, – a remote server crash and the received message being lost
118 Ubiquitous computing: smart devices, environments and interaction
– receivers (e.g. servers) need to be ready before clients start to make requests to them
– Sender side asynchronous requests – Receiver side asynchronous requests
119 Ubiquitous computing: smart devices, environments and interaction
– Normally, no buffer required
– It Blocks processes
Receiver Execution Thread or Process Sender Execution Thread or Process
120 Ubiquitous computing: smart devices, environments and interaction
Request
Blocks
121 Ubiquitous computing: smart devices, environments and interaction
Receiver Execution Thread Buffer Buffer Continues with
Request Sender Execution Thread
– .
122 Ubiquitous computing: smart devices, environments and interaction
123 Ubiquitous computing: smart devices, environments and interaction
Client (query, update)
Client Cache Read ahead Database Server (Sales)
124 Ubiquitous computing: smart devices, environments and interaction
125 Ubiquitous computing: smart devices, environments and interaction