> Now that I've written all that, I am sure that should happen in the
> database, in the replication code. It's just not likely to happen any
> time soon :-\
>
> Aaron
>   
You mean that it should be taken care of by stored procedures and the
like? That sounds really quite hard ;->
I'd do it this way. The "cluster management" is basically a separate
program can be written in something nice like python as its just a
director so absolute performance isn't required. Then all your "clients"
need to do is to know when they are going to save stuff to the database
which ones to save it too. This table could be kept up to date and
synched by the python director (i say python because its something i am
learning and can contribute with ;->). So it shouldn't be too bad.

The system already must have some concept of users? Otherwise how does
it know who to accept mail for? So basically the change becomes
something like this.


Check the table for the current "entity" (alias/user/whatever) and get a
list of places that needs to be written.
Wrap the existing writing functions with some sort of "super
transaction" function.
Send out the SQL writes.
If any write fails then rollback all transactions that were started.


For a read check the table and see which host is preferred for that
entity to read from. (The python director will keep the tables updated
to load balance etc)

The other option is to have the director queried per transaction on
where stuff should be written but I can see downsides to that. If the
director fails the whole system spits, if it fails and all the tables
are just left sitting there well the system keeps working and all is well.


I did at one stage post a method of getting this kind of scaling without
modifying the code. Basically a perdition proxy splits stuff off per
user to specific dbmail hosts. Your DB servers run multiple instances of
the DB server of your choice. Then the database hosts replicate one
other database. IE server A replicates B, B replicates C and C
replicates A. (all the replication is done by the second db on each
host.) so 3 systems gives you the performance of 2 systems and the
reliability of 2 systems (RAID 5)

Its a lot of mucking about to configure though. If you could just tell
the director "here is a new database install, it has MySQL (usr, pwd) go
and make that work" it'd be nice ;->

Hmm adding to that thought. I wonder if its possible to somehow network
configure a dbmail front end. The big thing at the moment seems to be
the ability to dynamically add power to any task that needs it. (In the
big end of town)
Through virtualisation or whatever "switch on" a bunch more webservers
when they are needed. If a dbmail/spamassain/whatever vmware/xen image
was created that would just wakeup talk to the server to get its config
and start processing emails it might do well.

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to