Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 32129 invoked from network); 10 Apr 2008 20:02:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Apr 2008 20:02:53 -0000 Received: (qmail 89939 invoked by uid 500); 10 Apr 2008 20:02:53 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 89914 invoked by uid 500); 10 Apr 2008 20:02:53 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 89905 invoked by uid 99); 10 Apr 2008 20:02:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2008 13:02:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of damienkatz@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2008 20:02:10 +0000 Received: by py-out-1112.google.com with SMTP id a25so173086pyi.13 for ; Thu, 10 Apr 2008 13:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:content-type:content-transfer-encoding:mime-version:subject:date:x-mailer; bh=ZYuenCgZeRyYR2c/NG+L5NX09dAaHMgOP7pgN++b15I=; b=H343h5MyAFTx7jmteroJEZJByUkLa20+g1OnVl25zUn97tjQoD1n6P7I2912qpajrQ6L/0gUg53Zb9G7BmC+HWCvWu3OfT8c2Elly5coRt+rjJ5h0UdrF3gxDy7QHR2YiYqS2OAxXjVnyRNzn5k0aYsIlVhgciK6rqXyUfzKxsw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding:mime-version:subject:date:x-mailer; b=h0DBg6oFsNkbP4AFS/FhkTqD0pEEsjEicZKh9iGcYNOPIjeWL5muBRIZqL701e0ZQpl7vWDllcxjlormVvRbif3tMTtn+e16MPQccoTj489smeJIzGIaTXyRgCbA5YhLoPQQ4hOvExZXbgwYhh7+wUSwBKkILQw/TL5Zm2FKXyc= Received: by 10.35.109.2 with SMTP id l2mr3410336pym.1.1207857741475; Thu, 10 Apr 2008 13:02:21 -0700 (PDT) Received: from ?10.0.1.188? ( [71.68.49.63]) by mx.google.com with ESMTPS id f51sm2309489pyh.10.2008.04.10.13.02.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Apr 2008 13:02:20 -0700 (PDT) Message-Id: <2C5BFE50-C6FA-4A08-BEF6-EA8658A183BC@gmail.com> From: Damien Katz To: couchdb-dev@incubator.apache.org, couchdb-user@incubator.apache.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: server configuration stuff Date: Thu, 10 Apr 2008 16:02:18 -0400 X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org Currently that CouchDB handles configuration stuff is to reads in it's configuration setting at startup time the couch.ini file, and then feeds those settings as startup arguments to the various child servers processes. This requires that to change a setting you must restart to take effect. This is fine for now, but we can do better. I'd like to enhance this by providing a configuration module that allows for configuration settings to be changed at runtime, and automatically have those changes take effect without requiring a server restart. The way I was thinking it would work, at startup the server configuration module sucks up the settings from the couch.ini, then the child processes are started normally, but without startup arguments. The child processes then query the runtime module at startup, or whenever, to get their configuration data. It should be possible for the core modules to subscribe notifications of configuration updates. In Erlang, this is typically done by the modules registering a callback function. So when a configuration setting is updated, it would get invoked with the changed settings as arguments. And when a configuration setting is changed at runtime, the module should write the new setting back to the couch.ini file. And it should be able to handle updates to settings, etc, and ideally still preserve all previous formatting and comments. So, some questions. What do people think of this in general? Or should we be using the apache conf format instead of ini? Maybe we should use json? One things I'd like to see is that configuration stuff be editable in a text editor. However, I might be dissuaded to start using a CouchDB database to store everything but the most critical startup information. Thoughts please.