Aaron Stone wrote:
> On Tue, 2007-06-05 at 23:03 +1000, Jake Anderson wrote:
>   
>>> 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 ;->
>>     
>
> The algorithms are out there and well-known, and databases already have
> replication code intended for full-sync between nodes.
>
>   
Thats the problem though we only want a partial sync.
I wonder if it could be "solved" through "views".
IE make a dbmail_A_foo set of tables and a dbmail_B_foo
Then make a view that is dbmail_foo which combines A and B
Then let the db itself take care of replicating the A and B tables with
different servers.
Writes would have to go into one or the other still i think?

>> 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.
>>     
>
> That could certainly work.
>   
w00t something i can help with ;->
>   
>> 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.
>>     
>
> Thinking some more, with foreign keys, the database can keep track of
> which rows in which tables should have 'affinity' to be distributed out
> out to the same nodes in the database cluster.
>   
mmmm it would make a rebuild easier, I don't know of any db that does
that though.
hmmm i wonder if you can replicate a view into a table?

> Getting transactions right is another thing we have to work on. There
> is no support for nested transactions, only savepoints, and we're not
> yet savepoint aware throughout the code.
>
>   
I don't really understand a "nested transaction" as such.
I was thinking that most read/writes would be fairly atomic? And it
would be not too hard to wrap those functions within another that
executed several?

> This is how memcache works -- then if you check out the Chord
> distributed cache, it adds the logic for determining which host has your
> data, something that memcache intentionally leaves to the application to
> figure out.
>   
I had a look at chord and it seems more P2P than we need, that seems
like it would introduce a whole bunch of issues that one "big bad boss"
can take care of just by knowing everything. The scaling i have in mind
is more the 40 servers not the 40 000 server range ;-> Even then you
would probably just split your directors into layers.
>   
>
> This is pretty much the recommended HA setup, see the paper on
> dbmail.eu.
>   
I looked at that one but with the setups there (as i recall) you never
get a performance boost from the redundant servers.

> Do you also have a map to find the Holy Grail? :-P
>   
Sure i also own a bridge if your interested in making a purchase ;->
>
> I'm not sure if this is any more useful than just making a bunch of
> config files and passing '-f /etc/dbmail/nodename.conf'.
>   
I did not know of that option. A nfs share and yer done.
I'm just wondering how you can add servers super easily though. Perhaps
some client of the cluster could broadcast for directions on what
servers to use etc and automagic up a conf file for both mysql and
dbmail (if installed) and it would then start those services.

I spose the be-all and end-all would be install dbmail,
dbmail-cluster,mysql select the mode of the client (IE is a dbmail only,
mysql only, can do both) and then just let the cluster manager add it to
the pool. The cluster client could then report the capabilities of the
server its on to the server and the server can decide how best to use
the client. Heck it could dynamically shift clients as loads changed IE
at a big ISP. 9:00AM your nodes are split to favor imap usage patterns
(ie 50/50 database/dbmail) then at 6:30 when everybody gets home and
checks their POP3 you can run mostly dbmail (or whatever i'm just
"spitballing" here). Though a big upside i see is that you don't need to
match your servers. Any system you add to the pool will add to your
performance in a fairly linear fashon.
Add a new big server to your system and bing performance goes up lots.
Add that P2 you found under your desk and it goes up a little.

Its the "system that grows with you" if you can go from a single install
to a cluster with HA, ~2X the performance just by adding hardware with
no down-time and minimal effort, it sounds *really* good to me ;->

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

Reply via email to