aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: File transfer via EC  (Read 5360 times)

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
File transfer via EC
« on: May 02, 2007, 10:10:43 AM »

I would like to be able to use EC to transfer files from/to the Incoming folder.
This is very useful for a local network setting, where amuled runs on one machine and is controlled by amuleGUI from another.

If a user e.g. records some music on his notebook,  it would be very easy to publish files this way, instead of running nfs/samba/ftp in addition to amuled on the server.

It should be an optional feature as it is not recommendable over wan and may be used for an DOS attack (by filling the hdd and making any file operations impossible).
Logged

lfroen

  • Guest
Re: File transfer via EC
« Reply #1 on: May 02, 2007, 01:45:46 PM »

Let's for a purpose of discussion, put aside obvious "WTF", and assume that I'm willing to implement such feature.
How exactly you imagine this to work? Client request 500Mb file which takes about 10min to transfer in a bright day. What server does? Stops serving any other EC requests which effectively killing amuleweb?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: File transfer via EC
« Reply #2 on: May 02, 2007, 02:03:46 PM »

It could open another socket/thread for the transfer.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: File transfer via EC
« Reply #3 on: May 02, 2007, 08:15:45 PM »

For me the feature is intended for smaller files, but in a LAN setup 500+MB might be possible too.

The why is simple and imho obvious: Whoever runs an dedicated amuled-server doesn't use the files on said server, but on the computer running amuleGUI¹. The easier it is to publish/access these files, the better.
After all, the sole purpose of aMule is sharing files. Wouldn't it be far easier and more comfortable to use amuleGUI to transfer these files than using ftp/samba/nfs?

Please think about it or explain to me why this is a bad idea.

¹or any other front-end for aMule...e.g. one written in Python...

---

The technical implementation is no big problem. And being an optional feature and most probably using UDP it would require nothing more but a slightly changed firewall/port forwarding rule. The question is: Should this be possible with amule(d) or not?
Logged

lfroen

  • Guest
Re: File transfer via EC
« Reply #4 on: May 03, 2007, 02:58:16 PM »

It could open another socket/thread for the transfer.
No. Your sockets are non-blocking, and signaled thru events interface (remember?!). You will need to change dispatching code.

Quote
Whoever runs an dedicated amuled-server doesn't use the files on said server
Really? I would say that it's pretty unusual setup. Why keep 2 servers running (one for amuled and another for files) when you can put both on same computer?
More common setup is amuled running on device acting as NAS server in same time.
It's bad idea because reinvent the wheel is bad idea. FTP server is already invented. There's nothing complex in configuring vsftpd (for example).

Quote
The technical implementation is no big problem. ... and most probably using UDP
How to put it nicely... UDP will not fly here - go for some RTFM.

Quote
nothing more but a slightly changed firewall/port forwarding rule
Changing firewall rules is PITA. Configure ftp is match simpler:)
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: File transfer via EC
« Reply #5 on: May 03, 2007, 03:38:47 PM »

Thanks for being nice. ;)
My limited knowledge made me think about something like tftp which uses UDP and is very lightweight. I mainly used it to debrick my router, but I'm a network idiot in general.

But there's a slight misunderstanding: aMule(d) will run as ever. Nothing about two servers, only one server as always.

But: You can copy the files from/to aMule Incoming folder via EC (ec is intended to be the control protocol, and something like tftp for the data flow -> network idiot, see above).
Example: I want to publish my Nexenta aMule deb package and have a Linux amuled server running.
First thing is downloading the aMule source code via ed2k. Now I have the source code on my Linux server, but I have to copy it on my machine. Either I open another program to copy the source or I would simply use the remote GUI to save the file on my machine.
After building the package, I want to publish it. Now again, I have the package on my machine, but I want it on the server. Either I use ftp/... to copy the file or I publish it using the GUI, without involving any other application.

Quote
Whoever runs an dedicated amuled-server doesn't use the files on said server
Explanation: You wouldn't listen to music or watch a movie on a server without X, will you? You'll rather use your desktop PC or notebook, maybe even running windows.
Logged

lfroen

  • Guest
Re: File transfer via EC
« Reply #6 on: May 03, 2007, 04:50:25 PM »

Quote
something like tftp which uses UDP
tftp is not really suited for serving large files. It's sometimes used in embedded devices for firmware uploading, "T" stands for "trivial".

Quote
You can copy the files from/to aMule Incoming folder via EC
Can you explain again what's exactly your problem in running ftpd? Samba has little more complicated config, but also widely used. Did I mentioned NFS?
So, you have 3 very well supported, tested and documented tools. And you still want to write your own? Do it in your spare time, it will be nice exercise (no kidding).

Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: File transfer via EC
« Reply #7 on: May 03, 2007, 06:10:06 PM »

eMule's webserver does actually have this feature.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: File transfer via EC
« Reply #8 on: May 03, 2007, 06:15:27 PM »

Don't you worry, I'm aware if samba/nfs/ftp (see first post) and I know how to set them up and use them. (on Linux/OpenBSD)

For me there's the advantage of using one tool for multiple related operations. Kind of object orientated thinking. And of course comfort.

I don't need multiple logins for aMule and FTP, but I can use one tool for controlling aMule and my aMule-related files with one login.

Quote
Do it in your spare time, it will be nice exercise (no kidding).
Thanks for the advice, I'll give it a try. Maybe I'll try to implement (t)ftp, should be a good training.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: File transfer via EC
« Reply #9 on: May 03, 2007, 07:17:11 PM »

wuischke: I'm not sure tftp would work for your purpose, since it uses UDP and that makes it very unreliable for sending/receiving big files.

Regards.
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: File transfer via EC
« Reply #10 on: May 03, 2007, 11:37:49 PM »

I don't use the webserver, so it's just a guess, but when I can view the shared files with the webserver, it should be no problem downloading the files via http from this too. When it runs on the same machine it's no problem, running it on an external is unusual but possible, so it has to get the files internally.
As I said, I don't use it, I don't know if you can view the list, neither I know if this is already possible.
Logged
Homefucking is killing prostitution

lfroen

  • Guest
Re: File transfer via EC
« Reply #11 on: May 06, 2007, 12:03:27 PM »

eMule's webserver does actually have this feature.
Interesting. And how exactly it checks that requested file have anything to do with eMule? I mean, you are not supposed to get just "any" file on filesystem.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: File transfer via EC
« Reply #12 on: May 06, 2007, 05:24:57 PM »

eMule's webserver does actually have this feature.
Interesting. And how exactly it checks that requested file have anything to do with eMule? I mean, you are not supposed to get just "any" file on filesystem.
I think it uses the same mechanism used by any other web server on earth: it will only let files from a specified folder to be downloaded. In this case I think the folder is the incoming one and no more than that.

Regards.
Logged

lfroen

  • Guest
Re: File transfer via EC
« Reply #13 on: May 08, 2007, 10:21:02 AM »

I admit, skolnick got a point, downloading from "Incoming" and down should be OK. I'll think about implementation more closely.
Logged