Mobile Socket Toward Continuous Operation for Java Applications

Mobile. Socket Toward Continuous Operation for Java Applications Tadashi OKOSHI Graduate School of Media and Governance Keio University, JAPAN slash@ht. sfc. keio. ac. jp Eighth International Conference on Computer Communication and Networks IEEE ICCCN’ 99 October 11 -13, 1999 @Boston, USA

Research Abstract n n Goal: Communication Continuity for network applications for users’ Work Continuity Mobile. Socket… n n Is an application layer approach implemented as an user-level library. Is effective for n n Conventional Network Application Java Mobile Applications

With Mobile. Socket library… n n n Java network applications can continue their communication with the one continuous socket connection, even after the mobile host’s relocation. No need to modify source code Additional APIs for adaptation

Today’s Outline n n 1. Research Background 2. Communication Continuity Mobile. Socket 3. Design 4. Implementation 5. Programming & Applications 6. Evaluation 7. Conclusion & Future Work

1. Background n Mobile Computing Environment n A Mobile hosts and users move around network even during applications are communicating with the remote. Internet A Mobile Host B

1. Background (Cont’d) n Research Goal n n To realize users’ “Continuous Operation” supported by the continuous behavior of applications For network applications… n “Communication Continuity” with remote

2. Communication Continuity n Communication Continuity consists of… n n n “Mobility” “Virtual Circuit Continuity” Other Issues

“Mobility” n n Capability of the protocol functionality in the both communication endpoints to identify each other independent of the location changes of the endpoints. E. g. : Mobile IP Identify each other (Location Transparent ID)

“Virtual Circuit Continuity” n n Capability of keeping a virtual circuit connection alive, retaining reliability and the byte stream consistency independent of the location changes of the endpoints. E. g. : TCP-R Keep a virtual circuit connection

Toward Communication Continuity For applications with… n Datagram communication (e. g. UDP/IP) n n Mobility support Virtual circuit communication (e. g. TCP/IP) n n Mobility support Virtual circuit continuity support ⇒ Both “Mobility” and “VC Continuity” supports are the requirements for communication continuity.

Other Issues for Communication Continuity Support n n n 2) Simplified and minimized implementation 3) Avoidance of modification in existing applications 4) Adaptation interfaces for Mobile. Socket-aware applications

3. Mobile. Socket Design n (1) mobility and connection continuity support in application layer n n n Dynamic Socket Switching (DSS) Application Layer Window (ALW) (2) User-level library in Java (3) Supports both implicit & explicit redirection operations (4) Adaptation APIs for applications

(1) Application Layer Approach Application r e y a L et Mobile. Socket k c o S e l r i e b MSOCK y o a M t. L e k r c e o y S La TCP-R P C T er y La Mobile IP P I

Dynamic Socket Switching Application Internal Socket Connection (1) r e y (Mobile. Host) a L t (Correspondent Host) e k c o S le MH 1 CH CH CH IPCH Before MH 1 IPMH 1 i ob M et k c So P C T IP er y a L r e y La

Dynamic Socket Switching Application (Mobile. Host) Internal Socket Connection (2) (Correspondent Host) MH 1 CH IPCH After IPMH 1 Rel oca tion MH 2 IPMH 2 r e y a L t ke c o S e l r i e b y o a L M t ke r c e o y S a L P TC r e y a L P I

Application Layer Window (ALW) n n User-level sliding window inside library Provides Byte Stream Consistency Application write() Data store write ALW Mobile. Socket in Sender Application read() Data ALW_COUNTER ACK flush read count recv ACK send Mobile. Socket in Receiver Data ACK Data. Socket Control. Socket

(2) User-Level Library Application Mobile. Socket lib Socket interface TCP/UDP (MSOCKS) (TCP-R) IP (Mobile-IP) Socket interface TCP/UDP IP

(3) Connection Redirection Schemes n Implicit Redirection n n Mechanism by which a connection is automatically redirected such that application is unaware of the relocation. No need to modify and insert any additional lines to applications No adaptability in applications behavior Explicit Redirection

(4) Explicit Redirection & Adaptation Interfaces n n Implicit Redirection Explicit Redirection n Mechanism by which the application programmers can explicitly specify where the connection redirection takes place Realized by specific APIs (suspend(); resume(); ) Adaptive behavior of application n Need to modify application’s source code n n

4. Mobile. Socket Implementation n n State Transition Diagram Time Sequence n n n Connection Establishment Implicit Redirection Explicit Redirection

START POINT Closed Connected from Client (DSS-Establishment. Phase(Server) ) Lost IP address Implicitly Suspended Connected to Server (DSS-Establishment. Phase(Client) ) Called suspend() (send SUSPEND_SIGNAL, DSS-Explicit. Suspend Phase) Called resume() Get IP address (Reconnect to CH, DSSImplicit. Resume Phase) Established Explicit. Resume Phase) Reconnected from MH (DSS-Implicit. Resume Phase) Called close() (close connection) Explicitly Suspended reconnected from MH (DSS-Explicit. Resume Phase) Data. Socket broken-pipe Reconnected from MH (DSS-Implicit. Resume Phase) Called close() or timedout (close connection) received SUSPEND_SIGNAL (DSS-Explicit. Suspend Phase) Called close() (close connection) Transition trigger (action) Called close() or timedout (close connection) Normal Transitions for CH Normal Transitions for MH State Normal Transitions for Client Normal Transitions for Server

DSS(1) Establishment Phase

Client DSS-Establishment Phase Data Socket Control Redirection Socket Serv. Socket Data Socket connect ation. SEED 1 tic n e th u A , rt o p t e ck o Control. S Create Socket connect() Create Socket Authentication. SEED 1 Redirection. Server port, Next_SEED Data ALW ACK Control Redirection Socket Serv. Socket accept() ACK Create Socket Server accept() Create Socket

DSS(2) Explicit Suspend Phase

Mobile Host Data Socket Control Redirection Socket Serv. Socket SUSPEND_SIGNAL lock ACK WRITE_COUNTER Compute DIFF Suspend Sub. Phase DSS-Explicit. Suspend Phase Correspondent Host Invoke Suspend Sub. Phase (if DIFF>0) Compute DIFF Invoke Suspend Sub. Phase (if DIFF>0) ) ACK (DIFF_IS_ZERO Close

DSS(3) Explicit Resume Phase

Mobile Host DSS-Explicit. Resume Phase Data Socket Correspondent Host Redirection New Control Serv. Socket Redirection → Data. Socket Serv. Socket Control Redirection Socket Serv. Socket connect() accept() Next_SEED entication. SEED 3 th u A , rt o p t e ck o l. S o tr n ACK, Co Create Socket connect() Authentication. SEED 3 ACK Create Socket unlock accept() Create Socket Redirection. Server port, Next_SEED unlock Data ALW ACK

DSS(4) Implicit Redirection

Correspondent Host Mobile Host Data Socket Redirection New Control Redirection Serv. Socket → Data. Socket Serv. Socket Control Redirection Socket Serv. Socket lose IP ~disconnected~ DSS-Implicit. Resume Phase connect() get IP Next_SEED ation. SEED 3 tic n e th u A , rt o p t e ck o ACK, Control. S Create Socket connect() accept() Create Socket Authentication. SEED 3 accept() ACK Create Socket Redirection. Server port, Next_SEED Create Socket READ_COUNTER un. ACKed Data retransmit unlock

Disconnection Recognition in MH n n java. net. Inet. Address#get. Local. Host returns IP address based on DNS. “Checker” Thread as a adhoc solution n n Disconnection (1)get local IP from java. net. Socket#get. Local. Address (2)make Socket to local IP address periodically. Reconnection (1) make Socket to Correspondent Host IP address periodically.

5. Programming & Applications n Class Socket sock = new Socket(host, port); Mobile. Socket sock = new Mobile. Socket(host, port); n Explicit Redirection (Option) sock. suspend(); sock. resume(); n Adaptation Event (Option) Mobility. Event , Mobility. Listener Interface

Applications with Mobile. Socket n “Serializable” Mobile. Socket class for Mobile Applications and Agents App. A MSock. A (Socket. X) App. B Host-A Object Serialization App. A’ MSock. A (Socket. Y) Host-C Host-B

Applications with Mobile. Socket n Mobile. Socket Exchanging App. A MSock. B MSock. A Host-A App. B Host-B MSock. A’ Send “Mobile. Socket” Object via Object. Serialization App. C Host-C

6. Evaluation n Performance Measurement n n Explicit Redirection Comparison with Related Works

Measurement Environment n Implementation n Java. Core. API 1. 1 jp. ac. keio. sfc. ht. Mobile. Socket package Evaluation Environment n n n Dynabook SS-R 590 (Pentium 90 MHz, 40 MB) for MH Sony PCG-737 (Pentium. MMX 233 MHz, 64 MB) for CH Closed 10 Base-T Network Free. BSD 2. 2. 1 R + JDK 1. 1. 6. V 98 -9 -23 for Free. BSD

Performance Results at MH

Explicit Redirection Performance n Explicit Suspending

Explicit Redirection Performance n Explicit Resuming 82. 14%

Comparison with Related Works Name Layer Connection Continuity Mobile-IP IP Limited TCP-R TCP Yes MSOCKS Socket Limited Mobile. Socket Yes upper Implementation MH CH Others K HA, FA K K U Proxy U U -

7. Conclusion n n n Application Layer Mobility and Connection Continuity User-Level library in Java Implicit & Explicit Redirection for Conventional Apps. & Mobile Apps. Future Work n n More Optimization Security Issues

Fin

Eval. 1 Mobile. Socket Overhead n n Conventional Java. net. Socket 100 Mobile. Socket (contains Mobility Support) 80? 90?

Eval. 2 Socket Creation Overhead n n n Why is Socket Creation so heavy in Java? Where is bottle neck? C & Java n n Java C 80. 4 ms (71 ms object constructor)

Eval. 3 ALW n n In the case of large size ALW? Buffer overflow? Lock? Defined buffer size? ALW size and Transfer bandwidth n n could not evaluate because of bug in JDK Free. BSD Or Solaris?

read & write mechanism

Adaptation in Application n Java Event

DSS Time Sequence Connection Establishment Server Closed State Client connect Mobility Preparation user data Explicit Redirection DSSEstablishment Phase Established State Implicit Redirection

Explicit Redirection MH Suspend() CH ALW Adjustment Established State DSSExplicit Suspend Phase disconnect Explicity Suspended State resume() connect Mobility Preparation user data DSSExplicit Resume Phase Established State

Implicit Redirection MH CH Established State lose IP (Disconnect) Broken pipe connect Mobility Preparation Implicitly Suspended State DSSImplicit Resume Phase ALW Adjustment user data Established State

Mobile Computing Environment n “Work Continuity” for users ? A Internet A Mobile Host B

Mobile. Socket Applications (1) n Java network applications A Internet A Mobile Host B

Mobile. Socket Applications (2) n Java Mobile Applications App. A MSock. A (Socket. X) App. B Host-A Object Serialization App. A’ MSock. A (Socket. Y) Host-C Host-B

Mobile. Socket Applications (3) n Even Exchanging Socket. . . App. A MSock. B MSock. A Host-A App. B Host-B MSock. A’ Send “Mobile. Socket” Object via Object. Serialization App. C Host-C
- Slides: 53