[Gllug] How to store configuration information ?
Christian Smith
csmith at micromuse.com
Tue Jan 11 17:42:29 UTC 2005
On Mon, 10 Jan 2005, Wiehe, Simon wrote:
>Hi,
>
>I have a number of applications (over 100 individual apps) that require common
>configuration information plus some specific configuration information. These
>applications are distributed across multiple machine on Linux, Unix and
>Windows and are written in Java, C++ and Perl scripts.
>
>My question is does anyone have any suggestions for storing/distributing the
>config data. I want to avoid config files as this makes it tricky to move
>machines quickly and there is always the probability that the common stuff
>will not get updated in one (or more) files. We talked about using a
>relational database for this, but I am not so sure it is the ideal repository.
>There was also the suggestion of using LDAP. The data is predominantly
>name=value pairs with most values being numeric or strings. Some binary values
>may be needed.
>
>Does anyone have any suggestions on how best to store this so it is easily
>available from all platforms and languages ? Pointers to any reading
>resources, if known would be useful.
SQLite:
www.sqlite.org
Will not only store the configuration information, but allow you to query
it using SQL, and is stored in platform independent format and accessible
from a multitude of languages.
A suggested SQLite schema might be:
create table config (
name text primary key on conflict replace,
value text
);
Adding configuration is then simply a matter of SQL inserts. The "on
conflict replace" clause on the name field will allow you to insert with
impunity, overwriting existing values.
You'll want to use SQLite V3 if you want to store BLOBs.
I did a talk on SQLite at a GLLUG meeting last year. The slides can be
found at:
http://www.codex.net/~csmith/SQLite/presentation/sqlite_talk.sxi
>
>Thanks
>
>Simon
>
>==============================================================================
>This message is for the sole use of the intended recipient. If you received
>this message in error please delete it and notify us. If this message was
>misdirected, CSFB does not waive any confidentiality or privilege. CSFB
>retains and monitors electronic communications sent through its network.
>Instructions transmitted over this system are not binding on CSFB until they
>are confirmed by us. Message transmission is not guaranteed to be secure.
>==============================================================================
>
>
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list