Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advice on db architecture with Fauna

Tags:

faunadb

I'm building a todo list with a few interrelated collections (tasks, groups, and columns to store the ids and orders of the tasks). Each one of these need to be scoped down to the logged in user, so I've got indexes to fetch _by_owner (owner is the term).

I want to make sure it's not going to create a bottleneck if the application scales to 1000s of users. If so, is there a better pattern to implement.

like image 268
user841760 Avatar asked Jan 22 '26 20:01

user841760


1 Answers

Using index terms to filter collection sets is the way to go in fauna. Terms partition collections into a family of disjoint sets such that all docs in each subset have equal terms. This is done at write time so subsequent reads by term are cheap.

like image 137
benjumanji Avatar answered Jan 26 '26 23:01

benjumanji



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!