59
Middleware for Nomadic Computing Stefano Campadello

Middleware for Nomadic Computing Stefano Campadello

Embed Size (px)

Citation preview

Page 1: Middleware for Nomadic Computing Stefano Campadello

Middleware for Nomadic Computing

Stefano Campadello

Page 2: Middleware for Nomadic Computing Stefano Campadello

Presentation Outline

• Nomadic Computing issues• Communication Issues• Mobility Issues• Device Issues• Security Issues

• Middleware for Distributed Computing• WAP• Java RMI• Corba

Page 3: Middleware for Nomadic Computing Stefano Campadello

Presentation Outline

• Enhancing the Middleware• Dolmen• Nomadic RMI• Wireless CORBA

• Conclusions

Page 4: Middleware for Nomadic Computing Stefano Campadello

Nomadic Computing

What’s it?

Page 5: Middleware for Nomadic Computing Stefano Campadello

Nomadic Computing

”The essence of a nomadic environment is to automatically adjust all aspects of user’s computing, communications, and storage functionality in a transparent and integrated fashion” – L. Kleinrock, 1997

Page 6: Middleware for Nomadic Computing Stefano Campadello

Anytime, Anywhere

• A user wants to:• use her laptop during a flight and upload her

work once disembarked• follow financial information independently from

the location and time• instantiate a communication during a disaster

recovery mission• access the Internet or Intranet services while on

the move.

Page 7: Middleware for Nomadic Computing Stefano Campadello

The Challenges in Mobile Computing

Page 8: Middleware for Nomadic Computing Stefano Campadello

Communication Issues

• Low Bandwidth• sending long files requires long time: the chance of

experiencing network failures is high• a graphical user interface can act in a bizarre way

• High bandwidth variability• Bandwidth can increase/decrease four orders of

magnitude depending on local conditions (connected/wireless). Ex: videoconference

• Disconnection• File system can lock up for a remote server to allow

access• After reconnections conflicts are possible

Page 9: Middleware for Nomadic Computing Stefano Campadello

Mobility Issues

• Address Migration• Physical location != network address• To communicate with a mobile computer is

necessary to know its most recent address

• Location-dependent information• Some information depend on location, as local

printers or local currency. • In a mobile environment these information

cannot be stored statically and they must be found dynamically

Page 10: Middleware for Nomadic Computing Stefano Campadello

Devices Issues

• Power limitation• Energy supply is a bottleneck for mobile devices• Bigger batteries => more weight• The user wants long-lasting AND light devices

• User Interface and Display Issues• Size constrains force to use small user interface• Small display size makes access to remote service

difficult• Input devices must be redesign (keyboard -> pen-

based recognition)• Hand-writing and sound recognition

Page 11: Middleware for Nomadic Computing Stefano Campadello

Security Issues

• Identification• Certification• Privacy• Insecure channels• Insecure devices (can be stolen)• ...

Page 12: Middleware for Nomadic Computing Stefano Campadello

Middleware for Distributed Computing

Page 13: Middleware for Nomadic Computing Stefano Campadello

Middleware for Distributed Computing

• Remote Procedure Call (RPC)• 1976. Provides communication across a network

between programs written in a high-level language• Using procedure calls mechanism is easier than

building a communication paradigm• It presumes the existence of TCP/IP or UDP• Its use is in decline: not implemented in object oriented

programming languages• Java RMI

• 1998. Same concept implemented in Java. • More later...

Page 14: Middleware for Nomadic Computing Stefano Campadello

Machine A

Machine B

Clientprogram

Servicedaemon

Serviceexecutes

RPC Call

Invokeservice

Call service

RPC returns

requestedcompleted

return reply

Program continues

Remote Procedure Call (RPC)

Page 15: Middleware for Nomadic Computing Stefano Campadello

Middleware for Distributed Computing

• Wireless Application Protocol• Designed for Nomadic devices• It provides Internet access for phones and small PDAs

Page 16: Middleware for Nomadic Computing Stefano Campadello

WAP - Architecture

Page 17: Middleware for Nomadic Computing Stefano Campadello

WAP – Architecture

Page 18: Middleware for Nomadic Computing Stefano Campadello

WAP – Architecture 2.0

Page 19: Middleware for Nomadic Computing Stefano Campadello

Middleware for Distributed Computing

• OMG CORBA• 1989. Provides interoperability between objects in a

heterogeneous, distributed environment• Interfaces specified in OMG IDL• Not suited for wireless networks, since it requires

reliable communication• Not suited for mobile device, since the terminal

cannot change its point-of-presence• Microsoft COM and DCOM

• COM allows binary interoperability between distributed objetcs

• NOT platform independent and proprietary protocols

Page 20: Middleware for Nomadic Computing Stefano Campadello

InterfaceRepository

IDLCompiler

ImplementationRepository

ClientOBJ

REF

Object(Servant)

in argsoperation()

out args +return

DIIIDL

STUBS

ORB

INTERFACE

IDL

SKELDSI

Object Adapter

ORB CORE GIOP/IIOP

OMG CORBA – Architecture

Page 21: Middleware for Nomadic Computing Stefano Campadello

Enhancing the Nomadic Layers

Page 22: Middleware for Nomadic Computing Stefano Campadello

APPLICATIONSAPPLICATIONS

MIDDLEWARE(IIOP/RMI/ACTIVE-X)

MIDDLEWARE(IIOP/RMI/ACTIVE-X)

RADIO LINKRADIO LINK

TRANSPORT LAYER(TCP/IP)

TRANSPORT LAYER(TCP/IP)

Nomadic Computing - Layered

Page 23: Middleware for Nomadic Computing Stefano Campadello

Improving Long Thin Networks

• Slow Start and Congesting Avoidance• the system assumes the network is congested while

packets are dropped for corruption

• Delayed ACKs• the dimension of the sender’s window depends on the

number of ACKs it receives. Adaptation is slow

• Three-way Handshake• data transfer is possible only after the handshake is

completed. Long latency makes short transactions unattractive

• Lenght of TCP/IP headers

Page 24: Middleware for Nomadic Computing Stefano Campadello

Improving TCP over Wireless

• Solutions:• modify or eliminate slow start• Use larger initial windows• Count the data acknowlegde not the number of ACK• Change the spacingbetween ACKs• Compress headers or compress IP payload• SNOOP (Berkeley)

• Split connection approach, but maintaining end-to-end semantic

• retransmission of lost packets only locally• suppression of duplicate ACKs from receiver to

sender

Page 25: Middleware for Nomadic Computing Stefano Campadello

Improving Client-Server Paradigm

• Satyanarayanan [1996]:• Extremes of adaptation: laissez-fair and application-

transparent Improving Client-Server Paradigm

Application-aware(collaboration)

Laissez-faire(no system support)

Application-transparent(no changes to applications)

Page 26: Middleware for Nomadic Computing Stefano Campadello

Applications

File System Proxy

Mobile Host

MobileFile Server

Fixed Network

Mobile File System APIs

File System APIs

Enhancing the Communication Layer

• Example: Coda File System

Page 27: Middleware for Nomadic Computing Stefano Campadello

Mowgli Project

Page 28: Middleware for Nomadic Computing Stefano Campadello

Monads

• Adaptation agents for Nomadic Application.• The key work is ”prediction” through

learning

Page 29: Middleware for Nomadic Computing Stefano Campadello

Addressing the Mobility Issues

• Mobile IP

Page 30: Middleware for Nomadic Computing Stefano Campadello

Enhancing The Middleware Layer

Nomadic RMI

Page 31: Middleware for Nomadic Computing Stefano Campadello

Remote Method Invocation

• RMI protocol interface lets Java objects on different hosts communicate with each other in a transparent way

• Clients can invoke methods of a remote object as if they were local methods

• Preserve the object oriented paradigm in distributed computing

Page 32: Middleware for Nomadic Computing Stefano Campadello

Server Program

Skeleton (JDK 1.1)

Remote Reference Layer

Client Program

Stub

Transport Layer The Internet

Remote Reference Layer

Transport Layer

Logical Path

Java RMI - Layers

Page 33: Middleware for Nomadic Computing Stefano Campadello

Client ObjectClient Object

StubStub

RegistryRegistry

ServerServer

Remote ObjectRemote Object

SkeletonSkeleton

13

8 56

74

Client Virtual Machine Server Virtual Machine

2

Java RMI - Protocol

Page 34: Middleware for Nomadic Computing Stefano Campadello

Java RMI in a Nutshell

Client Server

RegistryRegistryRegistry

ServerServerServer

Server-stubStub-serverStub-server

DGC messages

ClientClientClient

Send the me stub

StubStub

Here is the stub

Hello is here

invokeMethod()

“ReturnValue”

Lookup(): where is Hello?

Page 35: Middleware for Nomadic Computing Stefano Campadello

Java RMI in a Nutshell

Client Server

RegistryRegistryRegistry

ServerServerServer

Server-stubStub-serverStub-server

DGC messages

ClientClientClient

Send the me stub

StubStub

Here is the stub

Hello is here

invokeMethod()

“ReturnValue”

Lookup(): where is Hello?

Page 36: Middleware for Nomadic Computing Stefano Campadello

“Hello World” Example

TCP 1

Header

Protocol Ack, EPId

EPId, Lookup()

ServerRef

Header

Protocol Ack, EPIdEPId, dirty()

LeasePing

Ping Ack

DGCAck

Ping

Ping Ack

sayHello()

“Hello World”

clean()

clean result

...

TCP 2

ParallelParallel

Client Registry Server

Page 37: Middleware for Nomadic Computing Stefano Campadello

Data traffic analysis

Client to Server andRegistry(bytes)

Server andRegistry to

Client(bytes)

Total(bytes)

Registry Lookup 55 (6%) 276 (42%) 331 (20%)Invocation Data 41 (4%) 37 (6%) 78 (5%)

DGC Data 831 (85%) 305 (46%) 1136 (69%)ProtocolOverhead

52 (5%) 40 (6%) 92 (6%)

Total 979 (100%) 658 (100%) 1637 (100%)

Page 38: Middleware for Nomadic Computing Stefano Campadello

RMI Optimization

• Maintain compatibility with Java RMI specifications

• Avoid redundancy in communication protocol

• Use compression and caching to minimize data transmission

Page 39: Middleware for Nomadic Computing Stefano Campadello

Java RMI Optimization

• Protocol• Use of Mediators to minimize the exchange of

data through the wireless link.

• Data Communication• Optimized Communication: Compress and

Optimize data communication

• Class Loading• If possible, avoid to download stubs

Page 40: Middleware for Nomadic Computing Stefano Campadello

Protocol Optimization

• The idea is to de-couple the connection between the client and the server using mediators.

Wireless Link

Mobile Node

RMIAgentRMIAgent

ClientClient

RMIProxyRMIProxy

NamingNaming

Access Node

Page 41: Middleware for Nomadic Computing Stefano Campadello

Optimized RMIMobile Node

ClientClientClient

FakeStubsFakeStubFakeStub

ProxyProxyProxy

AgentAgentAgent

MonadsRegistry

MonadsRegistryMonadsRegistry

ClientClientClient

RegistryRegistryRegistry

ServerServerServer

RegistryRegistryRegistry

ServerServerServer

Access Node

Cac

he

Cac

he

Page 42: Middleware for Nomadic Computing Stefano Campadello

Optimized RMIMobile Node

ClientClientClient

FakeStubsFakeStubFakeStub

ProxyProxyProxy

AgentAgentAgent

MonadsRegistry

MonadsRegistryMonadsRegistry

ClientClientClient

RegistryRegistryRegistry

ServerServerServer

RegistryRegistryRegistry

ServerServerServer

Access Node

Cac

he

Cac

he

Page 43: Middleware for Nomadic Computing Stefano Campadello

Optimized Remote Invocation

RMI AgentRMI Agent RegistryRegistry ServerServer

Header

Protocol Ack

Lookup() lookup

ServerRef

dirty()

Lease

ClientClient RMI ProxyRMI Proxy

In cache?

Lookup()

InternalRef

AgentRef Cache and markfor sync First?

Header

Protocol AckHeader

Protocol Ackdirty()

Leasecount[ref]++

DGCAckHeader

Protocol Ack

DGCAck

sayHello () sayHello()sayHello ()

“Hello World”“Hello World”“Hello World”

clean()

clean resultclean resultclean result

...clean() clean()Last?

Page 44: Middleware for Nomadic Computing Stefano Campadello

Comparison between RMI and RMI

RegistryInvocation

RemoteInvocation

Total

Java RMI 7.1 sec 1.3 sec 8.4 secOptimized

RMI1.7 sec 0.6 sec 2.3 sec

Improvement 417% 216% 365%

Page 45: Middleware for Nomadic Computing Stefano Campadello

Test Arrangements

• Operating Systems• Clients:

• Windows98• Linux (Red Hat 6.1, kernel 2.2.14)

• Server• Windows NT (SP 6)• Linux (Red Hat 6.1, kernel 2.2.14)

Page 46: Middleware for Nomadic Computing Stefano Campadello

Test Arrangements

• Java Virtual Machine• Sun JDK 1.2.2 (Linux and Windows)

• Wireless communication• GSM HSCSD (5 configurations)

• Benchmark Suite• KaRMI from University of Karlsruhe

Page 47: Middleware for Nomadic Computing Stefano Campadello

Lookup Results (windows)

Page 48: Middleware for Nomadic Computing Stefano Campadello

Lookup Differences

Page 49: Middleware for Nomadic Computing Stefano Campadello

Invocation ResultsImage Uplink (Linux)

Page 50: Middleware for Nomadic Computing Stefano Campadello

Invocation Results Two-way Text uplink

Page 51: Middleware for Nomadic Computing Stefano Campadello

Nomadic RMI

• The previous solution does not support mobility

• If the connection between mobile host and RMI Agent is interrupted the system is in an unstable state

RMI (Nomadic RMI) Protocol addresses this problem

• It allows Handover between different access points

Page 52: Middleware for Nomadic Computing Stefano Campadello

Nomadic RMI

Page 53: Middleware for Nomadic Computing Stefano Campadello

Enhancing The Middleware Layer

Wireless CORBA

Page 54: Middleware for Nomadic Computing Stefano Campadello

Issues of CORBA in Nomadic Environment

• IIOP servers are not expected to change their transport connection endpoint

• IIOP and the transport connections are supposed to be reliable

• It is not possible to change network interface during an IIOP connection

• Connections are expected to enjoy high bandwidth

Page 55: Middleware for Nomadic Computing Stefano Campadello

Home domain

Visited domain

AccessBridge

AccessBridge

AccessBridge

AccessBridge

TerminalDomain

TerminalBridge

HomeLocation

Agent

GIOPtunnel

Wireless CORBA – Architecture

Page 56: Middleware for Nomadic Computing Stefano Campadello

wCORBA Framework

• Mobile IOR• Identifies the terminal on which the target object

resides• And its Access Bridge

• Home Location Agent• Keeps track of the current location of the terminal

• Access Bridge• End-point of the GIOP tunnel in the network side

• Terminal Bridge• GIOP tunnel

Page 57: Middleware for Nomadic Computing Stefano Campadello

wCORBA Framework

• Terminal Bridge• End-point of the GIOP tunnel on the terminal side

• GIOP tunnel• Is the means to transmit GIOP messages between

the Terminal Bridge and the Access Bridge

Page 58: Middleware for Nomadic Computing Stefano Campadello

Terminal ORB Access Bridge ORB peer ORB

GIOP GIOP

GIOP messages

TCPTCPTCP byte stream

IIOPIIOPIIOP messages

GTP adaptation layer GTP adaptation layer

transport transport

GTP GTPGTP msgs

ObjectCORBA invocations

Object

Wireless CORBA - GIOP Tunneling Protocol

Page 59: Middleware for Nomadic Computing Stefano Campadello

TB old AB new AB

start_handoff

HandoffTunnelRequesttransport_address_request

EstablishTunnelRequest

Establishment of transport connectivity

HLA

location_upadte

EstablishTunnelReply

HandoffTunnelReply handoff_completed

ReleaseTunnelRequest

ReleaseTunnelReplynotify other ABs

DepartingTerminalNotificationHandoffNotification

ArrivingTerminalNotification

report_handoff_status

Wireless CORBA – Handoff