Hi Florian,
the problem about foxx is, that in its current implementation state its not intended to be multi tenant enabled.
Therefore it doesn't have a good way to insulate the different services forcefully - be it collections or filesystem access.
Means: as long as you make shure all foxx services are mounted at a proper place, and foxx services use their mountpoint via their context to get the names of collections and don't do any mad disk i/o it will work.
However, there is no way to enforce this. So if you let your tenants create & upload their own foxx services, they get the ability to disturb each other or maybe even compromise the whole system.
If you have a set of foxx services reviewed or authored & maintained by you, you would be able to control that these services are properly implemneted to behave well in your environment.
Your management service:
- would authenticate the tenants (and maybe even their users).
- would store information about the services it deployed in a collection accompanied with the owner for later privilege checking
- would manage the mountpoints (i.e. force the customer name to be prepended) and make shure no mountpoints and configurations are broken.
- would use the foxx-manager bindings to control these services it previously deployed.
The tenant foxx services:
- would create and initialize their collections with their mountpoints prepended to the collection names, as its standard for foxx services.
- in some way derive the authentication or do their own auth.
- eventually do file i/o with their mountpoint prepended to filenames
Resource Usage:
Collections represent files on the filesystem.
Their size changes in threshholds with possible overhead per collection.
For that reason ArangoDB rather scales well on fewer huge collections than a huge number of small ones.
Similar holds true for foxx services:
They're instanciated into each V8 context which equivilents into RAM and resource usage.
This works well for several hundred services, but may not scale well to several tenthousand services.
So depending on the number of tenants you're intending to work with, the better (and intended) way of using ArangoDB would be to integrate tenant management into your services.
If it ranges into the thousands, you should think about my sugestion, if its several hundrets, your aproach may work well.
Hope this helps,
Willi