PYLIVE: On-the-Fly Code Change for Python-based Online Services
summary
A framework that enables on-the-fly code change for Python online services, using Python’s meta-object protocol and dynamic typing to add dynamic logging and profiling and apply urgent patches without restarting or modifying the interpreter. PYLIVE targets function bodies, interfaces and object fields, checks safe points before swapping code, and handles threads/processes. Evaluated on seven real-world apps with 20 real cases, it avoids restart downtime, reports normal-run overhead of 0.1% and profiling overhead reduced to ~1.4% (vs 35%), and discovers two new performance issues.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:46Online services have high requirements on availability
- 2:30A common system update practice - Rollout Deployment
- 2:44Rollout is not the best choice for dynamic logging and profiling
- 3:47Python's language features ease the code change
- 4:41PYLIVE's Interfaces
- 7:04Three challenges with PYLIVE
- 7:28Challenge 1: Support Dynamic Changes
- 9:06Challenge 2: Identify Safe Change Point
- 10:52Evaluation of PYLIVE
- 13:07Summary
related talks
30mHow to change Python (while it's running)
29mLive coding
28mInstant-feedback, instant-debugging Python coding
22mPyPy hands-on
47mPython on the Client Side Web
25mLive Programming and Programming by Example: Better Together
11mPync: Function-Level Incremental Execution for Python Scripts
35mA Live Programming Experience
