530 likes | 539 Views
MobileSocket is an application layer approach that allows Java network applications to continue their communication with a single continuous socket connection, even after the mobile host's relocation, without modifying the source code.
E N D
MobileSocketToward Continuous Operation for Java Applications Tadashi OKOSHIGraduate School of Media and GovernanceKeio University, JAPAN slash@ht.sfc.keio.ac.jp Eighth International Conference on Computer Communication and NetworksIEEE ICCCN’99 October 11-13, 1999 @Boston, USA
Research Abstract • Goal: Communication Continuity for network applications for users’ Work Continuity • MobileSocket… • Is an application layer approachimplemented as an user-level library. • Is effective for • Conventional Network Application • Java Mobile Applications
With MobileSocket library… • 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 • 1. Research Background • 2. Communication Continuity • MobileSocket 3. Design 4. Implementation 5. Programming & Applications 6. Evaluation • 7. Conclusion & Future Work
1. Background • Mobile Computing Environment • Mobile hosts and users move around network even during applications are communicating with the remote. A Internet B A Mobile Host
1. Background (Cont’d) • Research Goal • To realize users’“Continuous Operation”supported by the continuous behavior of applications • For network applications… • “Communication Continuity” with remote
2. Communication Continuity • Communication Continuity consists of… • “Mobility” • “Virtual Circuit Continuity” • Other Issues
“Mobility” • 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” • Capability of keeping a virtual circuitconnection 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… • Datagram communication (e.g.UDP/IP) • Mobility support • Virtual circuit communication (e.g.TCP/IP) • Mobility support • Virtual circuit continuity support ⇒ Both “Mobility” and “VC Continuity” supports are the requirements for communication continuity.
Other Issues for CommunicationContinuity Support • 2) Simplified and minimized implementation • 3) Avoidance of modification in existing applications • 4) Adaptation interfaces for MobileSocket-aware applications
3. MobileSocket Design • (1) mobility and connection continuity support in application layer • 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
MobileSocket MobileSocket Layer (1) Application Layer Approach Application Application MSOCK Socket Layer TCP Layer TCP-R IP Layer Mobile IP
Dynamic Socket Switching Internal SocketConnection (1) Application (MobileHost) Application (CorrespondentHost) MobileSocket Layer MH1 CH Socket Layer MH1 CH TCP Layer MH1 CH IP Layer IPMH1 IPCH Before
Internal SocketConnection (2) Dynamic Socket Switching Application (MobileHost) Application (CorrespondentHost) MobileSocket Layer MH1 CH Socket Layer MH1 CH MH2 TCP Layer MH1 CH MH2 IP Layer IPMH1 IPMH2 IPCH Relocation After
Application Layer Window (ALW) • User-level sliding window inside library • Provides Byte Stream Consistency Application Application write() read() Data Data read store write ACK ALW_COUNTER ACK send flush count recv ALW MobileSocketin Receiver MobileSocketin Sender Data Data Data DataSocket ACK ControlSocket
Application Application Application Application MobileSocket lib MobileSocket lib Socket interface Socket interface TCP/UDP TCP/UDP IP IP (2) User-Level Library (MSOCKS) (TCP-R) (Mobile-IP)
(3) Connection Redirection Schemes • Implicit Redirection • 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 • Implicit Redirection • Explicit Redirection • 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 • Need to modify application’s source code
4. MobileSocket Implementation • State Transition Diagram • Time Sequence • Connection Establishment • Implicit Redirection • Explicit Redirection
START POINT Closed Connected to Server (DSS-EstablishmentPhase(Client) ) Connected from Client (DSS-EstablishmentPhase(Server) ) Called suspend() (send SUSPEND_SIGNAL, DSS-ExplicitSuspend Phase) Lost IP address Called resume() (Reconnect to CH, DSS- ExplicitResume Phase) Get IP address (Reconnect to CH, DSS-ImplicitResume Phase) Called close()(close connection) ImplicitlySuspended Established ExplicitlySuspended Reconnected from MH(DSS-ImplicitResume Phase) reconnected from MH(DSS-ExplicitResume Phase) Called close() or timedout(close connection) DataSocket broken-pipe received SUSPEND_SIGNAL (DSS-ExplicitSuspend Phase) Reconnected from MH(DSS-ImplicitResume Phase) Called close()(close connection) Called close() or timedout(close connection) Called close()(close connection) Normal Transitions for CH Normal Transitions for MH Transition trigger(action) State Normal Transitions for Client Normal Transitions for Server
Client Server DataSocket ControlSocket RedirectionServSocket DataSocket ControlSocket RedirectionServSocket accept() connect ControlSocket port, AuthenticationSEED1 CreateSocket CreateSocket connect() accept() AuthenticationSEED1 DSS-Establishment Phase ACK CreateSocket CreateSocket RedirectionServer port, Next_SEED Data ALW ACK
Mobile Host Correspondent Host DataSocket ControlSocket RedirectionServSocket DataSocket ControlSocket RedirectionServSocket SUSPEND_SIGNAL lock lock ACK WRITE_COUNTER Compute DIFF Compute DIFF DSS-ExplicitSuspend Phase Invoke Suspend SubPhase(if DIFF>0) Invoke Suspend SubPhase(if DIFF>0) Suspend SubPhase ACK (DIFF_IS_ZERO) Close Close Close
Mobile Host Correspondent Host RedirectionServSocket → DataSocket New RedirectionServSocket DataSocket ControlSocket RedirectionServSocket ControlSocket connect() accept() Next_SEED ACK, ControlSocket port, AuthenticationSEED3 connect() CreateSocket accept() AuthenticationSEED3 DSS-ExplicitResume Phase ACK CreateSocket CreateSocket RedirectionServer port, Next_SEED unlock unlock Data ALW ACK
Correspondent Host Mobile Host RedirectionServSocket → DataSocket RedirectionServSocket → DataSocket New RedirectionServSocket New RedirectionServSocket DataSocket DataSocket ControlSocket ControlSocket RedirectionServSocket RedirectionServSocket ControlSocket ControlSocket lose IP lose IP ~disconnected~ ~disconnected~ get IP get IP accept() accept() connect() connect() Next_SEED Next_SEED CreateSocket CreateSocket ACK, ControlSocket port, AuthenticationSEED3 ACK, ControlSocket port, AuthenticationSEED3 connect() connect() CreateSocket CreateSocket accept() accept() AuthenticationSEED3 AuthenticationSEED3 ACK ACK DSS-ImplicitResume Phase DSS-ImplicitResume Phase CreateSocket CreateSocket CreateSocket CreateSocket RedirectionServer port, Next_SEED RedirectionServer port, Next_SEED READ_COUNTER READ_COUNTER unACKed Data retransmit unACKed Data retransmit unlock unlock unlock
Disconnection Recognition in MH • java.net.InetAddress#getLocalHost returns IP address based on DNS. • “Checker” Thread as a adhoc solution • Disconnection (1)get local IP from java.net.Socket#getLocalAddress (2)make Socket to local IP address periodically. • Reconnection (1) make Socket to Correspondent Host IP address periodically.
5. Programming & Applications • ClassSocket sock = new Socket(host, port);MobileSocket sock = new MobileSocket(host, port); • Explicit Redirection (Option)sock.suspend(); sock.resume(); • Adaptation Event (Option)MobilityEvent Event , MobilityListener Interface
Applications with MobileSocket • “Serializable” MobileSocket classfor Mobile Applications and Agents AppA MSockA (SocketX) AppB Host-A Host-B AppA’ MSockA (SocketY) ObjectSerialization Host-C
Applications with MobileSocket • MobileSocket Exchanging AppA AppB MSockB MSockA Host-A Host-B MSockA’ Send “MobileSocket” Objectvia ObjectSerialization AppC Host-C
6. Evaluation • Performance Measurement • Explicit Redirection • Comparison with Related Works
Measurement Environment • Implementation • JavaCoreAPI 1.1 • jp.ac.keio.sfc.ht.MobileSocket package • Evaluation Environment • Dynabook SS-R590 (Pentium 90MHz, 40MB) for MH Sony PCG-737 (PentiumMMX 233MHz, 64MB) for CH • Closed 10Base-T Network • FreeBSD2.2.1R + JDK 1.1.6.V98-9-23 for FreeBSD
Explicit Redirection Performance • Explicit Suspending
Explicit Redirection Performance • Explicit Resuming 82.14%
Comparison with Related Works Name Layer Connection Implementation Continuity MH CH Others Mobile-IP IP Limited K HA,FA TCP-R TCP Yes K K - MSOCKS Socket Limited U Proxy MobileSocket Socket Yes U U - upper
7. Conclusion • Conclusion • Application Layer Mobility and Connection Continuity • User-Level library in Java • Implicit & Explicit Redirection • for Conventional Apps. & Mobile Apps. • Future Work • More Optimization • Security Issues
Eval.1 MobileSocket Overhead • Conventional Java.net.Socket 100 • MobileSocket (contains Mobility Support) 80? 90?
Eval.2 Socket Creation Overhead • Why is Socket Creation so heavy in Java? • Where is bottle neck? • C & Java • Java 80.4ms (71ms object constructor) • C
Eval.3 ALW • In the case of large size ALW? • Buffer overflow? Lock? • Defined buffer size? • ALW size and Transfer bandwidth • could not evaluate because of bug in JDK FreeBSD • Or Solaris?
Adaptation in Application • Java Event
DSS Time Sequence Connection Establishment Server Client ClosedState connect DSS-EstablishmentPhase MobilityPreparation user data EstablishedState Implicit Redirection Explicit Redirection
Explicit Redirection EstablishedState MH CH Suspend() ALWAdjustment DSS-Explicit SuspendPhase disconnect ExplicitySuspended State resume() connect MobilityPreparation DSS-Explicit ResumePhase user data EstablishedState
Implicit Redirection MH CH EstablishedState lose IP(Disconnect) Brokenpipe ImplicitlySuspended State connect DSS-Implicit ResumePhase MobilityPreparation ALW Adjustment user data EstablishedState
Mobile Computing Environment • “Work Continuity” for users ? A Internet B A Mobile Host