
I am working on a web app where users can create lists. I perform a bunch of validation server side with functions and currently I do this as follows
- Write user request to a request collection
- Collection triggers a function
- Function validates and writes to user lists collection
- User gets realtime update from user lists collection
- App updates
I want to move away from database triggering functions to making a POST request to the function directly. The examples on appwrite documentation shows server side code but not client side code (working with flutter). How am I supposed to make such a request ?
Create a function execution request ? If so how is user supposed to get response data once execution completes ?

Are you creating collections at runtime?

Not sure what you mean, which collections ? No collections are created at runtime, only documents in said collections to help trigger respective functions.

Have you seen https://appwrite.io/docs/products/functions#sdk?

Of course I have, quite a bit. The only thing I see there is to create execution but I am not sure with that how i am supposed to pass data back to the user ? From what I understand the CreateExecution will immediately return execution status and not data I might want to send back i.e., list created or failed with error etc. Not sure if I create ASYNC false execution would an await work then ? Thus wanted to ask the experts 🙂
Just to be clear I am speaking purely in a flutter context.

Yes, the async parameter is what will determine whether the execution should be processed right away and have the response populated

Sounds pretty straight forward. Will need to try. Another thing to check, since like users creating lists is a very common task that will happen quite often, any possible pitfalls with a large number of async false executions being queued ?

Synchronous executions don't get queued. The only thing is if your function hasn't executed successfully in a while, the runtime container may be removed so the next execution will be a cold start

Cold start is not a concern, my concern is, to quote a hypothetical extreme case, 100 synchronous requests on a 2 vcpu server. They will , I assume, be executed sequentially thus the await for a 100th request will be resolved once its executed say a minute or so later and with a response ? Accurate ?

No, they're all executed concurrently (up to a certain limit) just like how create document requests don't execute sequentially

Ah understood. Thanks

[SOLVED] how to make function calls from flutter webapp
Recommended threads
- Storage getFilePreview for GIF file retu...
Used to work in 1.6.x but with 1.7.4 upgrade it seems to be broken.
- Admin panel
- Settings page on storage in a bucket goe...
When navigating to a settings page in a bucket i recieve a 404 with the following error: ``` 2025-06-06T12:02:46.582655899Z [Error] File: /usr/src/code/app/cont...
