Hi Adi,

Let me be the next to pile on and say this is a great idea.  What you are 
describing is session consistency, which seems like a very promising load 
balancing model.  We are currently working on the same thing for our SQL Router 
JDBC driver.  (See http://forge.continuent.org/jira/browse/TSR-8)

To make SCNs work over failovers you will probably need to add something like 
an epoch number-at least that's how we do it on our replicator; there are no 
doubt other ways.   Each transaction has an ID that looks like the following:

<epoch #><SCN>

When each master increments the epoch number each time it comes online, which 
gives you monotonically increasing numbers albeit with gaps between them each 
time a master starts replicating.

Incidentally, another way to pass the SCN back would be to have a function 
similar to last_insert_id() that gives you the last SCN on a connection.  This 
seems more flexible because it would allow drivers to get this information 
without having to make calls that break standard interfaces like JDBC, DBI, and 
ODBC.

Cheers, Robert

On 4/30/09 4:46 PM PDT, "MARK CALLAGHAN" <[email protected]> wrote:

On Thu, Apr 30, 2009 at 4:06 PM, Adi Alurkar <[email protected]> wrote:
> Greetings,
> It was great to meet everybody at Developer day. I have been catching up
> with all the docs on the protocol and discussing them with our CTO and in
> the last brainstorm with him we realized that although the proposed protocol
> offers great enhancements in terms of exposing shard id / QUERY / QUERY_RO
> in the protocol itself, the following idea would make it even better.
> To simplify and explain the problem consider the following architecture:
> (also note that this would apply to sharded DBD scenario as well)

At a functional level this is a great problem to solve. We frequently
remind users to direct queries to slaves when possible. That is not a
good use of my time or the users time. I want to automate this in
software without a significant overhead and without putting (and then
managing) an additional set of processes between clients and servers.

--
Mark Callaghan
[email protected]

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp


--
Robert Hodges, CTO, Continuent, Inc.
Email:  [email protected]
Mobile:  +1-510-501-3728  Skype:  hodgesrm

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to