Boost logo

Boost :

Subject: Re: [boost] Boost.Dynamic Config
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-02-14 16:17:22

Dan Weber wrote:
> I feel as part of the Boost community and having worked on multiple
> platforms that we're missing something to manage reading/writing
> configuration information for an application thread safely across
> platforms. The best example I know of that handles this job is Qt's
> QSettings which writes to the registry on windows, inis on
> linux, and some sort of xml on Mac OS X.

The idea is interesting, but there are a great many features such a mechanism could include beyond those you've mentioned, though they may not work so well for the various backends.

For example, when processing configuration files, you could support include directives or conditional processing. You could support reusable values; IOW, permit reusing a given value in defining the value of various other entries.

What about the ability to filter which entries apply? In, again, a configuration file, there could be key elements that identify the application or instance to which they apply. Then, based upon runtime values, entries with those extra key parts would be filtered if they don't match. (Another approach is to require wildcards so all keys have the same structure.)

There are various configuration formats that support data structures like dictionaries, lists, etc. These are highly useful for capturing come configuration information. Without direct support, one must create ad hoc string formats that must be parsed by each application requiring them.

Why do you want to update the configuration store at runtime? What are the use cases for that behavior?

What do you mean by thread safety? Do you anticipate much MT demand for updating configuration information that the application couldn't just synchronize updates rather than embedding that behavior in the configuration class(es)?

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Boost list run by bdawes at, gregod at, cpdaniel at, john at