Index
All Packages
All Categories
By Author

ap (3)
cp (3)
dp (3)
exe (3)
gui (0)
gui/gtk (0)
gui/tk (4)
io (1)
lib (11)
math (0)
net (9)
nlp (18)
op (4)
os (2)
program (3)
sp (2)
tool (9)
wp (2)
xml (2)

Twikistore

type:package
id:mogul:/keving/net/twikistore
section:mogul:/keving/net
version:1.0
blurb:Use a Twiki page as a global, persistent dictionary
authors:Kevin Glynn
Bruno Carton
category:dp, net
download:keving-net-twikistore__1.2.5__source__1.0.pkg
keving-net-twikistore__1.3.0__source__1.0.pkg
provides:x-ozlib://keving/net/TwikiStore.ozf

This package uses a Twiki page as a global, persistent dictionary. It assumes that the Twiki page is updateable by the TwikiGuest account (I set up a default Twiki service with Debian and this happened automatically, but YMMV).

To use, simply import the TwikiStore.ozf functor and start using:

functor
import TwikiStore at 'x-ozlib://keving/net/TwikiStore.ozf'
define
     ...
   UploadTwikiCacheURL = 'http://twikihost/cgi-bin/twiki/upload/Main/ScratchArea'
   GetTwikiCacheURL = 'http://twikihost/cgi-bin/twiki/view/Main/ScratchArea'
     ...
   {TwikiStore.store UploadTwikiCacheURL Key OzValue}
     ...
   OzValue = {TwikiStore.get GetTwikiCacheURL Key}                                            
     ...
end
Key is an atom under which a pickle of the value is stored. The values are stored as attachments on the Wiki page. Every update causes the twiki page to create a fresh revision (and there is no garbage collection!). But I find it useful for my purposes.