FAQ
Hello,

I connect to a local sqlite db.
The data is being retrieved roughly like this:

my $rs = $c->model('MyAppDB::Table1')->search(
undef,
{
prefetch=>{
'rel1'=>{'rel2'=>['table4','table5'] } },
select=>['me,id','me.pd'],
as=>[qw/id pd/],
},
);

while (my $row = $rs->next) {
....
}

That's ok.
But If I try to connect remotely through DBD::Proxy, the Catalyst
application emits the following error:

DBIx::Class::ResultSet::next(): DBI Exception: DBD::Proxy::db ping
failed: Unexpected EOF while waiting for server reply at
/usr/local/lib/perl5/site_perl/5.8.8/RPC/PlClient.pm line 110.

Without prefetch, there is no error. Is it possible (and which way) to
retrieve data from a remote db via proxy with Catalyst?

Thanks.

--
Radek

Search Discussions

  • Matt S Trout at Oct 12, 2007 at 6:48 pm

    On Fri, Oct 12, 2007 at 11:50:01AM +0200, rahed wrote:
    Without prefetch, there is no error. Is it possible (and which way) to
    retrieve data from a remote db via proxy with Catalyst?
    Yes, use a database that's network capable like mysql or postgres.

    Trying to use DBD::Proxy for this is a -heinous- hack and almost certainly
    not going to work (::Proxy is kinda limited, it doesn't supply half the DBI
    API ... really, don't try this. I've just about made it work, once, but it
    was far far FAR too painful for words)

    --
    Matt S Trout Need help with your Catalyst or DBIx::Class project?
    Technical Director http://www.shadowcat.co.uk/catalyst/
    Shadowcat Systems Ltd. Want a managed development or deployment platform?
    http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
  • Rahed at Oct 13, 2007 at 1:07 pm

    On 10/12/07, Matt S Trout wrote:
    On Fri, Oct 12, 2007 at 11:50:01AM +0200, rahed wrote:
    Without prefetch, there is no error. Is it possible (and which way) to
    retrieve data from a remote db via proxy with Catalyst?
    Yes, use a database that's network capable like mysql or postgres.

    Trying to use DBD::Proxy for this is a -heinous- hack and almost certainly
    not going to work (::Proxy is kinda limited, it doesn't supply half the DBI
    API ... really, don't try this. I've just about made it work, once, but it
    was far far FAR too painful for words)
    Thank you, now I know I needn't to try further.

    This was only an attempt to contact my production sqlite from a
    development box. I disliked to copy the db from one box to another when
    wanted to retrieve actual data.

    --
    Radek
  • Matt S Trout at Oct 14, 2007 at 5:37 pm

    On Sat, Oct 13, 2007 at 12:07:54PM +0000, rahed wrote:
    On 10/12/07, Matt S Trout wrote:
    On Fri, Oct 12, 2007 at 11:50:01AM +0200, rahed wrote:
    Without prefetch, there is no error. Is it possible (and which way) to
    retrieve data from a remote db via proxy with Catalyst?
    Yes, use a database that's network capable like mysql or postgres.

    Trying to use DBD::Proxy for this is a -heinous- hack and almost certainly
    not going to work (::Proxy is kinda limited, it doesn't supply half the DBI
    API ... really, don't try this. I've just about made it work, once, but it
    was far far FAR too painful for words)
    Thank you, now I know I needn't to try further.

    This was only an attempt to contact my production sqlite from a
    development box. I disliked to copy the db from one box to another when
    wanted to retrieve actual data.
    Use a read-only NFS mount or something then.

    ... dear god, I just recommended NFS as a less hacky solution to something.
    Kill me now.

    --
    Matt S Trout Need help with your Catalyst or DBIx::Class project?
    Technical Director http://www.shadowcat.co.uk/catalyst/
    Shadowcat Systems Ltd. Want a managed development or deployment platform?
    http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
  • Aristotle Pagaltzis at Oct 16, 2007 at 4:14 am

    * Matt S Trout [2007-10-14 19:00]:
    Kill me now.
    *blam*

    Pains me to have had to do it, but he was too far gone.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedOct 12, '07 at 10:50a
activeOct 16, '07 at 4:14a
posts5
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase