Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

DBIx::HA

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


clrrsnd at gmail

Oct 13, 2011, 6:39 AM

Post #1 of 13 (510 views)
Permalink
DBIx::HA

Hi all,

I need to be able to failover between two database backends.

The DBIx::HA seems to be the right tool to that, but how to use it with
Catalyst?

Does anybody have experience setting this up?

Thanks,

Meindert


peter at dragonstaff

Oct 13, 2011, 7:31 AM

Post #2 of 13 (500 views)
Permalink
Re: DBIx::HA [In reply to]

>I need to be able to failover between two database backends.

If you are using DBIx::Class it will reconnect stale database handles, so as
long as your failover uses the same DSN hostname it should just work.



> The DBIx::HA seems to be the right tool to that, but how to use it with
> Catalyst?
>
> You can use any database backend you like with Catalyst, check out the
Model configuration part of the Catalyst manual.
That particular module needs Apache::DBI so won't be compatible with
DBIx::Class though.

Regards, Peter


clrrsnd at gmail

Oct 13, 2011, 7:48 AM

Post #3 of 13 (501 views)
Permalink
Re: DBIx::HA [In reply to]

On Thu, Oct 13, 2011 at 4:31 PM, Peter Edwards <peter [at] dragonstaff>wrote:

> >I need to be able to failover between two database backends.
>
> If you are using DBIx::Class it will reconnect stale database handles, so
> as long as your failover uses the same DSN hostname it should just work.
>


That would be nice, but unfortunately it does not work like that over here
(and I cannot do anything about that).



>
>
>> The DBIx::HA seems to be the right tool to that, but how to use it with
>> Catalyst?
>>
>> You can use any database backend you like with Catalyst, check out the
> Model configuration part of the Catalyst manual.
> That particular module needs Apache::DBI so won't be compatible with
> DBIx::Class though.
>


Isn't there another way achieve this, with DBIx-Class, similar to what the
HA module does?

Thanks

Meindert


cub.uanic at gmail

Oct 15, 2011, 5:54 AM

Post #4 of 13 (496 views)
Permalink
Re: DBIx::HA [In reply to]

2011/10/13 clara resende <clrrsnd [at] gmail>:
>
>
> On Thu, Oct 13, 2011 at 4:31 PM, Peter Edwards <peter [at] dragonstaff>
> wrote:
>>
>> >I need to be able to failover between two database backends.
>> If you are using DBIx::Class it will reconnect stale database handles, so
>> as long as your failover uses the same DSN hostname it should just work.
>
> That would be nice, but unfortunately it does not work like that over here
Why? Impropely configured DNS?


> (and I cannot do anything about that).
It's not true. Even if your DNS server working not as you need - you
always can setup your own local BIND, configure it to use round-robin,
configure new zone in it, add all your database hosts under same
hostname, and everything will be fine. But I think such details are
out of scope this mailing list.


>>> The DBIx::HA seems to be the right tool to that, but how to use it with
>>> Catalyst?
>>>
>> You can use any database backend you like with Catalyst, check out the
>> Model configuration part of the Catalyst manual.
>> That particular module needs Apache::DBI so won't be compatible with
>> DBIx::Class though.
>
> Isn't there another way achieve this, with DBIx-Class, similar to what the
> HA module does?

May be, DBIx::Class::Storage::DBI::Replicated ?...

--
Sincerely yours,
Oleg Kostyuk (CUB-UANIC)

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


clrrsnd at gmail

Oct 15, 2011, 10:42 AM

Post #5 of 13 (495 views)
Permalink
Re: DBIx::HA [In reply to]

On Sat, Oct 15, 2011 at 2:54 PM, Oleg Kostyuk <cub.uanic [at] gmail> wrote:

> 2011/10/13 clara resende <clrrsnd [at] gmail>:
> >
> >
> > On Thu, Oct 13, 2011 at 4:31 PM, Peter Edwards <peter [at] dragonstaff>
> > wrote:
> >>
> >> >I need to be able to failover between two database backends.
> >> If you are using DBIx::Class it will reconnect stale database handles,
> so
> >> as long as your failover uses the same DSN hostname it should just work.
> >
> > That would be nice, but unfortunately it does not work like that over
> here
> Why? Impropely configured DNS?
>
>
> > (and I cannot do anything about that).
> It's not true. Even if your DNS server working not as you need - you
> always can setup your own local BIND, configure it to use round-robin,
> configure new zone in it, add all your database hosts under same
> hostname, and everything will be fine. But I think such details are
> out of scope this mailing list.
>
>

I'm a mere appplication developer, I don't even have access to the
production boxes (unfortunately ...).




>
> >>> The DBIx::HA seems to be the right tool to that, but how to use it with
> >>> Catalyst?
> >>>
> >> You can use any database backend you like with Catalyst, check out the
> >> Model configuration part of the Catalyst manual.
> >> That particular module needs Apache::DBI so won't be compatible with
> >> DBIx::Class though.
> >
> > Isn't there another way achieve this, with DBIx-Class, similar to what
> the
> > HA module does?
>
> May be, DBIx::Class::Storage::DBI::Replicated ?...
>
>
That looks promising, thanks for the suggestion.

Meindert


bobtfish at bobtfish

Aug 24, 2012, 11:13 AM

Post #6 of 13 (361 views)
Permalink
Re: DBIx::HA [In reply to]

On 24 Aug 2012, at 08:34, Theo Bot wrote:
> How do I implement the DBIx::HA module for using a dual-master mysql implementation?

No idea, but I know it's not relevant to catalyst, as you're going to do this outside Catalyst and bind it in with a Catalyst::Model::Adaptor, right? :)

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


theo.bot at proxy

Aug 25, 2012, 2:41 AM

Post #7 of 13 (355 views)
Permalink
Re: DBIx::HA [In reply to]

Hi

I already create a model with the ..._create.pl script. But I want to use a
dual-master mysql setup. And I want the application server to be able to
failover over to a back-up server.

Theo

On Fri, Aug 24, 2012 at 8:13 PM, Tomas Doran <bobtfish [at] bobtfish> wrote:

>
> On 24 Aug 2012, at 08:34, Theo Bot wrote:
> > How do I implement the DBIx::HA module for using a dual-master mysql
> implementation?
>
> No idea, but I know it's not relevant to catalyst, as you're going to do
> this outside Catalyst and bind it in with a Catalyst::Model::Adaptor,
> right? :)
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>



--
Met vriendelijke groet,

Theo Bot
Network Management Engineer
Tel: +31653965698
e-mail: theo.bot [at] proxy
Website: http://www.proxy.nl
LinkedIn: http://www.linkedin.com/in/theobot


bobtfish at bobtfish

Aug 25, 2012, 5:07 AM

Post #8 of 13 (354 views)
Permalink
Re: DBIx::HA [In reply to]

On 25 Aug 2012, at 10:41, Theo Bot wrote:

> I already create a model with the ..._create.pl script. But I want to use a dual-master mysql setup. And I want the application server to be able to failover over to a back-up server.

Yes, and this functionality is nothing to do with Catalyst, so I don't see how Catalyst is relevant here ;)

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


theo.bot at proxy

Aug 26, 2012, 1:49 AM

Post #9 of 13 (353 views)
Permalink
Re: DBIx::HA [In reply to]

Tom

You are right. It's an DBIC issue. Do you happen to know where I csn
address this issue?

Regards

Theo

On Sat, Aug 25, 2012 at 2:07 PM, Tomas Doran <bobtfish [at] bobtfish> wrote:

>
> On 25 Aug 2012, at 10:41, Theo Bot wrote:
>
> > I already create a model with the ..._create.pl script. But I want to
> use a dual-master mysql setup. And I want the application server to be able
> to failover over to a back-up server.
>
> Yes, and this functionality is nothing to do with Catalyst, so I don't see
> how Catalyst is relevant here ;)
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>



--
Met vriendelijke groet,

Theo Bot
Network Management Engineer
Tel: +31653965698
e-mail: theo.bot [at] proxy
Website: http://www.proxy.nl
LinkedIn: http://www.linkedin.com/in/theobot


catalyst at iandocherty

Aug 26, 2012, 2:37 AM

Post #10 of 13 (352 views)
Permalink
Re: DBIx::HA [In reply to]

On 26 August 2012 09:49, Theo Bot <theo.bot [at] proxy> wrote:

> Tom
>
> You are right. It's an DBIC issue. Do you happen to know where I csn
> address this issue?
>
> Regards
>
> Theo
>
>
> Theo
The approach I always take in these circumstances is to use CPAN search to
find the
module in question and then look to see where I go for support. It usually
works for me.

http://search.cpan.org/~frew/DBIx-Class-0.08200/lib/DBIx/Class.pm

Kind Regards
Ian


spamcatcher at thiemeier

Aug 26, 2012, 4:02 AM

Post #11 of 13 (352 views)
Permalink
Re: DBIx::HA [In reply to]

Hi Theo,

Take a look at "Getting Help and Support" on

http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class.pm

cheers, Lukas

On 08/26/2012 10:49 AM, Theo Bot wrote:
> Tom
>
> You are right. It's an DBIC issue. Do you happen to know where I csn
> address this issue?
>
> Regards
>
> Theo
>
> On Sat, Aug 25, 2012 at 2:07 PM, Tomas Doran<bobtfish [at] bobtfish> wrote:
>
>>
>> On 25 Aug 2012, at 10:41, Theo Bot wrote:
>>
>>> I already create a model with the ..._create.pl script. But I want to
>> use a dual-master mysql setup. And I want the application server to be able
>> to failover over to a back-up server.
>>
>> Yes, and this functionality is nothing to do with Catalyst, so I don't see
>> how Catalyst is relevant here ;)
>>
>> Cheers
>> t0m
>>
>>
>> _______________________________________________
>> List: Catalyst [at] lists
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst [at] lists/
>> Dev site: http://dev.catalyst.perl.org/
>>
>
>
>
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Aug 26, 2012, 6:58 AM

Post #12 of 13 (353 views)
Permalink
Re: DBIx::HA [In reply to]

On 26 Aug 2012, at 09:49, Theo Bot wrote:
> You are right. It's an DBIC issue. Do you happen to know where I csn address this issue?
>

I'd start with the places documented by DBIC for help with DBIC :)

https://metacpan.org/module/DBIx::Class#GETTING-HELP-SUPPORT

Although I have to say I don't particularly see how this is related to DBIx::Class either, given DBIx::HA isn't part of that either - however I'm sure that they're more likely to have answers, and/or be able to tell you if using one with the other is possible...

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


jjn1056 at yahoo

Aug 28, 2012, 11:24 AM

Post #13 of 13 (340 views)
Permalink
Re: DBIx::HA [In reply to]

For what it's worth, when I was working on multi database / replication support for DBIC, I looked at DBIx::HA and a bunch of other things and nothing really did the job.  We ended up building master-slave replication into DBIC for mysql.  I think it would not be very hard to update that code to support a multi - master approach.  I'd start by looking at all the ::Replication stuff in DBIC and seeing the test case for it as well.

john





>________________________________
> From: Tomas Doran <bobtfish [at] bobtfish>
>To: The elegant MVC web framework <catalyst [at] lists>
>Sent: Sunday, August 26, 2012 9:58 AM
>Subject: Re: [Catalyst] DBIx::HA
>
>
>On 26 Aug 2012, at 09:49, Theo Bot wrote:
>> You are right. It's an DBIC issue. Do you happen to know where I csn address this issue?
>>
>
>I'd start with the places documented by DBIC for help with DBIC :)
>
>https://metacpan.org/module/DBIx::Class#GETTING-HELP-SUPPORT
>
>Although I have to say I don't particularly see how this is related to DBIx::Class either, given DBIx::HA isn't part of that either - however I'm sure that they're more likely to have answers, and/or be able to tell you if using one with the other is possible...
>
>Cheers
>t0m
>
>
>_______________________________________________
>List: Catalyst [at] lists
>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
>Dev site: http://dev.catalyst.perl.org/
>
>
>

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.