Papanikles / avalanche-rt

Automatically exported from code.google.com/p/avalanche-rt
Other
2 stars 0 forks source link

Socket connections. #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Socket based SCGI.
2.Use Avalanche

What is the expected output? What do you see instead? Did you get an error
message, if so what?
That it connects via a socket.

What version of Avalanche are you using? What version of Apache? What about
your operating system?
0.9-RC1

Please provide any additional information below.

I would like to request an option to have avalanche connect via socket
based connections.
Example
lighttpd.conf
"socket" => "/tmp/rtorrent.rpc.socket",
rtorrent.rc
scgi_local = /tmp/rtorrent.rpc.socket

Original issue reported on code.google.com by jwwolf on 4 May 2010 at 6:59

GoogleCodeExporter commented 8 years ago
This is a difficult situation; the short answer for this is "Im working on it, 
but 
don't hold your breath". The long answer is this:

The way Avalanche works (and in fact all rtorrent web UIs) is to use CURL to 
fetch 
data from the exposed RPC service sitting on Apache (or webserver X). The 
difficulty 
lies here. If I were to somehow solve the socket problem, and that in itself is 
a big 
if (which has been on my mind since day 1 btw), then there would be such a 
radical 
codebase change it would become a different project in itself. As much code 
went into 
the XMLRPC interface would go into Sockets (if not more), so >1000 lines of 
code.

For now, you *have* to have rtorrent exposed to a web server at the least. 
However, 
you can secure the web server end by using Auth BASIC (Tested) or Auth DIGEST 
(Untested). On Apache, you still have to expose the rtorrent scgi (by giving it 
a 
port), which is a real shame.

However, you CAN use socket based RPC by using an alternative web server. 
Apache's 
RPC server doesn't support sockets, but Cherokee's, NginX's and Lighttpd's 
servers 
all do. So feel free to use those. I am currently using Cherokee, which works 
flawlessly (and is incredibly easy to setup) with rtorrent's socket interface. 
As 
said above, couple this with some kind of Auth and you've minimised rtorrent's 
exposure to the web.

Hope this gives you enough of an answer.

Original comment by keitha...@gmail.com on 4 May 2010 at 7:24

GoogleCodeExporter commented 8 years ago
I'm using lighttpd and rtgui and they work perfectly.Unless i am missing a 
setting on
Avalanche,it does not function at all(no error messages either).Using the same
configuration(lighttpd,rtorrent) and loading rtgui works.But now with avalanche.
Here is a patchset which enables rtgui to use sockets.Perhaps you could look at 
it
and see how the author did it and adapt it to Avalanche.

http://groups.google.com/group/rtgui/browse_thread/thread/6543b30db28ab72e?pli=1

Original comment by jwwolf on 4 May 2010 at 7:58

GoogleCodeExporter commented 8 years ago
Excellent work! I'll have a look. I've pushed it forward to 0.9 Final so in 
theory you 
should see it implemented in a month or so. 

Original comment by keitha...@gmail.com on 4 May 2010 at 8:19

GoogleCodeExporter commented 8 years ago

Original comment by keitha...@gmail.com on 7 Jun 2010 at 8:08

GoogleCodeExporter commented 8 years ago
Awesome!

Original comment by hlpimfal...@gmail.com on 17 Jun 2010 at 5:20