Conversation
zonotope
left a comment
There was a problem hiding this comment.
This looks good and the rationale makes sense.
One little nitpick is that I think I would rather have individual components for these "server level" configurations instead of one catch-all. That way you could tell from the dependency graph which components depend on what at a more fine-grained level.
The user level JSON config is fine to have a catch all, but I think it would be nice to have a separate :fluree/cache component with an initialization method that created the cache from the cach-max-mb argument directly, and all dependent components can (ig/ref :fluree/cache) directly.
In any case, this works so I'm fine with it, but I would rather things that need initialization live in their own integrant components, even if they are grouped under a single key in the user-level json config.
This moves the connection setting of
cacheMaxMbto a server-level setting.All connections leveraged on the same server should share the same LRU cache.
While technically there is more granular control available, it would in most circumstances under-utilize the machine resources - or if oversized to accommodate that, then leave the server susceptible to OOM failures.
We always have fluree/db, and people can write their own custom thin layer to do anything unique they want.
It utilizes the server-level config options in #80