Hi, please @Meldiron in our previous discussion, you mention:
we spin up 1 runtime for every function
I just want to know why? It would not be better to have runtimes container that can run any funtion? that will allow a better use of server resources.
Is there a way to do this now "1 runtime container runs different functions"?
1 container coupled to 1 container
isolation. You wouldn't want 1 function screwing up another function. especially between different projects
1 function coupled to 1 container
Is not another way to achieve isolation? I know always there are trade offs but for some limited/constrained projects it would be better to leverage server resources than have isolation.
It is a possibility that the final decision betweem isolation or server-resources, is taken by the developer?
separate containers is the best way to ensure isolation. it's a pretty common architecture pattern.
If you really want, you can make 1 function that combines all your logic
this architecture also helps with scaling out horizontally
It is a possibility that the final decision betweem isolation or server-resources, is taken by the developer?
It was one of my concerns that gave us an idea for the next iteration of functions. In the next functions release, we plan to make functions closer to HTTP standards. That means, if you wanted to, you could build a full-blown REST API on top of a single Appwrite function.
You can do that already, it's just a bit less structured. You would need to come up with a scheme for your payload, and follow that pattern in your app.
It's true, I hadn't thought about that.
wow, that is to much better, both, isolation when it is requiered or a full api otherwise.
I will try to do it in the current version. Thank you for your time
Do you know if there is a github issue about that?
No idea. Tho no need to raise, one, this is on the roadmap, and I am actively working on it. If you are interested in more details, here is a Node.JS example (test file) using new syntax and testing all new capabilities: https://github.com/open-runtimes/open-runtimes/blob/v3/tests/resources/functions/node-18.0/tests.js
https://github.com/open-runtimes/open-runtimes/blob/v3/tests/BaseV3.php Here is test itself so you can also check what values we send, and what responses we expect.
Thank you. I will be watching for this feature
[SOLVED] 1 function coupled to 1 container
Recommended threads
- Functions Failing on CRON Schedule
I set up an hourly CRON Schedule for my function and It only executes successfully every after 3 hours sometimes 10 hours. When I execute it manually it works e...
- hi guys! my site is not accesible in my ...
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...