Skip to main content
QUICK REVIEW

[Paper Review] Transformation of Python Applications into Function-as-a-Service Deployments

Josef Spillner|arXiv (Cornell University)|May 23, 2017
Software Engineering ResearchComputer Science4 references18 citations
TL;DR

This paper presents Lambada, a tool that automatically transforms monolithic Python applications into serverless Function-as-a-Service (FaaS) deployments on AWS Lambda without source code modification. Using dynamic code analysis and AST-based rewriting, Lambada decomposes functions and methods into independent Lambda functions, achieving feasible performance for latency-insensitive workloads despite constant overheads of ~4.3 seconds per deployment.

ABSTRACT

New cloud programming and deployment models pose challenges to software application engineers who are looking, often in vain, for tools to automate any necessary code adaptation and transformation. Function-as-a-Service interfaces are particular non-trivial targets when considering that most cloud applications are implemented in non-functional languages. Among the most widely used of these languages is Python. This starting position calls for an automated approach to transform monolithic Python code into modular FaaS units by partially automated decomposition. Hence, this paper introduces and evaluates Lambada, a Python module to dynamically decompose, convert and deploy unmodified Python code into AWS Lambda functions. Beyond the tooling in the form of a measured open source prototype implementation, the paper contributes a description of the algorithms and code rewriting rules as blueprints for transformations of other scripting languages.

Motivation & Objective

  • Address the challenge of manually refactoring monolithic Python applications for serverless FaaS deployment, which is error-prone and time-consuming.
  • Enable seamless deployment of existing Python applications into FaaS environments like AWS Lambda without requiring code modifications.
  • Support mixed-paradigm Python code (functions and methods on objects) in the transformation process.
  • Provide a reusable, open-source prototype that demonstrates automated FaaSification as a viable workflow for cloud application engineering.
  • Facilitate educational use by enabling students to deploy and test algorithms automatically, reducing friction in learning.

Proposed method

  • Leverages dynamic code analysis and abstract syntax tree (AST) manipulation to identify function and method boundaries in Python source code.
  • Applies predefined code rewriting rules to decompose module-level code into independent, stateless Lambda functions.
  • Automatically handles internal dependencies between functions within the same module by analyzing control and data flow.
  • Integrates with AWS CLI to deploy transformed functions directly to AWS Lambda, including configuration of execution roles and event triggers.
  • Uses a prototype implementation to evaluate performance, including deployment time (D ≈ 4200ms) and lambdafication overhead (L ≈ 67ms).
  • Employs a debug mode to inspect transformations locally before actual deployment, ensuring correctness and transparency.

Experimental results

Research questions

  • RQ1How can monolithic Python applications be automatically transformed into FaaS-compatible units without source code modification?
  • RQ2What are the performance characteristics of deploying Python functions via automated FaaSification, especially regarding deployment and invocation overhead?
  • RQ3Can the FaaSification process preserve the semantics of mixed-paradigm Python code (functions and methods) when deploying to AWS Lambda?
  • RQ4How does the transformation overhead affect real-world workloads, particularly those with varying computation and invocation patterns?
  • RQ5To what extent can automated FaaSification support development, testing, and educational workflows in cloud application engineering?

Key findings

  • The lambdafication process incurs a fixed overhead of approximately 4.3 seconds (67ms for transformation + 4200ms for deployment), which is amortized over longer-running functions.
  • For compute-intensive tasks like Fibonacci(18), execution time on Lambda was 63.9 seconds, showing a slowdown factor of only 27.6x despite the overhead.
  • Performance variance is significantly higher on AWS Lambda compared to local execution, indicating non-deterministic cold starts and instance provisioning.
  • The tool successfully transforms both standalone functions and methods on objects into independent Lambda functions without requiring code changes.
  • The approach is viable for development and testing workflows where low-latency requirements are absent, especially for functions with more than a few seconds of execution time.
  • The prototype demonstrates feasibility for educational use, where automated deployment maintains student motivation by reducing friction in function deployment.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.