Re: RFC mailbox interface



On 2001.11.23 00:41 Carlos Morgado wrote:
>> The message is already displayed in an index. Therefore, a _Message 
>> structure is in memory already. The headers have been loaded ans parsed, 
>> but there is no associated message data. The _Message is a memeber of 
>> one or more VFolders, in addition to the main folder it's in. If you 
>> want to copy it to memory before deleting it from disk, all you need to 
>> do is
> 
> copy to mem = copy to cache right ?
> 
More or less. Allocating a chunk of core and copying the message there.

>> delete it from it's source mailbox. At that point the lib will see that 
>> the message's last on-disk copy is about to be deleted , but the message 
>> is
> 
> last on-disk ? can the same message be in several mailboxes and still be 
> the
> *same* message ?
> 
YES! Sorry for yelling, but you finally caught on. A decent MUA should 
_not_ allow editing of received messages. Therefore, a received message can 
be considered an immutable entity. A fingerprint of it will alöways 
uniquely identify it. Therefore the message may exist in several different 
places on disk, but, for my argument, is just one message. The message 
itself, seen as one entity stored in several different places, does not 
need to be loaded from the place the user thinks it would be, but can be 
loaded from anyplace the lib determines to be fastest. So, if I have, at 
some time in the past, copied a message from an IMAP folder to a local 
folder and I now browse the IMAP folder and double-click the message, it 
will be loaded from the local folder because that's faster. By virtue of 
the fingerprint the locally stored message (yes, stored in an unrelated 
folder!) is identified as being _identical_ to the remotely stored one, and 
the faster storage is accesses to read the message.
Message without a fingerprint are given one and can be handled the same way 
from there on in. This is a far different way from the way most people 
think of mail, but I did borrow some concepts from the BeOS filesystem 
here....
Mail is data, a "message" is not a holy cow. If a message is assumed to be 
an immutable entity, several copies of the same message can be exchanged 
transparently for efficiency reasons. That's the idea.

> This doesn't look very sound from the UI point of view. How does the user
> know where the message *is* ? Will it go away if he exits balsa ? Will it
> go away when he purges the cache ?
> 
The user sees the message in a folder. It actually _is_ in that folder, but 
it may be in several others as well. It's also shown there. Does it matter 
which of the identical copies is actually accessed when reading it?
Messages held in memory (stored in a VFolder only) will go away when the 
user exits Balsa or closes the VFolder.

> and at this point you walk the folder right ?

Yes. I delete it from all folders seen as virtual. See the more expanded 
example in my other mail.

Melanie



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]