PyReload: Dynamic Updating of Python Programs by Reloading.

Wei Tang,Min Zhang
DOI: https://doi.org/10.1109/apsec.2018.00037
2018-01-01
Abstract:Dynamic Software Updating (DSU) is a promising technique for updating running software systems without incurring downtime. It is particularly useful to those systems which need to provide 24x7 services. Many efforts have been made to dynamic updating of the programs developed in mainstreaming languages such as C and Java. With the popularity of Python, many software servers are developed using Python and therefore they are desired to be dynamically updatable. However, there are few studies on dynamic updating of Python. To our knowledge, there exists only one updating approach for Python programs. The approach requires a dedicated Python interpreter in order to manipulate threads for updating, and consequently, it cannot be directly applied to mainstreaming Python interpreters. In this paper, we propose a novel dynamic updating approach to Python based on the built-in reloading mechanism that is supported by most of Python interpreters. Our approach is generic in that it is applicable to ordinary Python interpreters without any change to them. We implement a prototype called PYRELOAD based on the proposed approach. PYRELOAD is compatible with several mainstreaming Python interpreters such as CPython, Pypy and Jython. A case study is conducted to show the usage of PYRELOAD. For performance, experimental results show that PYRELOAD needs a shorter time for updating than the existing approach does.
What problem does this paper attempt to address?