Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #1901

Re: the registry

From BGB <cr88192@hotmail.com>
Newsgroups comp.programming
Subject Re: the registry
Date 2012-07-05 23:35 -0500
Organization albasani.net
Message-ID <jt5q1t$85e$1@news.albasani.net> (permalink)
References <c1091547-e93d-4e63-83ff-7c2160d1abd7@googlegroups.com> <registry-20120705164846@ram.dialup.fu-berlin.de> <jt4dm6$7e2$1@news.albasani.net> <a5n55tFv8dU1@mid.individual.net>

Show all headers | View raw


On 7/5/2012 10:42 PM, Frank Swarbrick wrote:
> On 7/5/12 9:58 AM, BGB wrote:
>> in my run through college, about the closest the classes ever got to
>> talking about hierarchical databases was to briefly condemn older
>> database systems, and then extoll the virtues of the relational database
>> model as the "one true solution to everything".
>>
>> meanwhile, I personally use a hierarchical database system in my
>> projects.
>
> What database is that?  We use the mainframe hierarchical database IMS
> at my shop, and I've always wondered why there don't seem to be any
> others.  Or more likely, why I can't locate them.


it is a custom-written system vaguely similar to a naive implementation 
of a something resembling the Windows Registry.

it doesn't have any particular name or use apart from my projects (and 
is mostly used for storing VM metadata, so is generally called the 
"metadata database", although it is also used some for holding some misc 
data from elsewhere in the project though, like things like values for 
program "console variables" or "cvars", ...).


the bulk of the data it contains comes from parsed/processed C headers, 
where it holds information about types, structures, function 
declarations, ... this is mostly used for allowing easier interfacing 
between my scripting language and C (the VM/codegen logic "queries" the 
database and uses the results to generate code fragments to glue the VM 
machinery onto various pieces of native code).


data is stored as a hierarchy with nodes containing key/value pairs, and 
internally it uses a tree structure vaguely similar to an AVL-tree, 
except internally it is a 3-way split (left, right, middle).

left and right navigate between sub-trees within the same level 
(folder), and middle goes to the next level down (sub-folders).


pretty much the entire DB is kept in RAM during use, and is loaded from 
and stored to disk files. it currently lacks any concept of transactions 
or fault tolerance, as these are not all that important for how it is used.

typical usage is fairly lightweight (under 1M nodes), so the design has 
worked fairly adequately.


so, nothing really significant here...

Back to comp.programming | Previous | NextPrevious in thread | Find similar


Thread

the registry bob <bob@coolfone.comze.com> - 2012-07-05 07:15 -0700
  Re: the registry Rui Maciel <rui.maciel@gmail.com> - 2012-07-05 16:21 +0100
  Re: the registry BGB <cr88192@hotmail.com> - 2012-07-05 10:58 -0500
    Re: the registry Frank Swarbrick <fswarbrick@gmail.com> - 2012-07-05 21:42 -0600
      Re: the registry BGB <cr88192@hotmail.com> - 2012-07-05 23:35 -0500

csiph-web