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
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...