I have no experience with it, but I remember seeing (and I just looked it up on CPAN:
http://search.cpan.org/author/TKISHEL/DBD-Multiplex-1.9/Multiplex.pm that Tim Bunce wrote DBD::Multiplex which gives simultaneous access to more than one datasource with one connect. Not sure if this solves your problem, but it might. HTH. -- Hardy Merrill Red Hat, Inc. Andy Crichton [EMAIL PROTECTED] wrote: > Hi, > How easy is it to transparently maintain 2 connections such that each > insert/update/delete type statement is executed on 2 connections and each > select... statement only on one (specified). Should one statement fail with > an error code other then NOT_FOUND then the connection would be marked bad > and ignored for all subsequent transactions. I can be certain that there > will be no transactions which update the same rows occurring concurrently > (i.e. no row-level locking would be required and there will only be one > attempt to modify any of these rows across both databases). The actual > number of updates would be small (mainly session/user information) but it > would be nice for global load balancing purposes if I could easily perform > this within the application rather than using (expensive �����) database > synchronisation. > > I want to have this scenario: > > GLB > / \ > / \ > App1 App2 > | \ _____ / | > | / \ | > DB1 DB2 > > > I can provide load balancing of the "app" servers but would like session > information to be persisted across both backend databases. Should one > database fail then both app servers would access a single database. > > I can easily solve the front end load balancing by using TCP/IP monitoring > to drive a bind name server. Has anyone already solved this problem on the > application level in perl or does this sound like a particularly bad idea to > try (and why)? > I am happy to expend some effort to get this working however I am more of > perl "user" rather than developer (I am a C programmer mainly). This is a > solaris platform (solaris7/8) and oracle databases are used however I > suspect something would be possible at the DBI level and so be platform > agnostic. > > Many thanks for your time and thoughts in advance. Any pointers would be > appreciated (even if you suspect I am a lunatic for even suggesting such a > thing). > > Andy Crichton
