[postgis-devel] Common Code

Bryce L Nordgren bnordgren at gmail.com
Tue Aug 9 12:29:33 PDT 2011


On Tue, Aug 9, 2011 at 6:46 PM, Chris Hodgson <chodgson at refractions.net>wrote:

> I agree with Mark that if we can come up with a simple design for
> abstracting the caching API separately from postgres, that it would be nice
> to be able to test it outside of postgres.
>

I was suggesting to leverage the key/value store implemented by Berkeley DB,
not the SQL interface. Regardless of whether you depend on external code or
develop it yourself, you're talking about a "key-value store" (exposed by
Berkeley DB), or a "dictionary" (Python), or a "Map" (Java/C++). At a
minimum, you need to be able to compare key equality, even if you don't do
anything crafty with the organization of individual elements (e.g.,
hashing/sorting).

It's simple enough if to write custom caching code for each data type you
want to cache. But if you want polymorphism, you want a language other than
C. Implementation of a polymorphic design in a language which does not
support polymorphism is going to be anything but simple, and will probably
end up looking similar to this:

http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/frame_main.html

I was not able to quickly locate alternative C implementations of
"Map"/"Dictionary" in library form.

Bryce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110809/128235f8/attachment.html>


More information about the postgis-devel mailing list