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
- 408 Timeout / Curl Error 7 in Executor w...
Hey everyone, I am losing my mind over a routing loop/timeout issue on a fresh self-hosted setup. I have a single Linux VPS (IP: 45.141.37.105) and one domain (...
- functions returning error 401 in local
I updated to 1.9.0, and the functions that used to work fine in 1.8.1 are now giving me a 401 error. I can't seem to find a solution. If anyone is running versi...
- Docker Compose MongoDB Setup
everythings work fine but the mongodb fails on startup everytime. log: ``` Generating random MongoDB keyfile... /bin/bash: line 9: : No such file or directory ...