Hi Sri, On Wed, 02 Aug 2006, ext Sriram Ramkrishna wrote: > Anytime friday I think. I'll let people know to expect one from you. > Thanks so much for writing!! Here it is. If you have any questions, pls try djcb djcbsoftware nl or IM: djcb jabber org, as I probably won't read my Nokia e-mail. Best wishes, Dirk.
[1] Philip, talking at GUADEC |
Great. However, all this requires quite a bit of memory. Tens of megabytes for moderate amounts of e-mail. Now, there's a lot of memory in your desktop PC, but what about an 'embedded' device? For example, the Nokia 770 Internet Tablet. Or the One-Laptop-per-Child (OLPC) machine? In such devices, we need to be very careful with the memory usage. Also, they usually require user-interfaces which are very different from the one Evolution offers - if only for the much smaller screen sizes. So, what if we took the mature, non-UI parts of Evolution, cut down on the memory usage, and made it possible to have customized user-interfaces? Wouldn't that be great for embedded devices, and even for low-end PCs?
That is exactly what Philip van Hoof did.
Recently, Philip has been looking into the area of e-mail libraries. He wanted to explore ways of using the e-mail protocol parts of Evolution in a more memory-efficient way. He named the resulting framework after his girlfriend, Tinne. Thus, Tinymail (pronounced Tinniemail) was born. It's an abstraction layer on top of libcamel (the library on which Evolution is built).
[2] the Tinymail test UI. running on the Nokia 770 |
But Tinymail goes one step further. If you are browsing through your mail headers, you don't need to have all of them in memory. You only need the ones that you can currently see. Tinymail does some clever tricks with the way it lists messages (using the so-called Proxy design pattern), so that it only allocates memory for the ones that you can actually see; the memory for all the other ones is reduced to the very minimum. While this sounds a bit slower than keeping everything in memory, in practice it does not seem a problem. Even on devices like the Nokia 770, you can smoothly scroll through thousands of messages. A reason for this might be that the less memory use in itself gives performance benefits, due to better cache usage.
For example, Tinymail has an interface for displaying e-mails (TnyMsgIface). It also supplies different implementations for this interface - GtkTextView and Mozilla. You can have your e-mail program display messages in either of those, whatever is the best for the specific situation. But you might still want something else. For example, others have written a GtkHTML-implementation. Tinymail does not even have to know it exists. It will use whatever the client programmer specifies, as long as it conforms to the TnyMsgIface-interface.
As another example, Tinymail provides the TnyDeviceIface, which is in abstraction of the network connection of a system. If your e-mail program needs to get online, you can 'ask' through this interface. And it does not matter wat the actual implementation looks like. Tinymail comes with a TnyDeviceIface for the NetworkManager in GNOME. Other people are working on implementations for other devices.
Such software-Lego sounds like some long-foregone dream from the mid-nineties. But in Tinymail it actually works quite nicely. Of course, there are limits to the syntactic sugaring that the C programming language can do for you. As with all GObject-based code, there is a lot of explicit up and downcasting of pointers involved. And a lot of boilerplate code. Furthermore, writing software with a framework requires a bit more of the programmer than using a simple library. Instead of just calling a bunch of library functions, the software enters into some symbiotic relationship with Tinymail, which requires you to do things in a certain way.
[3] "modest", an (unreleased) e-mail program, based on Tinymail |
So, if you are working on a new e-mail client (aren't we all), you should take a look at Tinymail. It does take some time to get familiar with it, especially if you are not fluent with GObject. Also, Tinymail has not seen an official release yet, and API changes are to be expected. Still, the framework is well designed, fairly complete, and is released under the LGPL license. Furthermore, it comes with a lot of documentation and unit-tests.
Even if you are not writing your own e-mail client, or are not a programmer at all, Tinymail can benefit you. The project has sparked a lot of new interest and improvements, which will benefit all Evolution-users. Philip has made additional impressive memory reductions to Evolution (not depending on Tinymail), using mmap. At the same time, Ross Burton saved more megabytes by killing of unnecessary copies of libraries. This will all result in a meaner and leaner Evolution - a nicer experience for all users. It's also shows how the work on GNOME for embedded devices ultimately benefits all GNOME-users.
This article only gave a short overview of Tinymail. If you want to find out more, you can visit the Tinymail website, join the mailing list,... Tinymail is still under heavy development, so this is the time where you can make a change!
Attachment:
philipvh.jpeg
Description: JPEG image
Attachment:
tinymail770.jpg
Description: JPEG image
Attachment:
modest2.png
Description: PNG image