Information Technology Reference
In-Depth Information
service Desktop {
protocol : rest {
options {
servers = "http://localhost" ;
serverPort = 61616;
serverThreads = 5;
}
pointcut void Server.updateData(Object) {
recovery =abort;
}
pointcut void Server.stopViewer(InetAddress) {
recovery =abort;
}
pointcut void Server.startViewer(InetAddress) {
recovery =abort;
}
pointcut byte[] Server.getScreenCapture(InetAddress) {
recovery =abort;
}
pointcut Rectangle Server.getScreenRect(InetAddress) {
recovery =abort;
}
}
}
Figure 6.7.
Java Remote Desktop REST DDL protocol file.
To convert the Bank class using the DDL requires the DDL file illustrated on
the right-hand side of Figure 6.6, which generates both client and server code as
well as the round-robin recovery scenario defined by the nextServer statement.
The original Bank class is left unaltered and may be used to test a non-distributed
version of the application or reused in another application.
6.3.2
Remote Desktop Example
Java Remote Desktop [1] is an open source project that provides a means of viewing
and controlling a remote desktop via a GUI. A Swing client GUI communicates
to a server-side component using the RMI protocol. The application supports any
number of viewers and any changes performed in a client GUI screen is reflected
in the other screens.
To evaluate RemoteJ, we firstly refactored the application to remove the RMI
specific code. We then used RemoteJ to convert the now non-distributed applica-
tion into a REST distributed application using the DDL illustrated in Figure 6.7.
To further test RemoteJ, we converted the same application into a JMS
distributed application using the DDL in Figure 6.8.
Search WWH ::




Custom Search