Back

recommend way of CRUD operations

  • 0
  • Databases
  • Functions
  • Flutter
steve jobs
10 May, 2023, 13:01

for a saas platform using flutter, if it has to be scalable and secure and fast , which way of doing CRUD is better?? implementing CRUD operations directly from the client side using Databases API's (list documents, update document ect) or creating a cloud functions for every App functionality and doing CRUD from within the cloud function such that CRUD operations are encapsulated from the client side. and only cloud function API calls will be made from the client for fetching or modifying data.

is there any down sides for using cloud functions for every user interaction with the saas app? ie, for fetching data and modifying data?

TL;DR
The user is asking for recommendations on the best way to perform CRUD operations. They mention parallel execution and load balancing as potential solutions. They also ask for documentation and resources to refer to. The user asks about allocating more priority and RAM to functions, and if it's possible to modify the rate per IP. They also inquire about the best approach for implementing CRUD operations, either directly from the client side or using cloud functions. The response suggests that load balancing and replicating docker containers can optimize performance. The user is advised to optimize function code and consider using functions for enhanced security features. It is mentioned that rate limits can be bypassed by triggering
steve jobs
10 May, 2023, 13:04

and function api is rate limited to 60 per minute per IP address. so if the platform is being used by 60 employees in a company using company WIFI , only 1 function executions can be made per user ??

steve jobs
10 May, 2023, 13:07

is there a way to modify the rate per IP by logging into mariaDB and changing any values?

D5
10 May, 2023, 13:18

I think it's going to be really rare seeing users triggering at the same time them

D5
10 May, 2023, 13:19

A workaround could be triggering it indirectly by changing anything in the database. That way you will not get any rate limit, except of the database limits

safwan
10 May, 2023, 14:09
safwan
10 May, 2023, 14:09

i think if every user has a separate account, you ahould be okay.

steve jobs
10 May, 2023, 15:04

?

D5
10 May, 2023, 15:11

It depends on what you're building. If you need custom or enhanced security features, for example, it's going to be better managing it through functions

D5
10 May, 2023, 15:13

However, probably it will be slower

steve jobs
10 May, 2023, 16:17

is there a way to allot more priority and allot more RAM to functions?

steve jobs
10 May, 2023, 16:17

to make running of functions more smooth and faster?

D5
10 May, 2023, 16:22

I've thought they ran smooth and fast by default

D5
10 May, 2023, 16:22

I'm not sure if it's possible to make that

safwan
10 May, 2023, 16:32

you shouldn't face any issues with function execution times. Appwrite is pretty optimized to handle function executions. Obviously, you have to do your best to make sure your function code is optimized as well.

D5
10 May, 2023, 16:47

Note they don't run parallel so, it's not that optimized. However, they can be scaled by replicating the corresponding docker container

steve jobs
10 May, 2023, 16:53

is there any docs or resources available for me to refer ??

safwan
10 May, 2023, 17:41

just look up load balancing

steve jobs
10 May, 2023, 18:31

normal load balancing woul do the job? no other configs need for the appwrite or docker specifically?

D5
10 May, 2023, 19:35
D5
10 May, 2023, 19:38

It seems that parallel execution is already implemented, or that said Eldad

D5
10 May, 2023, 19:44

Except for the ones triggered by events, so give it a πŸ‘ on GitHub if you need that

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