- 0.2.0 - 2021,Oct
- AWS:
- Add CloudWatch automatic integration;
- Update runtime from nodejs10.x (deprecated) to nodejs14.x.
- FaaS zip file generated with dependencies (node_modules);
- Replacing package Request (deprecated) by Axios
- Automatically add Axios in generated app package.json
- Parameters passed via POST
- New annotation feature: force / skip publication on FaaS
- 0.1.1 - 2020,Nov
- Minor bug corrections;
- Graphics on evaluations;
- Readme Update
- 0.1.0 - 2019,Dec
- Add multicloud orchestrator (Terraform) with support to AWS, GCP and Azure FaaS services;
- Function pre-analysis;
- 0.0.1 - 2018,Dec
- Initial Release
This framework intend to help NodeJS developers to migrate from monolith model to function as a service (serverless) model. It parses the original code looking for exported functions and creates an equivalent function on the provider. Instead of the original function is placed a restAPI request to FaaS.
To use this conversor you need to have an active account in one of this FaaS services:
- Amazon AWS Lambda;
- Google Functions;
- Microsoft Azure Functions.
- Log in to your AWS Management Console.
- Click on your user name at the top right of the page.
- Click on the Security Credentials link from the drop-down menu.
- Find the Access Credentials section, and copy the latest Access Key ID.
- Click on the Show link in the same row, and copy the Secret Access Key.
You should obtain this parameters:
- access_key_id
- secret_access_key
You should obtain this parameters:
- subscription_id
- azure_tenant_id
- azure_client_id
- azure_client_secret
Follow this instructions: click
- Create a service account and set permissions to operate the Compute Engine and VPC Networks.
You should obtain a JSON file with this parameters:
- client_x509_cert_url
- client_email
- client_id
- project_id
- private_key_id
- zone
The JSON file location will be prompted by the framework during its process.
npm install node2faas
or
git clone https://github.com/node2faas/framework.git
cd node2faas
npm link
- Run:
node2faas --help
on your terminal to get the CLI Instructions
-
Run:
node2faas --target [/path/to/original/application]
-
Follow de conversor instructions
-
After proccess, check the directory output and your application converted to operate with FaaS should be there.
- Convert only .js files (other file types are skipped)
- Stores provider credentials after first execution (don't ask again)
- Creates new FaaS function on the choose provider
- Creates all provider API Gateway resources
- Annotations (add a comment anywhere inside function definition)
- Skip publication:
//@node2faas-skip
- Force publication:
//@node2faas-force
- Skip publication:
The framework is prepared to work only with:
- Providers:
- AWS Lambda
- GCP Functions
- Azure Functions
- Function types:
- exported
- Ex:
exports.functionName = function(params) { ... }
- Ex:
- exported
This project contains some examples to guide you. Look inside examples folder.
- available in path: examples/mocked/bounds
The load example explores 3 potential function loads:
- Memory -> process with high memory consumption
- CPU -> process with high CPU consumption
- I/O -> process with high I/O consumption
- 1 to 100 concurrent requests to each service (traditional and converted)
- Simple Test (simple math operations)
- CPU stress Test (multiple cycles of simple operations)
- Memory stress Test (multiple cycles of writing on memory operations)
- I/O stress Test (multiple cycles of writing on disk operations)
- All data generated in this evaluation is available in path: evaluations/preliminary/outputs
- Files generated have this structure: [initial timestamp in nanoseconds],[final timestamp in nanoseconds],[duration in nanoseconds],[output from service]
- CPU stress Test (multiple cycles of simple operations)
- Memory stress Test (multiple cycles of writing on memory operations)
- I/O stress Test (multiple cycles of writing on disk operations)
-
All data generated in this evaluation is available in path: evaluations/conclusive/results
-
A list of test case was generated using the parameters. This table is available in file: evaluation/conclusive/test_cases.csv
-
Files generated have this structure: [id test case],[sequence],[test output],[duration in nanoseconds]
-
2019, May => CLOSER, Heraklion, Greece (paper)
-
2020, May => CLOSER, Online Streaming (paper)
-
2020, Nov => CCGRID, Melbourne, Australia (paper)
If you need more information, please send a message to: leouesb@gmail.com