[Dovecot] Using MySQL to store email?

Simon Waters simonw at zynet.net
Wed Jun 7 15:23:46 EEST 2006


On Wednesday 07 Jun 2006 12:44, Timo Sirainen wrote:
>
> As for
> multi-master replication, what databases really support that? I think
> with Oracle it supports it only when the filesystem itself is already
> shared between the computers, and Dovecot already supports running in
> shared filesystems, so Oracle would be just extra overhead there.

Oracle supports (well version 7 and 8) support a multimaster replication 
strategy, the only requirement was reasonable network connection between 
instances. It uses a distributed transaction model, so the masters just queue 
up transactions which are then pushed by existing Oracle mechanisms to send 
remote updates to other servers.

For email, which has a relatively simple state model, and mostly small updates 
(excluding "new email"), delete message, mark read, mark replied, change 
folder attribute, it could be made to work well (at least till people are 
different sites file the same email in different folders at the same 
time ;-). It would be simple also to do a read mostly copy, so that say email 
attachments are mirrored readonly at farflung sites, removing the multimaster 
requirement, but still speeding up the "read the email with big 
attachment" (which for most wide area networks is the main pain -- Lotus 
Notes anyone?)

Not sure what the point would be of multimaster rep for email, as it is likely 
to push up the resource requirements. I don't see a scenario where it is 
likely to help, unless you have a lot of email boxes that are shared at two 
sites with poor connectivity between them, but which change slowly. Lotus 
Notes has to be better at something - possibly ;)

We used Oracle replication to push the active master closer to the end user, 
for a 'follow the sun' helpdesk, it was probably more trouble than it was 
worth even so. But I did get to do the Oracle Advanced Replication course, 
which was educational. Mostly I learnt that multimaster replication can be 
deployed with simple and robust tools, and that from an application design 
perspective trying to use it is almost always a mistake since it introduces 
various subtle constraints on the applications use of the database, and can 
cause you to have a lot of out of sync databases in various far flung corners 
of the world, and spend a lot of time and effort getting them all back in 
sync.


More information about the dovecot mailing list