Remote controllable torrent download server

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Remote controllable torrent download server

Postby Berengal » Fri Jul 04, 2008 1:28 am UTC

The backstory:
I'm moving in with two mates of mine of two days. All three of us use computers a fair amount, but the other two are fairly illiterate, their knowledge extending mostly to games and that you can safely ignore any text in wizards unless the options extend beyond "back" "next" and "cancel" (that is, users, as opposed to lusers). Now, I'm going to set up our network and probably throw in a server, which will turn out to be great fun for me and slightly frustrating for the other two until I work the kinks out and it's possible to use without speaking internet protocol. I know almost certainly that we'll be using bittorrent quite a bit (heh), and that a way of coordinating our efforts in downloading the entire internet would be useful in the long run.

What we're (read: I'm) thinking:
- We want to use just one machine to download, and be able to see what the others are downloading so we're not downloading our free, legal entertainment twice. This is the core requirement.
- We want user accounts, so downloads can either be public, available for all to see, or porn, available only to a single user and the guy with root (me). This isn't as important as downloading porn on ones own desktop provides just the same functionality as private files on the server, but it gives you a common interface for all downloads; no need to juggle two programs.

How do we do this?
My plan is currently to make a client app which when given a torrent file simply starts in on the server, and provides a nice GUI interface to the server for managing downloads. I plan on using an existing, open source torrent program on the server, preferably one easy to make modules in, and put in the needed extra functionality to make this work. If possible, steal its GUI for the client app as well, unless it's not just easier to build my own, as I'd probably have to remove interesting things like "preferences" to make sure the combination of "computer illiterate" and "not afraid of computers" doesn't mess things up too much.


Any thoughts on this? Bad idea? Already done? Too much for a fun summer project? (I've got almost two months of nothing but time) Suggestions for a base program to build on? Or should I build my own? (I assume there are libraries I could use by now) Absolutely not worth the effort at all, even though it's mostly for fun and less for profit?
My current plan: 1. Use Transmission as the base. Read API like it was my Bible. 2. Make it talk to the network and accept commands. 3. Make client that sends commands. 4. Give the server the ability to send status reports. 5. Make client request status report. 6. Build client GUI.
I've had something like this in mind for a while, but it was litterally (as in "the litteral meaning") "Have server and use it to download files for us." until a couple of hours ago when I started fleshing it out a bit more, and giving thoughts to its implementation.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

Micron
Posts: 319
Joined: Sat Feb 16, 2008 1:03 am UTC

Re: Remote controllable torrent download server

Postby Micron » Fri Jul 04, 2008 4:39 am UTC

Is there a reason you want to build a thick client to display these updates? My first thought is that it would be easier to build a web page displaying current download status with a form to submit additional torrent files to the server. Is there some other reason why you really want to have a full client app on each desktop?

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: Remote controllable torrent download server

Postby Sc4Freak » Fri Jul 04, 2008 7:51 am UTC


User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Remote controllable torrent download server

Postby Berengal » Fri Jul 04, 2008 12:03 pm UTC

Micron wrote:Is there a reason you want to build a thick client to display these updates? My first thought is that it would be easier to build a web page displaying current download status with a form to submit additional torrent files to the server. Is there some other reason why you really want to have a full client app on each desktop?

I really suck at webpages. Really really suck. I don't even know html. Besides, a thick client feels more like a "real" program, making the difference between using it and using a normal program minimal, although this is just a lame excuse.
Sc4Freak wrote:uTorrent WebUI.

Yes, well, it doesn't have all the functionality I want (but it does have all I really need), plus I can't get it to work at all on my machine. Besides that, I'm not a big fan of µtorrent.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

Micron
Posts: 319
Joined: Sat Feb 16, 2008 1:03 am UTC

Re: Remote controllable torrent download server

Postby Micron » Fri Jul 04, 2008 6:39 pm UTC

Berengal wrote:I really suck at webpages. Really really suck. I don't even know html. Besides, a thick client feels more like a "real" program, making the difference between using it and using a normal program minimal, although this is just a lame excuse.

"I want to write a thick client" is a fine reason, I just wanted to see if you thought about alternatives. If the bit torrent client you are basing this around has a good API then I would suggest you try to write a server app that communicates with it rather than actually modifying the torrent program on the off chance that you might want to update the torrent program at some point in the future. The only other detail I can suggest is that you probably can avoid having to duplicate a full user/permission layer yourself if you have each client authenticate to the server and only show them torrents whose download location is visible to that user. That way if you ever rearrange your file storage, or add more user levels or combinations of permissions you shouldn't have to change your code.

Noughmad
Posts: 41
Joined: Wed Jan 09, 2008 8:38 pm UTC
Contact:

Re: Remote controllable torrent download server

Postby Noughmad » Fri Jul 04, 2008 8:48 pm UTC

Have you thought about MLDonkey?

I think it doesn't support hidden downloads (haven't checked), but it has several different frontends (both programs and browser-based ones).
Laziness is the mother of wisdom.
My woblag

zero10
Posts: 20
Joined: Tue Jul 08, 2008 3:03 am UTC

Re: Remote controllable torrent download server

Postby zero10 » Wed Jul 09, 2008 9:19 am UTC

It sounds like you want to build applications for this, but if you are fine with a webui then torrentflux is your solution. If you want VLC streaming and other random goodies (like working cookies for example) try torrentflux-b4rt. It's what I run on my server and it does pretty much exactly what you're looking for. If you started with it I'm sure you could mod it to suit your needs within your time line, even if you have to re-learn everything they have done to write the script.

I have it running both on linux servers and on windows using xampp, no issues from me.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 7 guests