6
NodeJS functions needs upgrade
Source: appwrite/appwrite#1261 · opened by @Meldiron
How Appwrite does it? Appwrite has a functions container that listens for new executions and when there is a new one, it starts a separate NodeJS container. Inside this container, it starts my code and wait for it to end. When it ends, it takes all console log and keeps it as a result of an execution. How Google/Amazon/Microsoft does it? Amazon starts a container as soon as the first request comes in. Instead of simply running my script and waiting for it to stop, it has its own NodeJS wrapper that runs for as long as the container is running. What this wrapper does? It includes my code (using require or import) and my code HAS TO export some method (for example execute) Whenever there is a new request to execute my code, their wrapper runs function execute and returns the result of this function (whatever I return there). Who does it better? Amazon! Why? Amazon's approach introduces global variables. What does that mean? All NodeJS code in my script that is outsid…
No pledges yet. Be the first to back this.
Comments
Similar requests
Let's talk about Appwrite Functions (Gen 2)
4 votes · 0 comments
🚀 Feature: Cloud functions keep alive
1 vote · 0 comments
Visual node builder for functions
1 vote · 0 comments
Appwrite easy custom installation tool
4 votes · 0 comments
Has anyone done a chat client using Appwrite?
1 vote · 0 comments
No comments yet.