[exim-dev] New exim lookup suggested to access Tokyo Tyrant

Top Page
Delete this message
Reply to this message
Author: Michael Haardt
Date:  
To: exim-dev
Subject: [exim-dev] New exim lookup suggested to access Tokyo Tyrant
Hello,

I suggest to add a new lookup that accesses Tokyo Tyrant. For those not
aware of it yet: It is a network layer to access Tokyo Cabinet, which
in best described as a modern DBM library, although not API compatible
with *dbm* libraries. Read more at

http://1978th.net/tokyotyrant/

I suggest this lookup syntax:

${lookup tyrant {[server=tyrant.example.com[:port]] [parse=0|1] function
        [param ...]} {}{} }


[server=tyrant.server.org[:port]]:
Optionally specifies a tyrant server (and port) to connect to. If not given
the value of 'tyrant_default_servers' is used.

[parse=0|1]:
If enabled (=1) the lookup will parse the result from the tyrant server. This
means null separated key value pairs are converted to key="value". For example
'name\0foo\0info\0bar' will get 'name=foo info=bar'.

function:
Name of the function of the Tyrant API to be called.

[param ... ]:
This can be one or more parameters for the called API function. The number of
parameters and their meaning depends on the function called.

Right now, only the function "ext" is implemented to access extensions,
the parameters are extension name, key and value. "get" will be added
soon.

I don't particularly like the parse hack, but Tyrant only delivers a
single data set and, like *dbm, and ignores its content and structure.
NUL separating is easy, but Exim can't deal with NULs in strings,
otherwise it would have been subject to a new string operator.
Better ideas are welcome.

So far Tyrant (and Cabinet) look like the most promising open source
software I have seen in years, and it just asks to be combined with Exim.

Michael