Github user kxepal commented on a diff in the pull request:
https://github.com/apache/couchdb/pull/309#discussion_r26267421
--- Diff: rel/overlay/etc/default.ini ---
@@ -23,6 +23,7 @@ file_compression = snappy
; and/or more OS page cache hits, but they can also increase overall
response
; time for writes when there are many attachment write requests in
parallel.
attachment_stream_buffer_size = 4096
+db_definitions = [couch_dbs, mem3_dbs, couch_replicator_dbs, cassim_dbs]
--- End diff --
No, I agree with you that plugins system itself is a very much more bigger
question, but there is no need to think about it too much to have problems I
mentioned. You may always assume that couch_mrview and couch_replicator are
these plugins (however, only the latter fits this role nicely) which are just
available out of the box.
Let's limit our scope of "plugins" by these two apps as we know them well.
Both adds own system databases, both could be optional (let's dream a bit
here), both vendor may want to replace with own solution (in additional to the
others it has).
The biggest problem here is unavailability to gracefully handle CouchDB
upgrade when you'd add own `db_definitions` to local.ini as overlay system
demands. If you'd edit them in default.ini you'll end with manual list merge.
So if CouchDB ships with none of them, vendor adds own `couch_foo`, user
installs `couch_replicator` and later CouchDB adds `couch_mrview` everything
gets eventually broken.
This problem actually could be easily solved by turning horizontal list
into vertical:
```
[dbs_definitions]
couch_mrview = couch_mrview_dbs
mem3 = mem3_dbs
```
Where key is application name and value is a related module. Overlay
mechanism will provide all the features to turn on / turn off specific modules
with easy.
But still...is there no way to avoid exposing such kind of internal
information in config file?
Why application environment case doesn't works? Once application is loaded
it publish the module with the behaviour about system databases it needs. If
it's not loaded then it's not used.
Can we relay on that if some app wanted to define own system database it
mush have specially named module with implemented behaviour?
> Maybe we should use dets for persistent things. ;-)
No, let's create another system database which stores other system
databases names (; And we need to go deeper (:
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---