RPM Community Forums

Mailing List Message of <rpm-devel>

Hierarchical data cache using UUID's

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 13 May 2008 - 17:45:42 CEST
Message-Id: <429456F9-E03E-4E6E-818D-6B56D8C1CF8C@mac.com>
One of the side effects of attempting rpm --queryformat extractor/ 
transformer
pipelines (see other mail, or think: uglix pipes) is that I needed a  
cheap
generator of binary/string data for shoving down the pipeline.

So I added a ':uud' formatter. Its now quite easy to generate a UUID
for all sorts of rpm metadata, including a UUIDv1 for almost all time
stamps (like RPMTAG_INSTALLTIME and RPMTAG_INSTALLTID),
as well as a UUIDv5 for package/header ID's (currently what is used
for the string needed to generate a UUIDv5 is the string
     http://rpm5.org/123456789abcdef123456789abcdef
where the "123..." string is either the header-only sha1 or
the header+payload md5).

Now I'd like to actually use UUID's (because they are rather
more "standard" and "universal" than what rpm has typically done)
for connecting objects into lists and trees.

Before I start hacking up an implementation, I thought I'd ask:

1) Is there an existing data model for a hierarchical store using  
UUID's?

     Note "model", not "implementation", please. I'm looking for a  
model first
     because real world data often has loops and other snarls that  
the assertions
     in a declarative model would help focus an implementaion.  
Certainly any/all
     hierarchical data models include the assertion
        Every object depends on its parent /predecessor containers.

2) Is there a tasteful "terminfo-like" implementation in C for a UUID  
name based content store?

      By "terminfo-like", I mean that the first few characters of the  
UUID name are used to create
     sub-directories where the UUID key:content pair is stored.  
Someone _HAS_ to have done
     this in C at some point, but I was unsuccessful in finding a  
useful implementation for
     a filesystem based UUID cache that I could swipe. Yes, lots of  
database and PHP based
     implementations around, just not a small/clean directory/file  
implementation in C.

73 de Jeff
Received on Tue May 13 17:47:09 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.