[Paper Review] Java Code Analysis and Transformation into AWS Lambda Functions
This paper presents Podilizer, a tool that automatically transforms monolithic Java applications into AWS Lambda functions through static code analysis and source code transformation. It demonstrates technical feasibility with up to 98% code coverage and economic viability, showing Lambda pricing becomes cost-effective at ~210,000 monthly invocations for typical workloads.
Software developers are faced with the issue of either adapting their programming model to the execution model (e.g. cloud platforms) or finding appropriate tools to adapt the model and code automatically. A recent execution model which would benefit from automated enablement is Function-as-a-Service. Automating this process requires a pipeline which includes steps for code analysis, transformation and deployment. In this paper, we outline the design and runtime characteristics of Podilizer, a tool which implements the pipeline specifically for Java source code as input and AWS Lambda as output. We contribute technical and economic metrics about this concrete 'FaaSification' process by observing the behaviour of Podilizer with two representative Java software projects.
Motivation & Objective
- Address the challenge of migrating legacy monolithic Java applications to serverless Function-as-a-Service (FaaS) platforms like AWS Lambda.
- Overcome the semantic and architectural mismatch between object-oriented Java programming and stateless, function-oriented FaaS execution models.
- Enable late-stage adoption of FaaS by developers through automated code transformation, reducing manual refactoring effort.
- Evaluate the technical and economic feasibility of full FaaSification of Java applications using a real-world tool and empirical evaluation.
- Provide a foundation for cloud-native application development and education by supporting automated migration from traditional Java applications to serverless execution.
Proposed method
- Design a three-stage pipeline: static code analysis of Java source code to identify entry points and dependencies, transformation into stateless AWS Lambda functions, and deployment configuration generation.
- Apply source code transformation techniques to refactor public methods into standalone, stateless functions with explicit input/output parameters, eliminating global state and static fields.
- Use build system metadata (e.g., Maven, Gradle) to extract dependencies and manage external libraries, including custom JARs and native libraries.
- Implement a mapping strategy to convert Java class methods into AWS Lambda handlers, ensuring compatibility with the Lambda runtime and event-driven invocation model.
- Integrate with AWS Lambda’s execution environment by generating appropriate function manifests, runtime configurations, and packaging structures.
- Handle file I/O and system input/output by replacing direct file access with environment-variable-based paths and input stream injection.
Experimental results
Research questions
- RQ1Is it economically viable to run a Java application entirely over FaaS, compared to traditional PaaS or IaaS deployments?
- RQ2Is it technically feasible to automate the transformation of monolithic Java code into AWS Lambda functions, and what percentage of code can be successfully converted?
- RQ3What performance overhead does the FaaSification process introduce, and how does it compare to monolithic execution on IaaS or PaaS?
- RQ4Which code patterns are easy, hard, or impossible to convert, and what are the main technical barriers in the transformation pipeline?
- RQ5What is the impact of code structure (e.g., access modifiers, global state, I/O) on the success rate and maintainability of the transformed functions?
Key findings
- The transformation process achieved up to 98% code coverage for the most amenable projects, with P2 and P3 showing high conversion success despite complex dependencies.
- Performance overhead was approximately one order of magnitude slower than IaaS (EC2) or PaaS (Elastic Beanstalk), with Lambda execution times ranging from 8.77s to 12.20s for the six projects.
- Economic feasibility was confirmed: Lambda pricing becomes cost-effective at around 210,000 monthly invocations, with a million calls costing $20.80 vs. $4.39 on EC2 (t2.nano).
- The tool introduced significant code bloat, with source code size increasing by up to 38,763% (P2) due to boilerplate and duplicated code in individual functions.
- Projects with GUI components (P1), interactive CLI (P5), or missing native dependencies (P6) failed to deploy, highlighting limitations in handling non-idempotent or system-dependent code.
- The study identified that public methods (e.g., public main methods) were often too accessible, while private or protected methods posed challenges due to visibility constraints in the transformation pipeline.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.