MobileSocket: Library-based Continuous Operation Support for Java Applications Tadashi OKOSHI...
-
Upload
kristian-mcdowell -
Category
Documents
-
view
214 -
download
0
Transcript of MobileSocket: Library-based Continuous Operation Support for Java Applications Tadashi OKOSHI...
MobileSocket:Library-based Continuous Operation Supportfor Java Applications
Tadashi OKOSHIGraduate School of Media and GovernanceKeio University
SPA (Systems for Programming and Applications) 1999 @Atagawa, JAPANhttp://www.softlab.is.tsukuba.ac.jp/~kato/spa99/ 1999.3.17-19
Mobile Computing Environment
“Work Continuity” for users
Mobile HostMobile Host
Internet
AA
AA
BB
??
MobileSocket is...
TCP/UDP
IP
Socket interface
TCP/UDP
IP
Socket interface
Application Application
Application Application
MobileSocket libMobileSocket lib MobileSocket libMobileSocket lib
(Mobile-IP)
(TCP-R)(MSOCKS)
MobileSocket Applications (1)
Java Network Applications
Mobile HostMobile Host
Internet
AA
AA
BB
MobileSocket Applications (2)
Java Mobile Applications
AppBAppB
Host-B
Host-A
AppAAppA
AppA’ObjectSerialization
MSockA (SocketX)
MSockA (SocketY)
Host-C
MobileSocket Applications (3)
Even Exchanging Socket...
Host-A Host-B
Host-C
AppAAppA
AppCAppC
AppBAppBMSockA MSockB
MSockA’Send “MobileSocket” Objectvia ObjectSerialization
Today’s Outline
1. Research Background - Continuous Operation -
2. MobileSocket Design3. MobileSocket Mechanism4. MobileSocket Programming5. Evaluation6. Conclusion & Future Work
1. Background
Goal: Continuous Operation for users’ “Work Continuity”
Continuous Operation Framework for Applications Mobility… Transparent Host Identifier Connection Continuity… Stream Consistency
Issues for Continuos Operation
(1) Avoidance of modification in existing applications
(2) Simplified and minimized implementation(3) Byte Stream Consistency support
for virtual circuit connection(4) Adaptation in applications
2. MobileSocket Design
Design Features (1) Mobility and connection continuity support
in application layer (2) User-level library implementation in Java (3) Both implicit & explicit redirection operations (4) Adaptation in applications (JavaEvent model)
Dynamic Socket Switching (DSS)
IPCH
CH
CH
CH
IPMH1
MH1
MH1
MH1
Application(MobileHost)Application
(CorrespondentHost)
Internal SocketConnection (1)
Before
IP Laye
rTCP Layer
Socket
Layer
Mobile
Socket
Layer
Dynamic Socket Switching (DSS)
IP Laye
rTCP Layer
Socket
Layer
Mobile
Socket
Layer
IPCH
CH
CH
CH
IPMH1
MH1
MH1
MH1
IPMH2
MH2
MH2
Application(MobileHost)
After
Application(Correspondent
Host)
Relocation
Internal SocketConnection (2)
Application Layer Window (ALW)
MobileSocketin Sender
MobileSocketin Receiver
DataSocket
ControlSocket
DataData DataData
ACKACK
DataData
Application Application
ALW
DataData
ACKACK ACKACK
DataData
ALW_COUNTERALW_COUNTER
write() read()
recvflush
writestore
count
read
send
User-level sliding window inside libraryprovides Byte Stream Consistency
3. MobileSocket Mechanism
State Transition DiagramTime Sequence
Establishment Implicit Redirection Explicit Redirection
EstablishedEstablishedImplicitlySuspendedImplicitly
SuspendedExplicitly
SuspendedExplicitly
Suspended
ClosedClosedConnected to Server (DSS-EstablishmentPhase(Client) )
Connected from Client (DSS-EstablishmentPhase(Server) )
Lost IP address
Get IP address (Reconnect to CH, DSS-
ImplicitResume Phase)
Reconnected from MH(DSS-ImplicitResume Phase)
Called suspend()suspend() (send SUSPEND_SIGNAL, DSS-ExplicitSuspend Phase)
Called resume()resume() (Reconnect to CH, DSS- ExplicitResume Phase)
reconnected from MH(DSS-ExplicitResume Phase)
received SUSPEND_SIGNAL (DSS-ExplicitSuspend Phase)
DataSocket broken-pipe
Reconnected from MH(DSS-ImplicitResume Phase)
Called close()close()(close connection)
Called close()close()or timedout
(close connection)
Called close()close()(close connection)
Called close()close()(close connection)
Called close()close()or timedout
(close connection)
Normal Transitions for CHNormal Transitions for MH
Normal Transitions for ClientNormal Transitions for Server
Transition trigger(action)
START POINTSTART POINT
StateState
DSS(1) Establishment Phase
ClientClient ServerServerDataDataSocketSocket
ControlControlSocketSocket
connectconnect accept()accept()
ControlSocket port, AuthenticationSEED1
accept()accept()connect()
ACK
AuthenticationSEED1
DS
S-E
sta
blis
hm
ent
Ph
as
e
RedirectionRedirectionServSocketServSocket
RedirectionServer port, Next_SEED
Data
ALW ACK
DataDataSocketSocket
ControlControlSocketSocket
RedirectionRedirectionServSocketServSocket
CreateCreateSocketSocket
CreateCreateSocketSocket
CreateCreateSocketSocket
CreateCreateSocketSocket
DSS(2) Explicit Suspend Phase
Mobile HostMobile Host Correspondent HostCorrespondent HostDataDataSocketSocket
ControlControlSocketSocket
lock
ACK
SUSPEND_SIGNAL
DSS
-Exp
licitS
uspe
nd P
hase
RedirectionRedirectionServSocketServSocket
WRITE_COUNTER
DataDataSocketSocket
ControlControlSocketSocket
RedirectionRedirectionServSocketServSocket
lock
Compute DIFF Compute DIFF
Invoke Suspend SubPhase(if DIFF>0)
Invoke Suspend SubPhase(if DIFF>0)
ACK (DIFF_IS_ZERO)
CloseClose
Close
Susp
end
SubP
hase
DSS(3) Explicit Resume Phase
ControlControlSocketSocket
connect() accept()
ACK, ControlSocket port, AuthenticationSEED3
accept()connect()
ACK
AuthenticationSEED3
DSS
-Exp
licitR
esum
e Ph
ase
RedirectionRedirectionServSocketServSocket → DataSocket → DataSocket
RedirectionServer port, Next_SEED
Data
ALW ACK
DataDataSocketSocket
ControlControlSocketSocket
RedirectionRedirectionServSocketServSocket
Mobile HostMobile Host Correspondent HostCorrespondent HostNewNewRedirectionRedirectionServSocketServSocket
Next_SEED
unlock unlock
CreateSocketCreate
Socket
CreateSocket
DSS(4) Implicit Redirection
ControlSocket
connect() accept()
ACK, ControlSocket port, AuthenticationSEED3
accept()connect()
ACK
AuthenticationSEED3
DSS
-Impl
icitR
esum
e Ph
ase
RedirectionServSocket → DataSocket
RedirectionServer port, Next_SEED
DataSocket
ControlSocket
RedirectionServSocket
NewRedirectionServSocket
Next_SEED
unlock
READ_COUNTER
unACKed Data retransmit
~ disconnected ~lose IP
get IP
CreateSocket
CreateSocket
CreateSocket
CreateSocket
ControlSocket
connect() accept()
ACK, ControlSocket port, AuthenticationSEED3
accept()connect()
ACK
AuthenticationSEED3
DSS
-Impl
icitR
esum
e Ph
ase
RedirectionServSocket → DataSocket
RedirectionServer port, Next_SEED
DataSocket
ControlSocket
RedirectionServSocket
Mobile HostMobile Host Correspondent HostCorrespondent HostNewRedirectionServSocket
Next_SEED
unlockunlock
READ_COUNTER
unACKed Data retransmit
~ disconnected ~lose IPlose IP
get IPget IP
CreateSocket
CreateSocket
CreateSocket
CreateSocket
Disconnection Recognition in MH
java.net.InetAddressjava.net.InetAddress##getLocalHostgetLocalHost ...IP address based on DNS.
“Checker” Thread as a adhoc solution Disconnection (1)get local IP from
java.net.Socket#getLocalAddressjava.net.Socket#getLocalAddress(2)make Socket to local IP address periodically
Reconnection (1) make Socket to Correspondent Host IP address periodically.
4. MobileSocket Programming
Class Socket sock = new Socket(host, port);Socket sock = new Socket(host, port); MobileMobileSocket sock = new Socket sock = new MobileMobileSocket(host, port);Socket(host, port);
Explicit Redirection (Option) sock.sock.suspend();suspend(); sock. sock.resume();resume();
Adaptation Event (Option) MobilityEvent MobilityEvent Event , , MobilityListener MobilityListener Interface
5. Evaluation
Performance Measurement Explicit Redirection MobileSocket Overhead
Comparison with Related Works
Measurement Environment
Implementation JavaCoreAPI 1.1 jp.ac.keio.sfc.ht.MobileSocketjp.ac.keio.sfc.ht.MobileSocket package
Evaluation Environment Dynabook SS-R590 (Pentium 90MHz, 40MB) for MH S
ony PCG-737 (PentiumMMX 233MHz, 64MB) for CH Closed 10Base-T Network FreeBSD2.2.1R + JDK 1.1.6.V98-9-23 for FreeBSD
Performance Results at MH
Redirection Time (ms)Explicit Suspending 46.67Explicit Resuming 270.28Implicit Resuming 317.78
Explicit Redirection Performance
Explicit Suspending
Steps Time (ms) %manage phase transition 1.76 3.77lock Socket 7.40 15.86kill sub-thread 8.12 17.40send SUSPEND_SIGNAL 1.17 2.50send WRITE_COUNTER 5.35 11.46receive ACK from CH 11.01 23.59receive port number 1.11 2.38receive auth seed 1.85 3.96close Socket 3.28 7.03prepare info of next Socket 1.02 2.19misc 4.60 9.86Total 46.67 100.00
Steps Time (ms) %make new Socket 80.75 29.88switch Socket in stream 0.36 0.13auth check for DataSocket 2.95 1.09receive port of ControlSocket 1.11 0.41receive auth seed 1.89 0.70make new ControlSocket 80.80 29.90auth check for ControlSocket 3.30 1.22make new NextServerSocket 60.44 22.36exchange next port and seed 6.62 2.45restart sub thread 26.56 9.83manage phase transition 0.90 0.33misc 4.60 1.70Total 270.28 100.00
Explicit Redirection Performance Explicit Resuming
Steps Time (ms) %make new Socket 80.75 29.88switch Socket in stream 0.36 0.13auth check for DataSocket 2.95 1.09receive port of ControlSocket 1.11 0.41receive auth seed 1.89 0.70make new ControlSocket 80.80 29.90auth check for ControlSocket 3.30 1.22make new NextServerSocket 60.44 22.36exchange next port and seed 6.62 2.45restart sub thread 26.56 9.83manage phase transition 0.90 0.33misc 4.60 1.70Total 270.28 100.00
82.14%
Inside Socket Creation
Comparison with Related Works
Name Layer Connection Implementation Continuity MH CH Others
Mobile-IP IP Limited K HA,FAPMI (+M-IP) IP Limited K K HA,FAMSOCKS TCP Limited U Proxy TCP-R TCP Yes K K -VNC Screen Yes U ServerMobileSocket Socket Yes U U -
6. Conclusion
Conclusion Application Layer Mobility and Connection Continuity User-Level library in Java Implicit & Explicit Redirection for Conventional Apps. & Mobile Apps.
Future Work UDP & Multicast Socket More Optimization
Fin.Thank you for your attention...
Eval.1 MobileSocket Overhead
Conventional Java.net.Socket 100MobileSocket (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 ?
read & write mechanism
Adaptation in Application
Java Event
DSS Time Sequence
Client Server
connect
MobilityPreparation
DSS-EstablishmentPhase
user data EstablishedStateEstablishedState
ClosedStateClosedState
Explicit Redirection Implicit Redirection
Connection Establishment
MH
ALWAdjustment
DSS-Explicit SuspendPhase
disconnectExplicitySuspended StateExplicitySuspended State
CHSuspend()
resume()
connect
MobilityPreparation
user data EstablishedStateEstablishedState
DSS-Explicit ResumePhase
EstablishedStateEstablishedState
Explicit Redirection
MH
ImplicitlySuspended StateImplicitlySuspended State
CH
connect
ALWAdjustment
user data EstablishedStateEstablishedState
DSS-Implicit ResumePhase
EstablishedStateEstablishedState
lose IP(Disconnect)
Brokenpipe
Implicit Redirection
MobilityPreparation