Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2007 18:58:58 -0600
From:      Brooks Davis <brooks@freebsd.org>
To:        Garrett Cooper <youshi10@u.washington.edu>
Cc:        hackers@freebsd.org
Subject:   Re: BSD license compatible hash algorithm?
Message-ID:  <20071228005858.GC48997@lor.one-eyed-alien.net>
In-Reply-To: <B8D4C3C6-B867-4550-9F17-4DC6930D10E2@u.washington.edu>
References:  <5950EE0C-383D-4D6B-9991-A0DEABD2ADE4@u.washington.edu> <20071228003716.GB48997@lor.one-eyed-alien.net> <B8D4C3C6-B867-4550-9F17-4DC6930D10E2@u.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Thu, Dec 27, 2007 at 04:47:26PM -0800, Garrett Cooper wrote:
> 
> On Dec 27, 2007, at 4:37 PM, Brooks Davis wrote:
> 
>> On Thu, Dec 27, 2007 at 04:30:40PM -0800, Garrett Cooper wrote:
>>> Hi all,
>>> 	Just wondering if anyone knew of a good BSD license compatible key-based
>>> hash placement / retrieval algorithm that was available anywhere.
>>> 	I'm looking for a reliable way to lookup objects to see if a given 
>>> action
>>> would be performed in my revised pkg_install(1), to thus efficiently
>>> pre-plan out the installation dependencies and fully utilize
>>> multiprocessing capabilities of contemporary machines / eliminate 
>>> duplicate
>>> dependency install requirements.
>>> 	I know I can use tree structures or hash(3), but I want to avoid trees
>>> (inefficient with large data sets of course) and I was looking for a
>>> non-BDB based solution (for right now, with this given structure as I 
>>> don't
>>> want to write everything to disk). Later on it might be a good idea to
>>> cache the results using BDB on disk, but for now I was just wondering if
>>> there were any non-BDB based hashing solutions that anyone knew of.
>> 
>> We imported hash(9) from Open/NetBSD recently.  It may do what you want.
>> 
>> -- Brooks
> 
> Brooks,
> 	Looks promising, but how difficult would it be to port the code to other 
> platforms (Win32 for instance?). If possible (and this is lower prio 
> because FreeBSD has a lot more apps available as pkgs / ports compared to 
> Win32), I'm looking for a solution that would be easily portable, as I'm 
> trying to effectively kill two birds with one stone by programming an 
> equivalent generalized app / infrastructure for my current job (large scale 
> Windows administration and staying on top of software updates is a pain 
> with and without M$ products), and maybe for open market as well.

Why not try compiling it there?

If you're looking from a hash algorithm for pkg_install(1) you'll need
a good technical reason why you can't use sys/hash.h and need to import
something else.

-- Brooks

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFHdEpSXY6L6fI4GtQRAmUKAKCfiBw453p/1mVYlUBybJIoypZlFwCfTGvr
geTmyTGW63bv1WW8A47p/48=
=v8w6
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071228005858.GC48997>