InterIMAP Progress Update #2 April 21, 2008
Posted by atmospherian in InterIMAP.Tags: cache, dynamic, serialization, SMTP, xml
add a comment
Well i just got back from vacation where i took a break from all of my development projects. But now i am ready to get back up to speed with InterIMAP.
Dynamic Message Data
Over the weekend i implemented the dynamic message data architecture where the data for a message won’t be downloaded from the server until it is requested. Once any of the header fields are accessed, all the header data for that message is loaded into the object. If any of the data fields are accessed, then a seperate request is sent to get the body and attachments.
This is done to improve the speed at which the client can startup and run without incurring the overhead of loading all the message data for a given folder all at once.
One might say, well what if i need to iterate over all the messages in a folder looking for certain information? wouldn’t that cause all the message data to be loaded anyway? Technically, thats true, but i have an idea to implement search methods in the client wrapper that would allow you to search for text in various parts of the message, on the server directly and return a list of the messages that match that search. Once you have that list you would only be loading the data for a smaller set of messages.
Serialization
I also have an idea for (de)serializing folders to XML and binary formats to create local caches of messages much like Outlook does for Exchange. The idea would include a mechanism in the IMAPConfig class to specify the filename(s) of the cache files to load. Once the data is loaded from the cache, a synchronization could be run which would check each folder in the cache and on the server looking for new messages and adding those messages to the object model. Once in the object model, the folders would need to be reserialized.
This idea will hopefully provide another means of increasing the speed at which the client can interact with the server and reduce the number of requests that have to be sent back and forth. Please let me know what you think of this idea and whether it would be useful, or a waste of time.
SMTP?
I am also toying with the idea of including support for SMTP to provide a seamless method to forward messages to other addresses, and send new messages. More research will be needed before i make a final decision as to include this or not, stay tuned for further updates.
