Lloyd R. Prentice
Lloyd R. Prentice

Reputation: 4857

1000+ users, 30+ private data collections

I'm working on a management/planning application that will have 1,000+ users, each with 30+ data collections.

For instance, each user might have a collection of, say, client contacts with as few as 10 and as many as several hundred items/records.

Would Arangodb be a suitable choice for this application?

Is there a better choice?

Many thanks,

LRP

Upvotes: 3

Views: 109

Answers (1)

stj
stj

Reputation: 9097

I assume that all the user databases should be kept separate, so user 1 should not see any data of user 2 etc.

If so, there is the option to create a separate database for each user, or, as you mentioned 30+ databases for each user. That would result in 30,000+ databases. I think this wouldn't be an ideal usage of ArangoDB, as each database will incur some overhead, and you may want to keep the total number of databases in an ArangoDB relatively small, at least you wouldn't create 30,000+ databases in it.

The alternative option is to not create that many databases but as many collections, maybe all in the same databases. While this provides a good separation of user data, from the point of resource usage this would also be rather expensive (as each collections may need a separate storage file if it contains data). I think it could work if not all users/collections need to be active at the same time and the server has plenty of resources (or you split the data across multiple servers).

The solution that would use least resources in ArangoDB would be to put data of multiple users into just a few collections. For each record you could store a user-id, and have your application use the user-id in each query. This would ensure the application would only access records of one specific user at a time. Additionally, as this would use just few collections, there would be no need to create empty or mostly empty databases / collections for users with few data. From the resource usage point of view, this should be relatively efficient.

Upvotes: 1

Related Questions