-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions with props and response #1199
Comments
In v0.8 we introduced a new |
I think I've seen other users request for this before. It would be super useful to be able to both pass data in AND get a response from cloud functions. |
Hi @eldadfux, to pass data in there is an option, but at the moment you just get as response the status and not a custom response. Thats what I meant. Sorry for my bad english :) |
@mediengestadler @alexweininger yes, we currently support only async execution of functions due to security restrictions. We just didn't want to expose the docker socket stream directly on the API container (the That said, we also have good news. We already have an experimental PR where we handle function execution through Docker HTTP API and not from the Docker socket. This will help us reduce the shell latency we have today and allow us to control runtime environments without exposing the host docker socket, and allow synced execution where the returned object could return the stdout + stderr outputs when execution completed. |
All up for sync execution! For tasks and hooks I reckon the async behaviour is all right, but for Client executed functions, I can't see polling for results scaling very well, if you have hundreds of users hammering your server asking if the function completed the execution in order to get the result (will that in fact trigger the abuse rules?). Also, will this new Docker HTTP API implementation open the door for request/response type of functions as well? I understand that it does not adapt to all types of behaviours (hooks, cron) or runtimes, but maybe there is a way to pipe the request and response streams that triggered the function (the same way we get other streams like the IO streams), if it was user triggered by request? Just wondering. |
We are currently working on this issue, and you are all welcome to comment on this RFC to allow both sync and async execution of functions: appwrite/rfc#30 |
Update: 15-01-2022 This issue is in advanced stages and is expected to be available in Appwrite 0.13 |
Fantastic news! |
We just released 0.13 and this should be fixed 馃憤馃徎 You can find the announcement here. Thank you a lot for reporting this 馃檹馃徎 |
馃殌 Feature
Hi,
first of all: I love appwrite! Great work you do!
Now to my idea. I think it's useful, if you can execute a function via the API with properties and gives a result. So you can hide important business logic.
Have you read the Code of Conduct?
Yes
Pitch
We have the specification, that we have to generate a hierarchical structure of our employees. They are all in one table and have a name and the id of her supervisor. With that we want to generate the whole hierarchical structure from the current user to the top, but we don't want to read all users every time and filter that via JS.
The text was updated successfully, but these errors were encountered: