Testing the waters.

Kelly Murray kem@Franz.COM
Fri, 09 May 1997 11:12:36 -0700


> (let ((mf (mail-folders *root*)))
>   (set-my-folder! *root*
>     (filter (lambda (item)
>                (and (equal? (from item) "Fred Smith")
>                     (match (subject item) ".*LispOS.*")))
>	(get-my-folder mf))))

AllegroStore and "KellyStore" (my secret internal code name for my version)
does not have a *root* object, like Objectstore does.
We have inverse functions, that take slot values and return the
one or many CLOS instances that have the given value for the slot

The code for deleting all the mail from "Fred Smith" on the LispOS
would probably look like this (forgive my use of SilkScript :)

(with-transaction ()  
  (let kem = (user-from-username "kem")  ;; inverse function 
       fred = (user-from-fullname "Fred Smith") ;; assume Fred exists
    do
    ;; loop "knows" how to interate over a mail folder object
    ;; or it can be a simple list.
    (loop for mail-message in (user-mail-folder kem "LispOS")
       do
       (if (eq (mail-message-from mail-message) fred)
          then (delete-instance mail-message)
       ))))

When the transaction is committed (with-transaction completes)
fred's mail is adios.  The code inside with-transaction may be
restarted from the beginning if deadlock occured when trying to
get the write lock to change kem's LispOS mail folder.

This code assumes the database containing the mail and users are
accessible, and their is permission to modify (e.g. delete)
the kem mail objects.  
The details on this aspect are still under
development/consideration/investigation, but using 
the old single-address-space-everything-is-accessible-to-all LispM model,
they would just be there.  I'm thinking of a different approach than this.

-Kelly Edward Murray