3. EL HÉROE AVETURERO
3.2.4. El papel de la mujer
The binary of the application produced by the PCP server is the Apus image that contains relocation information to allow the binary to be used in different execution instances. Thus, the client agent stores the binary from the PCP server in a local binary cache in the image repository and it can be used afterwards.
Since the current prototype implementation only supports a single architecture, there is therefore no need to have separate image repositories for the PCP server. Since the compilation has been cached into the Apus image in the image repository in the PCP server, the turnaround time for individual requests for proxy compilation can be reduced.
5.5.6
Priority
In the PCP prototype implementation, each request for proxy compilation comes with a priority value. A queue is implemented in both the client and server to handle incoming requests with priority. Each node in the queue represents a request. The first element of the queue should always have the minimum priority value and should be processed first.
5.5.7
Error Handling
A very simple error handling mechanism is applied in the prototype implementation. As it is addressed in the PCP specification, if there is a negative response received in the INIT state, the connection is terminated. If there is a negative response in
5.6. Example PCP Session 82
the other state, the PCP should send out a BINARY and a (-ERR) respectively to terminate the corresponding task.
Once the client VM enters the exit phase, the client agent issues a QUIT com- mand to the PCP server and threads relative to the PCP client agent are marked as daemons.
5.6
Example PCP Session
To illustrate a complete proxy compilation session on the implemented prototype, an example of dialogues between client and server is given in Figure 5.4. As the example demonstrates, the client compiles methods void foo1() and void foo2() of class example.Foo by exercising the proxy compilation service.
Messages sent from the client host are prefixed with C:, conversely, S: represents messages sent by the PCP server.
5.7
Security Considerations
The PCP does not provide any form of security support to guard against malicious actions of both client and server. From the discussion in [21], the main security threads on code migration by PCP can be categorized into:
Tampering - the unauthorised alteration of information. This would po- tentially endanger the binary to be modified with malicious code against the client host.
Vandalism - the unauthorised access to the proper operations on the sys- tem.
An extension to use cryptographic protocols that provide security for communica- tions over sockets, such as Transport Layer Security (TLS) and Secure Sockets Layer (SSL), can allow the proxy compilation system to elimiate threads described above. Furthermore, regardless which specific security policy is used, it would be interesting to measure the impact of the additional procedures over the system on time and footprint on the cilent.
5.8. Summary 83
S: <wait for connection on TCP port 969> C: <open connection>
S: +OK hello, dave!
C: SET vm=2.4.6 clp=gnuclasspath-0.92 arch=x86-32
S: +OK
C: COMPILE Lexample/Foo;foo1()V 1 0
S: +OK 1
C: FILE 1 Lexample/Foo 1243633850000 449
S: +OK
C: CONTENT <example/Foo.class file content>
S: +OK
C: COMPILE Lexample/Foo;foo2()V 0 0
S: +OK 2
S: BINARY 1
C: +OK
S: CONTENT <binary for Foo::foo1()>
C: +OK
S: BINARY 2
C: +OK
S: CONTENT <binary for Foo::foo2()>
C: +OK
C: QUIT
S: +OK client quit
C: <close connection>
S: <wait for next connection>
Figure 5.4: An example of a Proxy Compilation Protocol session
5.8
Summary
This chapter presents the motivation, design requirement and specification of the Proxy Compilation Protocol to be used within the Apus proxy compilation system to provide code migration with fine granularity for the Java programming language. A number of issues regarding the improvement of efficiency and reliability of PCP are detailed. The evaluation together with analysis on the data collected from ex- periments on the PCP are shown in Section6.6.3.
C
h
a
p
t
e
r
6
Evaluation and Results
The strongest arguments prove nothing so long as the conclusions are not verified by experience. Experimental science is the queen of sciences and the goal of all speculation. Roger Bacon(1214–1294)
In Chapters4and 5, the design and implementation of the code migration frame- work and the PCP to provide a proxy compilation service were discussed. In order to verify the design, the performance of the implementation relative to the existing Java Runtime Environment must be demonstrated.
This chapter details how the prototype implementation of the Apus proxy compi- lation system was evaluated in typical user scenarios, using different suites of bench- marks, and provides analysis of the results obtained. Section 6.1 describes the test objective for the experiment. Sections 6.2 – 6.5 briefly introduce the characteristics of the selected benchmarks, measurement techniques and the testing environment for the following experiments. Testing results and analysis of the Apus proxy com- pilation system are shown in Section 6.6.