Back

Cloud Function for all Use-Cases or Serperate for Client App

  • 0
  • Flutter
  • Tools
  • Databases
  • General
  • Self Hosted
Suiii
20 Mar, 2024, 03:26

Since I will have the client app of Flutter for data-input and NextJS for dashboard and reporting - starting from Flutter first. So I want to have one api routes for both of them to connect to appwrite.

After some communication, I can create cloud function to handle the api routes, plus hono to create one deployment for all use cases ( similer to api projects). so my question is, having multiple uses case in one deployment, will the cloud function be slow and any issue with that. The other option is to create the function for Flutter and also NextJS later.

Please give me some suggestions or ideas to effectively use. Thanks

TL;DR
Developers are discussing whether to have one cloud function for all use cases or separate functions for the client app. It's advised to keep executions fast to avoid timeout issues. The developer plans to have Flutter and NextJS connecting to Appwrite with one API route. The suggestion is to create one cloud function for all use cases rather than separate functions for Flutter and NextJS.
Steven
20 Mar, 2024, 03:30

Didn't you have another thread on the same topic? 🧐

Suiii
20 Mar, 2024, 03:32

to make it more specific topic 🤣

Steven
20 Mar, 2024, 03:53

One function is fine. Just make sure each execution finishes as fast as possibly

Suiii
20 Mar, 2024, 03:54

which means if the function is requiring some time to finish. and there are many requests. it will have issue. correct me if I am wrong

Steven
20 Mar, 2024, 03:58

Possibly. That depends on the language/runtime.

It's more so the longer an execution runs, the more likely it will be timed out or killed

Suiii
20 Mar, 2024, 03:59

thanks. whata would be ideal language/runtime for this case as suggested by you.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more