26. Dynamic Code Injection

The Python scripting language in Charm++ allows the user to dynamically execute pieces of code inside a running application, without the need to recompile. This is performed through the CCS (Converse Client Server) framework (see Converse Manual http://charm.cs.illinois.edu/manuals/html/converse/5.html for more information about this). The user specifies which elements of the system will be accessible through the interface, as we will see later, and then run a client which connects to the server. In order to exploit this functionality, Python interpreter needs to be installed into the system, and Charm++ LIBS need to be built with:
./build LIBS $<$arch$>$ $<$options$>$ The interface provides three different types of requests:
Execute
requests to execute a code, it will contain the code to be executed on the server, together with the instructions on how to handle the environment;
Print
asks the server to send back all the strings which have been printed by the script until now;
Finished
asks the server if the current script has finished or it is still running.
There are three modes to run code on the server, ordered here by increase of functionality, and decrease of dynamic flexibility: This documentation will describe the client API first, and then the server API.

Subsections