Title: MobileSocket Toward Continuous Operation for Java Applications
1MobileSocketToward Continuous Operation for Java
Applications
- Tadashi OKOSHIGraduate School of Media and
GovernanceKeio University, JAPAN - slash_at_ht.sfc.keio.ac.jp
Eighth International Conference on Computer
Communication and NetworksIEEE ICCCN99 October
11-13, 1999 _at_Boston, USA
2Research 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
3With MobileSocket library
- Java network applications can continue their
communication with the one continuous socket
connection, even after the mobile hosts
relocation. - No need to modify source code
- Additional APIs for adaptation
4Todays Outline
- 1. Research Background
- 2. Communication Continuity
- MobileSocket 3. Design 4. Implementation 5.
Programming Applications 6. Evaluation - 7. Conclusion Future Work
51. 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
61. Background (Contd)
- Research Goal
- To realize users Continuous Operationsupported
by the continuous behavior of applications - For network applications
- Communication Continuity with remote
72. Communication Continuity
- Communication Continuity consists of
- Mobility
- Virtual Circuit Continuity
- Other Issues
8Mobility
- 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)
9Virtual Circuit Continuity
- 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
10Toward 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.
11Other Issues for CommunicationContinuity Support
- 2) Simplified and minimized implementation
- 3) Avoidance of modification in existing
applications - 4) Adaptation interfaces for
MobileSocket-aware applications
123. 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
13(1) Application Layer Approach
Application
Application
MSOCK
Socket Layer
TCP Layer
TCP-R
IP Layer
Mobile IP
14Dynamic 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
15Dynamic 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
16Application 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 Sender
MobileSocketin Receiver
Data
Data
Data
DataSocket
ACK
ControlSocket
17(2) User-Level Library
(MSOCKS)
(TCP-R)
(Mobile-IP)
18(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
19(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 applications source code
204. MobileSocket Implementation
- State Transition Diagram
- Time Sequence
- Connection Establishment
- Implicit Redirection
- Explicit Redirection
21START POINT
Closed
Connected to Server (DSS-EstablishmentPhase(Clien
t) )
Connected from Client (DSS-EstablishmentPhase(Ser
ver) )
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)
Established
ImplicitlySuspended
ExplicitlySuspended
reconnected from MH(DSS-ExplicitResume
Phase)
Reconnected from MH(DSS-ImplicitResume 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
22DSS(1) Establishment Phase
23Client
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
24DSS(2) Explicit Suspend Phase
25Mobile 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 DIFFgt0)
Invoke Suspend SubPhase(if DIFFgt0)
Suspend SubPhase
ACK (DIFF_IS_ZERO)
Close
Close
Close
26DSS(3) Explicit Resume Phase
27Mobile Host
Correspondent Host
RedirectionServSocket ? DataSocket
New RedirectionServSocket
ControlSocket
DataSocket
ControlSocket
RedirectionServSocket
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
28DSS(4) Implicit Redirection
29Correspondent Host
Mobile Host
RedirectionServSocket ? DataSocket
RedirectionServSocket ? DataSocket
New RedirectionServSocket
New RedirectionServSocket
ControlSocket
DataSocket
ControlSocket
RedirectionServSocket
ControlSocket
DataSocket
ControlSocket
RedirectionServSocket
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
30Disconnection Recognition in MH
- java.net.InetAddressgetLocalHost returns IP
address based on DNS. - Checker Thread as a adhoc solution
- Disconnection (1)get local IP from
java.net.SocketgetLocalAddress (2)make Socket
to local IP address periodically. - Reconnection (1) make Socket to Correspondent
Host IP address periodically.
315. Programming Applications
- Class Socket 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
32Applications with MobileSocket
- Serializable MobileSocket classfor Mobile
Applications and Agents
AppA
MSockA (SocketX)
AppB
Host-A
Host-B
AppA
MSockA (SocketY)
ObjectSerialization
Host-C
33Applications with MobileSocket
AppA
AppB
MSockA
MSockB
Host-A
Host-B
MSockA
Send MobileSocket Objectvia ObjectSerialization
AppC
Host-C
346. Evaluation
- Performance Measurement
- Explicit Redirection
- Comparison with Related Works
35Measurement 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
36Performance Results at MH
37Explicit Redirection Performance
38Explicit Redirection Performance
82.14
39Comparison 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
407. 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
41Fin
42Eval.1 MobileSocket Overhead
- Conventional Java.net.Socket 100
- MobileSocket (contains Mobility
Support) 80? 90?
43Eval.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
44Eval.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?
45read write mechanism
46Adaptation in Application
47DSS Time Sequence
Connection Establishment
Server
Client
ClosedState
connect
DSS-EstablishmentPhase
MobilityPreparation
user data
EstablishedState
Explicit Redirection
Implicit Redirection
48Explicit Redirection
EstablishedState
MH
CH
Suspend()
ALWAdjustment
DSS-Explicit SuspendPhase
disconnect
ExplicitySuspended State
resume()
connect
MobilityPreparation
DSS-Explicit ResumePhase
user data
EstablishedState
49Implicit Redirection
MH
CH
EstablishedState
lose IP(Disconnect)
Brokenpipe
ImplicitlySuspended State
connect
DSS-Implicit ResumePhase
MobilityPreparation
ALW Adjustment
user data
EstablishedState
50Mobile Computing Environment
- Work Continuity for users
?
A
Internet
B
A
Mobile Host
51MobileSocket Applications (1)
- Java network applications
A
Internet
B
A
Mobile Host
52MobileSocket Applications (2)
AppA
MSockA (SocketX)
AppB
Host-A
Host-B
AppA
MSockA (SocketY)
ObjectSerialization
Host-C
53MobileSocket Applications (3)
- Even Exchanging Socket...
AppA
AppB
MSockA
MSockB
Host-A
Host-B
MSockA
Send MobileSocket Objectvia ObjectSerialization
AppC
Host-C