[cross-posted] Hi,
We have hacked couchdb erlang code to make it do some low-level things we wanted for our system. The changes are: 1. Audit keeping: set a mandatory (potentially configurable) field in each doc with the UserCtx.name and Date/Time. (like, "last_modified_time" = current_time and "last_modified_by" = UserCtx.name). 2. Audit trail: whenever docs are created/updated, also write another "snapshot" doc for history keeping. >From what I understand, plugins work at the HTTP layer only and not at the DB layer. Am I right? It appears like a way to introduce new API end-points than to affect behaviour of existing (core) APIs. We don't want to intercept every write API call (PUT, POST, various update handler functions, etc.,). Nor do we want to tell clients to do the ugly thing of "duplicating the very information in the doc which they provide at HTTP layer" (ie., HTTP basic auth). Are these two features in Plugin scope? If not, what is the "right" way of doing this? (Two options I see: 1. introduce a middle ware layer 2. continue to hack couchdb-erlang code and maintain it ourselves*). Any other options? Cheers, -Suraj * It seems to me, option #2 is still *cheaper* than inventing a "highly available and scalable middle ware layer". -- An Onion is the Onion skin and the Onion under the skin until the Onion Skin without any Onion underneath. -- _____________________________________________________________ The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The firm is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.
