After the websocket connection is built, the name of the
application to be launched on server side will be sent to SM
through CM. SM, then, starts a VEE to execute the selected
application. SM also takes the charge of terminating a VEE
in response to the request issued by CM. A VEE is composed
of an X application and an X server. The selected application
is thus the X application in VEE. For AASMP, it is Android
emulator. SM has three main components, namely X server
manager, application manager and input handler, as shown in
Fig. 3. The X server manager takes the charge of starting and
645terminating an X server for each selected application, while
the application manager is responsible for launching the
selected application to run on its paired allocated X server. In
other words, a VEE is created for each request of launching
an application from client. The relationship of each pair of
allocated X server and the selected application is maintained
by SM. The SM therefore is capable of serving more than
one request from different clients concurrently.
The input handler of SM takes the charge of handling
keyboard and mouse input events triggered on client side.
These events are captured and sent back to SM. According to
the information of X servers kept in SM, these events will be
fed to the corresponding X server as shown in Fig. 3.
In order to run any X application in VEE with neither
modification nor porting, the X window commands related to
drawing and displaying must be intercepted and manipulated
by the X server. Table III lists these related commands. The
X server in Fig. 3 is modified to redirect theses command to
client via CM. On client side, the new feature of HTML5,
namely canvas, is used to implement a drawing function
library and the received X commands are parsed to draw or
display the result on web page by utilizing canvas API. The
transmission of X window commands between client and
CM is achieved through websocket described earlier.
The XHTML5 described can be applied to execute all X
applications. The development of AASMP, however, needs a
way to execute Android applications on server. This is done
by porting the Android emulator provided by Google, which
is an X application and open source software. Therefore,
Android applications can be executed in server-side Android
emulator and the output produced by the applications can be
redirected and displayed on client-side mobile platform. In
addition, the touch events triggered on client side are sent to
server and translated into mouse events.
TABLE III. INTERCPTED X WINDOW C