June 18-22, 2001 ECOOP 2001, Budapest, Hun gary 1 A Bytecode Translator for Distributed Execution of “Legacy” Java Software Michiaki Tatsubori*, Toshiyuki Sasaki*, Shigeru Chiba**, and Kozo Itano* * University of Tsukuba, Japan ** Tokyo Institute of Technology, Japan
25
Embed
A Bytecode Translator for Distributed Execution of “ Legacy ” Java Software
A Bytecode Translator for Distributed Execution of “ Legacy ” Java Software. Michiaki Tatsubori * , Toshiyuki Sasaki * , Shigeru Chiba ** , and Kozo Itano * * University of Tsukuba, Japan ** Tokyo Institute of Technology, Japan. Development of Distributed Java Software. An example scenario - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 1
A Bytecode Translator for Distributed Execution of “Legacy” Java Software
Michiaki Tatsubori*, Toshiyuki Sasaki*, Shigeru Chiba**, and Kozo
Itano*
* University of Tsukuba, Japan** Tokyo Institute of Technology, Japan
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 2
Developmentof Distributed Java Software
An example scenario “We have already got nice software.” “But we want to display GUI of the
software on a remote host.” Run GUI components on a remote host,
and run others on a local host
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 3
Two Approaches
Use X Window No need to edit a program
Rewrite a program by hand Using Java RMI or CORBA
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 4
X Window
Distribution by the Xlib Library Bad response time if GUI is complex
High communication overhead
“Draw a line”
“A mouse moved”
“A mouse-button pushed”
“A mouse-button released”
UserProgram
Xlib
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 5
Rewrite a Program by Hand
Good response time The programmer can tune the code. Low communication overheads.
UserProgram
Show an internal-window
A click in a window
ORBLibrary
UserProgram
Higher-level commands
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 6
Automation vs. Efficiency
X Window Fully automated, but Slow
By hand Many man-hours, though Fast
UserProgram
Xlib
UserProgram
GUI Module
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 7
Automation vs. Efficiency
X Window Decomposition at
the library layer
For better performance,complex decomposition isnecessary.
UserProgram
Xlib
UserProgram
GUI Module
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 8
Addistant – Our Solution
A Java program translator Translating a non-distributed program
to a distributed one Decomposing at anywhere
The user can specify the decomposition with a policy file.
UserProgram
GUI Module
Policy file
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 9
Addistant is a Practical Tool!
Bytecode translation by a class-loader Using Javassist[Chiba00]. No source code, no custom JVM.
Addistant can process real applications. It can migrate Swing components to a
remote host.Standard
library for rich GUI
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 10
Decomposition is Not Easy…
A simple proxy-master implementation NEVER works. Proxy-master – a typical
implementation technique for remote references
MasterProxyMethodInvocation
Network Communications
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 11
JavaRMI’s Way Doesn’t Work
To be remotely accessible, We must translate …
class WidgetImpl { …}
implements Widget {
interface Widget { …}
class WidgetProxy implements Widget { …}
If WidgetImpl is a system class,we cannot modify the class declaration!The JVM prohibits it.
If WidgetImpl is a system class,we cannot modify the class declaration!The JVM prohibits it.
June 18-22, 2001 ECOOP 2001, Budapest, Hungary 12
In a Policy File of Addistant
Users choose one of four implementation techniques for each class. Those techniques modify code in
different ways. But they have different limitations in use.
Some techniques do not modify an original class, so they can be used for system classes.