Funcify is a lightweight Function-as-a-Service (FaaS) platform that allows you to deploy and run isolated serverless functions in the cloud. With auto-scaling capabilities and an intuitive CLI, Funcify simplifies the deployment and execution of functions while optimizing resource utilization.
- Deploy Functions: Upload your functions to the cloud, deploy them, and get a URL for execution.
- Run Functions: Execute your deployed functions directly using the provided URL.
- Auto Scaling: Automatically scales up or down based on system load using RabbitMQ and Docker containers.
- Logs and Metrics: Access detailed logs and performance metrics for each function.
- CLI Tool: Simplify interaction with the platform for authentication, deployment, and execution.
-
Users:
- Users interact with the platform using a CLI or direct API calls.
-
Blob Storage:
- Stores function code uploaded by users (e.g., AWS S3).
-
Main Server:
- Handles metadata storage in the database.
- Consumes tasks from the queue.
- Dynamically launches Docker containers to execute the functions.
-
Message Queue:
- RabbitMQ/Kafka manages function execution requests.
-
Database:
- Stores metadata about deployed functions (e.g., user details, function endpoints).
-
Execution Environment:
- Launches Docker containers with suitable runtime environments to execute the code.
-
Auto Scaling:
- Horizontally scales the main server instances based on queue length and demand.
- Backend: Node.js (Express.js for APIs)
- Queue System: RabbitMQ/Kafka
- Containerization: Docker
- Cloud Storage: AWS S3 (or equivalent)(currently stores file locally)
- Database: MongoDB (or any NoSQL/SQL database)
- CLI Tool: Node.js-based CLI interface
-
Clone the repository:
git clone https://github.com/Sahiiil1406/Funcify.git cd funcify -
Install dependencies:
npm install
-
Configure environment variables:
- RabbitMQ/Kafka connection details
- Database URL -PORT number
-
Start the server:
npm start
-
Install the CLI globally:
npm install -g
-
Authenticate and start deploying functions:
funcify login funcify deploy --file <path-to-function-file>
Use the CLI to deploy your function:
funcify deploy --file <path-to-function.js>Execute the deployed function using the provided URL:
curl -X POST <function-url> -d '{"key": "value"}' -H "Content-Type: application/json"Retrieve logs for your function:
funcify logs --function <function-name>