You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Ludwig Magnusson <lu...@itcatapult.com> on 2010/03/04 08:56:33 UTC

Can I use torque over ssh?

Hi!

If I have a database on a server that I can connect to via ssh, can I use
torque to access that database? I.e write a java program that runs on my
compyter but reads/writes to the database.

Can I also run maven goals like torque:datadump that connects to the remote
database?

/Ludwig


RE: Can I use torque over ssh?

Posted by Ludwig Magnusson <lu...@itcatapult.com>.
Ok thank you. I will try it out today.
/Ludwig

-----Original Message-----
From: Graham Stewart [mailto:grahamsz@gmail.com] 
Sent: den 4 mars 2010 19:01
To: Apache Torque Users List
Subject: Re: Can I use torque over ssh?

I do it quite frequently when i need to debug issues using the staging
database running on a remote host.

ssh -L 3306:localhost:3306 username@remoteserver.com

Then i point my locally running code at 127.0.0.1 and the mysql
connection will get carried over ssh.

It's not noticeably slower than a direct connection would be - though
the quality of either will depend on how fast the connection between
you and the server is.

Graham



On Thu, Mar 4, 2010 at 10:57 AM, Ludwig Magnusson <lu...@itcatapult.com>
wrote:
> Well I wasn't planning on writing anything complex, mostly simple programs
> that I can run on my computer (instead of uploading them to  my webabb and
> run them there) that does some kind of manipulation with the data.
> If there is no simple way of doing it, it's not worth the effort.
> /Ludwig
>
> -----Original Message-----
> From: Greg Monroe [mailto:Greg.Monroe@dukece.com]
> Sent: den 4 mars 2010 15:25
> To: 'Apache Torque Users List'
> Subject: RE: Can I use torque over ssh?
>
> All true... but remember that interaction with an SQL Server (regardless
> of the method) is generally net traffic intensive.  Using a method like
> this has two possible "gotchas".
>
> First, the added complexity may cause communication problems.  SQL Servers
> are not built around handling frequently dropping packets/clients.  Your
> code will need to do a lot of transaction protection and you will need to
> be prepared to clear out deadlocks created by clients dropping.
>
> Also, distance and SSH are both going to add some lag factors.  So don't
> expect the normal SQL rapid response.  Make sure all your users are
> aware of this too.
>
> Bottom line, IMHO, this is probably OK for something that just retrieves
> a little bit of data... with a nice stable network connection and users
> who don't mind lag/variable response times.  But I wouldn't build a
> fully interactive app that allows data modification, etc with it.
>
>
>> -----Original Message-----
>> From: Emmanuel Bardet [mailto:ebardet@bardet-u2ee.com]
>> Sent: Thursday, March 04, 2010 3:16 AM
>> To: Apache Torque Users List
>> Subject: Re: Can I use torque over ssh?
>>
>> Hello Ludwig,
>>
>> It's not really Torque related but more to your jdbc driver.  From an
>> ssh perspective, as long as it uses TCP/IP to connect to your database
>> server AND IF your ssh server allows ssh-tunneling (ana ssh-port-
>> forwarding) then you should be fine.  There's a few how-to available.
>>
>> E
>>
>> Le 4 mars 10 à 04/03-08:56, Ludwig Magnusson a écrit :
>>
>> > Hi!
>> >
>> > If I have a database on a server that I can connect to via ssh, can
>> > I use
>> > torque to access that database? I.e write a java program that runs
>> > on my
>> > compyter but reads/writes to the database.
>> >
>> > Can I also run maven goals like torque:datadump that connects to the
>> > remote
>> > database?
>> >
>> > /Ludwig
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>
> DukeCE Privacy Statement:
> Please be advised that this e-mail and any files transmitted with
> it are confidential communication or may otherwise be privileged or
> confidential and are intended solely for the individual or entity
> to whom they are addressed. If you are not the intended recipient
> you may not rely on the contents of this email or any attachments,
> and we ask that you please not read, copy or retransmit this
> communication, but reply to the sender and destroy the email, its
> contents, and all copies thereof immediately. Any unauthorized
> dissemination, distribution or copying of this communication is
> strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Can I use torque over ssh?

Posted by Graham Stewart <gr...@gmail.com>.
I do it quite frequently when i need to debug issues using the staging
database running on a remote host.

ssh -L 3306:localhost:3306 username@remoteserver.com

Then i point my locally running code at 127.0.0.1 and the mysql
connection will get carried over ssh.

It's not noticeably slower than a direct connection would be - though
the quality of either will depend on how fast the connection between
you and the server is.

Graham



On Thu, Mar 4, 2010 at 10:57 AM, Ludwig Magnusson <lu...@itcatapult.com> wrote:
> Well I wasn't planning on writing anything complex, mostly simple programs
> that I can run on my computer (instead of uploading them to  my webabb and
> run them there) that does some kind of manipulation with the data.
> If there is no simple way of doing it, it's not worth the effort.
> /Ludwig
>
> -----Original Message-----
> From: Greg Monroe [mailto:Greg.Monroe@dukece.com]
> Sent: den 4 mars 2010 15:25
> To: 'Apache Torque Users List'
> Subject: RE: Can I use torque over ssh?
>
> All true... but remember that interaction with an SQL Server (regardless
> of the method) is generally net traffic intensive.  Using a method like
> this has two possible "gotchas".
>
> First, the added complexity may cause communication problems.  SQL Servers
> are not built around handling frequently dropping packets/clients.  Your
> code will need to do a lot of transaction protection and you will need to
> be prepared to clear out deadlocks created by clients dropping.
>
> Also, distance and SSH are both going to add some lag factors.  So don't
> expect the normal SQL rapid response.  Make sure all your users are
> aware of this too.
>
> Bottom line, IMHO, this is probably OK for something that just retrieves
> a little bit of data... with a nice stable network connection and users
> who don't mind lag/variable response times.  But I wouldn't build a
> fully interactive app that allows data modification, etc with it.
>
>
>> -----Original Message-----
>> From: Emmanuel Bardet [mailto:ebardet@bardet-u2ee.com]
>> Sent: Thursday, March 04, 2010 3:16 AM
>> To: Apache Torque Users List
>> Subject: Re: Can I use torque over ssh?
>>
>> Hello Ludwig,
>>
>> It's not really Torque related but more to your jdbc driver.  From an
>> ssh perspective, as long as it uses TCP/IP to connect to your database
>> server AND IF your ssh server allows ssh-tunneling (ana ssh-port-
>> forwarding) then you should be fine.  There's a few how-to available.
>>
>> E
>>
>> Le 4 mars 10 à 04/03-08:56, Ludwig Magnusson a écrit :
>>
>> > Hi!
>> >
>> > If I have a database on a server that I can connect to via ssh, can
>> > I use
>> > torque to access that database? I.e write a java program that runs
>> > on my
>> > compyter but reads/writes to the database.
>> >
>> > Can I also run maven goals like torque:datadump that connects to the
>> > remote
>> > database?
>> >
>> > /Ludwig
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>
> DukeCE Privacy Statement:
> Please be advised that this e-mail and any files transmitted with
> it are confidential communication or may otherwise be privileged or
> confidential and are intended solely for the individual or entity
> to whom they are addressed. If you are not the intended recipient
> you may not rely on the contents of this email or any attachments,
> and we ask that you please not read, copy or retransmit this
> communication, but reply to the sender and destroy the email, its
> contents, and all copies thereof immediately. Any unauthorized
> dissemination, distribution or copying of this communication is
> strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Can I use torque over ssh?

Posted by Ludwig Magnusson <lu...@itcatapult.com>.
Well I wasn't planning on writing anything complex, mostly simple programs
that I can run on my computer (instead of uploading them to  my webabb and
run them there) that does some kind of manipulation with the data.
If there is no simple way of doing it, it's not worth the effort.
/Ludwig

-----Original Message-----
From: Greg Monroe [mailto:Greg.Monroe@dukece.com] 
Sent: den 4 mars 2010 15:25
To: 'Apache Torque Users List'
Subject: RE: Can I use torque over ssh?

All true... but remember that interaction with an SQL Server (regardless 
of the method) is generally net traffic intensive.  Using a method like
this has two possible "gotchas".

First, the added complexity may cause communication problems.  SQL Servers
are not built around handling frequently dropping packets/clients.  Your
code will need to do a lot of transaction protection and you will need to
be prepared to clear out deadlocks created by clients dropping.

Also, distance and SSH are both going to add some lag factors.  So don't 
expect the normal SQL rapid response.  Make sure all your users are 
aware of this too.

Bottom line, IMHO, this is probably OK for something that just retrieves
a little bit of data... with a nice stable network connection and users
who don't mind lag/variable response times.  But I wouldn't build a 
fully interactive app that allows data modification, etc with it.


> -----Original Message-----
> From: Emmanuel Bardet [mailto:ebardet@bardet-u2ee.com]
> Sent: Thursday, March 04, 2010 3:16 AM
> To: Apache Torque Users List
> Subject: Re: Can I use torque over ssh?
> 
> Hello Ludwig,
> 
> It's not really Torque related but more to your jdbc driver.  From an
> ssh perspective, as long as it uses TCP/IP to connect to your database
> server AND IF your ssh server allows ssh-tunneling (ana ssh-port-
> forwarding) then you should be fine.  There's a few how-to available.
> 
> E
> 
> Le 4 mars 10 à 04/03-08:56, Ludwig Magnusson a écrit :
> 
> > Hi!
> >
> > If I have a database on a server that I can connect to via ssh, can
> > I use
> > torque to access that database? I.e write a java program that runs
> > on my
> > compyter but reads/writes to the database.
> >
> > Can I also run maven goals like torque:datadump that connects to the
> > remote
> > database?
> >
> > /Ludwig
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Can I use torque over ssh?

Posted by Greg Monroe <Gr...@dukece.com>.
All true... but remember that interaction with an SQL Server (regardless 
of the method) is generally net traffic intensive.  Using a method like
this has two possible "gotchas".

First, the added complexity may cause communication problems.  SQL Servers
are not built around handling frequently dropping packets/clients.  Your
code will need to do a lot of transaction protection and you will need to
be prepared to clear out deadlocks created by clients dropping.

Also, distance and SSH are both going to add some lag factors.  So don't 
expect the normal SQL rapid response.  Make sure all your users are 
aware of this too.

Bottom line, IMHO, this is probably OK for something that just retrieves
a little bit of data... with a nice stable network connection and users
who don't mind lag/variable response times.  But I wouldn't build a 
fully interactive app that allows data modification, etc with it.


> -----Original Message-----
> From: Emmanuel Bardet [mailto:ebardet@bardet-u2ee.com]
> Sent: Thursday, March 04, 2010 3:16 AM
> To: Apache Torque Users List
> Subject: Re: Can I use torque over ssh?
> 
> Hello Ludwig,
> 
> It's not really Torque related but more to your jdbc driver.  From an
> ssh perspective, as long as it uses TCP/IP to connect to your database
> server AND IF your ssh server allows ssh-tunneling (ana ssh-port-
> forwarding) then you should be fine.  There's a few how-to available.
> 
> E
> 
> Le 4 mars 10 à 04/03-08:56, Ludwig Magnusson a écrit :
> 
> > Hi!
> >
> > If I have a database on a server that I can connect to via ssh, can
> > I use
> > torque to access that database? I.e write a java program that runs
> > on my
> > compyter but reads/writes to the database.
> >
> > Can I also run maven goals like torque:datadump that connects to the
> > remote
> > database?
> >
> > /Ludwig
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Can I use torque over ssh?

Posted by Emmanuel Bardet <eb...@bardet-u2ee.com>.
Hello Ludwig,

It's not really Torque related but more to your jdbc driver.  From an  
ssh perspective, as long as it uses TCP/IP to connect to your database  
server AND IF your ssh server allows ssh-tunneling (ana ssh-port- 
forwarding) then you should be fine.  There's a few how-to available.

E

Le 4 mars 10 à 04/03-08:56, Ludwig Magnusson a écrit :

> Hi!
>
> If I have a database on a server that I can connect to via ssh, can  
> I use
> torque to access that database? I.e write a java program that runs  
> on my
> compyter but reads/writes to the database.
>
> Can I also run maven goals like torque:datadump that connects to the  
> remote
> database?
>
> /Ludwig
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org