Spottsworth
Spottsworth

Reputation: 415

Registry design

I need to design a application registry S/W component using C++. Basically, this needs to support addition and deletion of key/values. Dynamic updates need to be supported (for example, when a new application get installed). Is there a design pattern which closely matches the given problem? Though I have formulated a rough sketch of the APIs this component needs to support, it would be helpful to have a look at alternative (perhaps better) ways of design. If there are some typical problems associated with registry design (may be some thread issues which I might have overlooked), I want to make sure I have circumvented those.

Upvotes: 2

Views: 241

Answers (1)

dirkgently
dirkgently

Reputation: 111336

Is there a design pattern which closely matches the given problem?

You are probably looking at more than one: A proxy for the entire registry, iterator etc. comes to mind.

If there are some typical problems associated with registry design

  • You will probably need transactional semantics. Rollback too!
  • Do you need to save snapshots from time to time? Then you will need an archiving module.
  • Synchronization: Multiple writes to the registry need to be taken care of.

Upvotes: 1

Related Questions