[clug] access control list search algorithms

jm jeffm at ghostgun.com
Sat Apr 4 00:54:19 GMT 2009



Paul TBBle Hampson wrote:
> Key-value DB or equivalent is prolly the best you're going to get,
> although you're really looking at doing up to four lookups:
> sender-recipient, sender-*, *-recipient, *-* (default).
>
> If you're looking at more interesting wildcards... Then maybe not. But
> wildcards are _always_ gonna be slow. If you limit it to *@example.org
> then you're just adding another... 4 lookups at the worst case.
>
> If you're doing this for Postfix's policy support thing, then that's
> prolly sufficient. You might even be able to mangle postmap into doing
> the db generation for you.
>   
That's pretty close to what I'm attempting. The only reason really to 
use a database is that it saves me from parsing a file, is easier to 
interact with, helps mantain consistancy of the data, gives me 
persistence and gives me replication for free.

Given that one of the other modules I'm yet to write has to do a lookup 
in a remote database. I've came to the conclusion that no matter how 
unoptimised this code or ugly it is it's still going to be faster than 
that module.
> Someone needs to invent a regexp-value DB maybe... Pregenerate hashes
> for certain common regexps?
>
>   
There's a long list of things which "need" to be invented.


Jeff.



More information about the linux mailing list