Telecooperation. Ubiquitous & Mobile Computing. Technische Universität Darmstadt. Connectivity: Ubiquitous Communications. Dr. Erwin Aitenbichler

Similar documents
DS 2009: middleware. David Evans

Lecture 5: Object Interaction: RMI and RPC

Communication. Distributed Systems Santa Clara University 2016

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Lecture 06: Distributed Object

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

CHAPTER - 4 REMOTE COMMUNICATION

Advanced Distributed Systems

Chapter 5: Distributed objects and remote invocation

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 1. Introduction

Chapter 4 Communication

Structured communication (Remote invocation)

Communication. Overview

Distributed Systems. The main method of distributed object communication is with remote method invocation

Dr Markus Hagenbuchner CSCI319 SIM. Distributed Systems Chapter 4 - Communication

Verteilte Systeme (Distributed Systems)

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

Today: Distributed Objects. Distributed Objects

Distributed Systems. Edited by. Ghada Ahmed, PhD. Fall (3rd Edition) Maarten van Steen and Tanenbaum

Announcements. me your survey: See the Announcements page. Today. Reading. Take a break around 10:15am. Ack: Some figures are from Coulouris

Unit 7: RPC and Indirect Communication

Collaboration of Tasks

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

Today CSCI Remote Method Invocation (RMI) Distributed Objects

Communication. Outline

Distributed Systems. Lehrstuhl für Informatik 4. RWTH Aachen. Organization. Literature. Classification of the lecture

MODELS OF DISTRIBUTED SYSTEMS

Distributed Systems Question Bank UNIT 1 Chapter 1 1. Define distributed systems. What are the significant issues of the distributed systems?

Chapter 4 Communication

Communication Paradigms

MOM MESSAGE ORIENTED MIDDLEWARE OVERVIEW OF MESSAGE ORIENTED MIDDLEWARE TECHNOLOGIES AND CONCEPTS. MOM Message Oriented Middleware

Evolution of Service Oriented Architectures

SAI/ST course Distributed Systems

Fundamental Issues. System Models and Networking Chapter 2,3. System Models. Architectural Model. Middleware. Bina Ramamurthy

MODELS OF DISTRIBUTED SYSTEMS

Indirect Communication

Distributed Middleware. Distributed Objects

May Gerd Liefländer System Architecture Group Universität Karlsruhe (TH), System Architecture Group

DISTRIBUTED SYSTEMS [COMP9243] Distributed Object based: Lecture 7: Middleware. Slide 1. Slide 3. Message-oriented: MIDDLEWARE

Contents. Mobile Middleware Course. Introduction and Overview Sasu Tarkoma. Lecture Outline. Course Book. Mobile Evolution.

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

COMMUNICATION IN DISTRIBUTED SYSTEMS

Need For Protocol Architecture

Electronic Payment Systems (1) E-cash

Remote Invocation. Today. Next time. l Overlay networks and P2P. l Request-reply, RPC, RMI

Remote Procedure Call

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008

Architectural Styles. Software Architecture Lecture 5. Copyright Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.

WAN-DDS A wide area data distribution capability

DISTRIBUTED COMPUTER SYSTEMS

Multicast service model Host interface Host-router interactions (IGMP) Multicast Routing Distance Vector Link State. Shared tree.

CSE 123A Computer Networks

Remote Invocation. 1. Introduction 2. Remote Method Invocation (RMI) 3. RMI Invocation Semantics

Chapter 2 Architectures. Software Architectures

Operating System Support

Introduction to Distributed Systems

Software Architecture Patterns

Distributed Information Processing

02 - Distributed Systems

02 - Distributed Systems

Web Services Security. Dr. Ingo Melzer, Prof. Mario Jeckle

Chapter 5 Remote Invocation. Gandeva Bayu Satrya, ST., MT. Telematics Labz. Informatics Department Telkom

RPC and RMI. 2501ICT Nathan

Distributed Object-Based Systems The WWW Architecture Web Services Handout 11 Part(a) EECS 591 Farnam Jahanian University of Michigan.

Chapter 09 Network Protocols

WebSphere MQ Low Latency Messaging V2.1. High Throughput and Low Latency to Maximize Business Responsiveness IBM Corporation

A Decentralized Content-based Aggregation Service for Pervasive Environments

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

CORBA (Common Object Request Broker Architecture)

Chapter 5 Distributed Objects and Remote Invocation

Need For Protocol Architecture

Distributed Technologies - overview & GIPSY Communication Procedure

Distributed Systems Principles and Paradigms

Distributed Systems. Today. Next. Distributed systems The class Models and architectures. A brief, gentle intro to Go

Distributed Systems Principles and Paradigms

Distributed Information Systems

Distributed Information Processing

03 Remote invoaction. Request-reply RPC. Coulouris 5 Birrel_Nelson_84.pdf RMI

Communication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Chapter 12 Network Protocols

Today. Architectural Styles

IT114 NETWORK+ Learning Unit 1 Objectives: 1, 2 Time In-Class Time Out-Of-Class Hours 2-3. Lectures: Course Introduction and Overview

Architectures for Distributed Systems

Overview. Distributed Systems. Distributed Software Architecture Using Middleware. Components of a system are not always held on the same host

Today. Architectural Styles

Distributed Systems. Chapter 02

Outline. Interprocess Communication. Interprocess Communication. Communication Models: Message Passing and shared Memory.

Dr. Jack Lange Computer Science Department University of Pittsburgh. Fall Distributed System Definition. A distributed system is

CAS 703 Software Design

Streaming Video over the Internet. Dr. Dapeng Wu University of Florida Department of Electrical and Computer Engineering

Today CSCI Communication. Communication in Distributed Systems. Communication in Distributed Systems. Remote Procedure Calls (RPC)

COMMUNICATION PROTOCOLS

Distributed Systems. 5. Remote Method Invocation

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964


Architecture of Software Intensive Systems

Telecommunication Services Engineering Lab. Roch H. Glitho

Transcription:

Technische Universität Darmstadt Telecooperation Ubiquitous & Mobile Computing Connectivity: Ubiquitous Communications Dr. Erwin Aitenbichler Copyrighted material; for CBU ICT Summer School 2009 student use only

Distributed Systems Distributed Systems Additional abstraction layer on top of communication networks Extension of familiar prog. models to distributed systems: e.g., IPC, RPC, DOC Advanced models: e.g., Pub/Sub, Tuple Spaces, DSM, PVM, MPI Problems with classical systems in UbiComp context are many Connections assumed to be static Strict (protocol) layering principle Middleware not modular; computers just became more powerful Often not open (CORBA interface IDs) Often simple abstraction (WS -> RPC, REST -> IPC) 2

Remote Method Call/Invocation (here: CORBA) 3

New in UbiComm Some important aspects of ubiquitous communications: required Machine-to-machine communication Heterogeneity support Openness Adaptivity solutions Decoupling of communication partners Publish/Subscribe Protocol Heaps Modular operating systems, middleware, applications Peer discovery (node discovery) Decoupling of software components Service discovery Service deployment Flexible comm. architectures Enhanced service discovery Connection-aware distributed objects Decentralized control 4

Communication Microkernel Basic abstraction: Channel-based Publish/Subscribe Service Aggregates objects In- and Out-Ports Channels unicast or multicast MundoCore: Architecture Private Private Object Private Object Object Publisher Subscriber Dr. Erwin Aitenbichler P S P S Service 1 Service 2 Service Exported Object emits interface 5

MundoCore: Layers Modular Microkernel architecture Services and Components Layer Model Groups communication services by function Core: Publish/Subscribe Dr. Erwin Aitenbichler 6

MundoCore: Layers Modular Microkernel architecture Services and Components Layer Model Groups communication services by function Core: Publish/Subscribe Routing: 3 network types Single hop Unstructured P2P Structured P2P Dr. Erwin Aitenbichler 7

MundoCore: Layers Modular Microkernel architecture Services and Components Layer Model Groups communication services by function Core: Publish/Subscribe Routing: 3 network types Single hop Unstructured P2P Structured P2P Transport Discovery of nearby nodes Dr. Erwin Aitenbichler 8

MundoCore: Layers Modular Microkernel architecture Services and Components Layer Model Groups communication services by function Core: Publish/Subscribe Routing: 3 network types Single hop Unstructured P2P Structured P2P Transport Discovery of nearby nodes Dr. Erwin Aitenbichler 9

MundoCore: Layers Modular Microkernel architecture Services and Components Layer Model Groups communication services by function Core: Publish/Subscribe Routing: 3 network types Single hop Unstructured P2P Structured P2P Transport Discovery of nearby nodes Paradigms Publish/Subscribe Distributed OO-Programming Streaming Dr. Erwin Aitenbichler 10

MundoCore: Layers Modular Microkernel architecture Services and Components Layer Model Groups communication services by function Core: Publish/Subscribe Routing: 3 network types Single hop Unstructured P2P Structured P2P Transport Discovery of nearby nodes Paradigms Publish/Subscribe Distributed OO-Programming Streaming Dr. Erwin Aitenbichler 11

Protocol Layering (1) Dr. Erwin Aitenbichler State of the art: Protocol Layering Served well for strict end-to-end model of original Internet Today: many middle boxes : firewalls, NAT, proxies, caches Inserted functionality MPLS @layer 2.5 IPsec @3.5 TLS @4.5 Reasons for inserting functionality: Re-use of working implementations Long-standing inter-layer interfaces Coarse granularity of protocol functionality Drawbacks of Layering Message flow strictly defined, i.e. a message can only be passed from layer n to layer n+1 or n-1 Cannot add functionality in or between layers Middleware Layers here: RMI OS Layers IP-Stack Application Layer Stub/Skeleton Layer Remote Reference L. RMI Transport Layer 6: Presentation Layer 5: Session Layer 4: Transport Layer TCP, UDP 3: Network Layer IP 2: Data Link Layer 1: Physical Layer 12

Protocol Layering (2) Communication in the Internet Mostly file transfers, so TCP/IP is fine Communication in Ubiquitous Computing / Smart Environments More machine-to-machine communication message-based traffic Sensor data low latency required in most cases no retransmissions required sometimes Forward Error Correction (FEC) required for better reliability Media appliances streaming with rate control Totally different traffic More problems with TCP/IP Poor performance in wireless networks, because of unsuitable congestion control Stream-based, not message-based 13

Protocol Layering (3) Dr. Erwin Aitenbichler OSI Model: Data Units I = interface P = protocol S = service (n+1) layer (n) layer (n)-pci (n)-idu (n)-sdu (n)-ici DU = data unit CI = control information PCI (n)-pdu (n)-sdu (n-1)-ici (n-1)-idu (n-1) layer (n)pci (n)-sdu (n-1)-sdu (n-1)-ici 14

Protocol Heaps Dr. Erwin Aitenbichler Role-based Architecture (RBA) Instead of last-on/first-off model: random access to RSHs (role-specific headers) Problem: Nondeterminism Which role handler should be invoked next? A simple solution is: Pass messages down like in layered architecture Introduce address RSH with MIME-Type and use this info when passing messages up 15

MundoCore Protocol Heap Combination of protocol heap and configurable protocol stack Dr. Erwin Aitenbichler Node 1 Node 2 Caller RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Service Provider RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Monitoring TopicBroker AnyRouting BinSerializer AnyTransport 16

Protocol Heap MundoCore Combination of protocol heap and configurable protocol stack Downward processing: defined by stack + Any* proxies Dr. Erwin Aitenbichler Node 1 Node 2 Caller RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Service Provider RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Monitoring TopicBroker AnyRouting BinSerializer AnyTransport 17

Protocol Heap MundoCore Combination of protocol heap and configurable protocol stack Downward processing: defined by stack + Any* proxies Upward processing Phase 1: Use MIME-Type to determine next handler Dr. Erwin Aitenbichler Node 1 Node 2 Caller RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Service Provider RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Monitoring 18

Protocol Heap MundoCore Combination of protocol heap and configurable protocol stack Downward processing: defined by stack + Any* proxies Upward processing Phase 1: Use MIME-Type to determine next handler Phase 2: Kernel knows service interconnections Use stacks Node 1 Node 2 Dr. Erwin Aitenbichler Caller RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Service Provider RMC Stubs Activation TopicBroker AnyRouting BinSerializer AnyTransport Monitoring 19

Combination of Pub/Sub and RMC Externalization and Serialization are separate concepts in MundoCore Externalization: transforms a message containing an active object graph into a message containing a passive data structure. A passive message contains typed name-value pairs. Only base types (int, float, String, etc.), arrays, and maps are allowed as types. Serialization: transforms a passive message into an XML/SOAP document or into some binary representation Benefits are, e.g., Send notification using oneway RMC and define pub/sub filter on passive form Remote Method Calls Automatic generation of client and server stubs by precompiler Naming service implicitly provided by Pub/Sub Connector-Abstraction Automatic generation of connectors by precompiler Java Language Extension with emits keyword 20

Messages vs. RMC Note: two different levels of abstraction! Publisher CS Publisher Subscriber Object SS Subscriber Service Service...... Publisher CS Publisher Subscriber Object SS Subscriber Service Send pub = session.publish(zone, channel); pub.send(message); Receive sub = session.subscribe(zone, channel, new IReceiver() { public void received( }) Service Send stub = new DoX(); Signal.connect(stub, publish( )) stub.dosomething(); Receive Signal.connect( subscribe( ), targetobject) 21

RMC Client Importing an Object DoChatService stub = new DoChatService(); Signal.connect( stub, getsession().publish("lan", "chat_rmc") ); Remote call Synchronous stub.chatmessage(ln); One-way ( fire and forget ) stub.chatmessage(ln, stub.oneway); Asynchronous stub.chatmessage(ln, stub.async); 22

Asynchronous Calls Example: class Calculator { @mcmethod int add(int x, int y); } Asynchronous call: AsyncCall callobject = stub.add(1, 2, stub.async); int result=((integer)callobject.getobj()).intvalue(); Asynchronous call with Callback: AsyncCall callobject = stub.add(1, 2, stub.createonly); callobject.setresultlistener( new AsyncCall.IResultListener() { public void resultreceived(asynccall callobject) { int rslt = ((Integer)callObject.getObj()).intValue(); } }); callobject.invoke(); 23

Serialization Example: @mcserialize public class Message { public String text; public Message() { } public Message(String t) { text = t; } } Note @mcserialize: mcc generates serializers for all non-transient fields Class must have public nullary constructor otherwise it cannot be instantiated by reflection 24

Parameter Marshalling Local: Primitive types: by-value Objects: by-reference RMC: Primitive types: by-value Objects: by-value Deep copy by serialization Distributed Objects: by-reference (Classes with Do-Prefix) Client receives Reference to remote object As return value of an RMC call By using the Signal.connect method (cf. RMC Client example) 25

MundoCore: Build Process Precompilation for Java 1.1- ChatService.oj mcc ChatService.java Client-Stub, Distributed Object DoChatService.java SrvChatService.java Server-Stub Precompilation for Java 1.5- ChatService.java mcc Client-Stub, Distributed Object DoChatService.java SrvChatService.java Server-Stub 26

MundoCore: Interoperability IService.h Interface Repository IService.java mcc IService.wsdl mcc DoIService.java SrvIService.java MundoCore uses WSDL common representation of interfaces extension: data objects description for object serialization constants also supported 27

Decoupling of Services Service Exported Object emits interface Signal.connect(sourceObject, publish( )) Signal.connect( subscribe( ), targetobject) Will be possible in future releases: Signal.connect(doSource, dotarget) Support for output interfaces in MundoCore Java language extension, handled by mcc Services can be connected from outside No explicit creation of distributed objects, connects, channel names in service code MundoCore is aware of all links between services Allows dynamic service loading/unloading, persistence, migration Allows separate evolution of connectors 28

MundoCore: Output interfaces oneway request/ reply inbound Procedure call class C implements I { void m() {} } i.m(); Function call class C implements I { int m() { return 3; } } x=i.m(); outbound Signal event class C emits I { void e() {} } emit.e(); Anonymous request/reply class C emits I { int m() {} } x=emit.m(); 29

MundoCore: Peer Discovery Rendezvous via the primary port All nodes in the same overlay network share the same primary port (default: 4242) If at least one MundoCore-process is running on a host, then this port is bound by some process UDP Broadcast Reaches all nodes configured with the same primary port in the same subnet UDP Multicast Reaches all nodes in the same multicast group (configuration setting) Multicast packets can also reach other subnets, if supported by router Neighbor-Messages Uses R-Multicast provided by routing services All-or-nothing-semantics: A new node can either use all services available or does not get access to them at all. 30

MundoCore: Service Discovery Builds internally on content-based publish/subscribe Services offered by a node are published when the node joins/leaves the network when services are registered/unregistered on explicit query In most cases: discovery based on interfaces Service Query: filter = new ServiceInfoFilter(); filter.filterinterface("org.mundo.service.iiodevice"); filter.zone = "lan ; filter._op_zone = IFilter.OP_EQUAL; ResultSet rs = ServiceManager.getInstance().query(filter, null); Thread.sleep(1000); System.out.println(rs); Continuous Query with contquery() Listener receives inserted, removing, removed, propchanged events until result set is closed 31

MundoCore: Adaptivity Application-aware: collaboration between system and application Laissez-faire: no system support Application-transparent: no changes to application Spectrum of adaptation strategies (Satyanarayanan,1996) Application-transparent: Switching between different transport and routing services Peer discovery: only discovery strategies are configured, no addresses Service discovery, migration Conditional protocol handlers Application-aware: Process node join/leave events Process service register/unregister events Process objectconnected/objectdisconnected events 32

Conditional Protocol Handlers Example: (default stack defined in node.conf) <default-stack xsi:type="array"> <handler>org.mundo.net.activationservice</handler> <handler>org.mundo.net.p2ptopicbroker</handler> <handler>org.mundo.net.routingservice</handler> <if xsi:type="map"> <condition>org.mundo.net.ip.ifudp</condition> <then xsi:type="array"> <handler>org.mundo.net.nackhandler</handler> <handler>org.mundo.net.binserializationhandler</handler> <handler>org.mundo.net.binfraghandler</handler> </then> <else xsi:type="array"> <handler>org.mundo.net.binserializationhandler</handler> </else> </if> <handler>org.mundo.net.ip.iptransportservice</handler> </default-stack> 33

Decentralized Control Example: MVC Pattern implemented with Publish/Subscribe Model does not have to keep track of views Easy to support multiple models -> decentralized control View View P S View Model View P S P S Model View View P S Synchronous RMC Publish/Subscribe 34

Network Types Dr. Erwin Aitenbichler Overlay networks add an abstraction layer atop the phys. network to implement content-based addressing, caching/replication, better fault tolerance, etc. In the following, we consider object location in P2P systems as example We can distinguish two main types Unstructured networks based on searching: networks find objects by searching with keywords that match objects' descriptions Pro: No need to know unique names or hashes Con: Hard to make efficient Unstructured does not mean complete lack of structure: Network has structure, but peers are free to join anywhere and objects can be stored anywhere Structured networks based on addressing: networks find objects by addressing them with their unique name, hash value, etc. Pro: Object location can be made efficient Con: Unique name/hash must be known, no wildcard searches Network structure determines where peers belong in the network and where objects are stored 35

MundoCore: Network Types Unstructured Single-hop routing Fully meshed network Scales up to ~30 clients Best reliability MundoCore: P2PTopicBroker Super-peer network Only super-peers are fully meshed Only super-peers run full pub/sub-broker Leaf nodes are only pub/sub clients MundoCore: DVEventRouter Structured MundoCore: PastryERS Hybrid configurations possible 36

MundoCore: Summary Different traffic in UbiComp Three kinds: event-based, request/reply, (media) streaming Flexible communication architectures Modular middleware; case study: MundoCore structured messages event filtering (brokering layer) typing RMC and object marshalling (language binding layer) Adaptivity Peer discovery, Service discovery Application-transparent adaptation: Any-Proxies, conditional protocol handlers, peer and service discovery, anonymous request/reply Application-aware adaptation: node join/leave, service register/ unregister, object connect/disconnect Decoupling of communication: publish/subscribe of services: Output interfaces, connector abstraction ListenerList bookkeeping should not be part of event source Rethink traditional implementations 37