From wmorgan-rubytorrent-devel at masanjin.net Thu Jan 6 14:46:27 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Thu Jan 6 14:44:22 2005 Subject: [rubytorrent-devel] welcome Message-ID: <20050106194627.GC24676@masanjin.net> Welcome all. Feel free to use this list for any comments, bug reports, or patches pertaining to RubyTorrent. The RubyForge site is up: http://rubyforge.org/projects/rubytorrent/, and anonymous CVS is enabled. -- William From ra016681 at ic.unicamp.br Mon Jan 10 15:20:56 2005 From: ra016681 at ic.unicamp.br (Luis Felipe Strano Moraes) Date: Mon Jan 10 15:15:04 2005 Subject: [rubytorrent-devel] rubytorrent In-Reply-To: References: Message-ID: <20050110202056.GB1470@manaus.ic.unicamp.br> hello, we are interested in using rubytorrent as a project in a hackfest we're organizing, and I would like to know if you have any idea of stuff that needs to be done, or something like it. Thanks, --lf From wmorgan-rubytorrent-devel at masanjin.net Mon Jan 10 16:53:18 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Mon Jan 10 16:51:04 2005 Subject: [rubytorrent-devel] rubytorrent In-Reply-To: <20050110202056.GB1470@manaus.ic.unicamp.br> References: <20050110202056.GB1470@manaus.ic.unicamp.br> Message-ID: <20050110215317.GA4283@masanjin.net> Excerpts from Luis Felipe Strano Moraes's mail of 10 Jan 2005 (EST): > we are interested in using rubytorrent as a project in a hackfest > we're organizing, and I would like to know if you have any idea of > stuff that needs to be done, or something like it. Well, the obvious target at this point is a nice multi-download GUI client that uses RubyTorrent, using one of the Ruby GUI toolkits. Should be pretty easy to write. That would probably also help eliminate a lot of bugs. :) If you want to hack on RubyTorrent itself, there are a couple items on my todo list. I'm not sure if any of them are hackfest kind of challenges, but maybe so. They are: - gzip in tracker protocol I think there are some (old) trackers out there that respond with gzipped data, but I can't find any. I need to find one, play with it, and add gzip functionality to tracker.rb. - Better handling of character encoding in .torrent files. Right now RubyTorrent handles .utf-8 encoding only. I haven't seen any other encodings, but it will definitely break if it sees them. There's a weird convention for specifying encodings in metainfo fields that necessitates some restructuring of typedstruct.rb and metainfo.rb if I want to handle it correctly. - Anti-snubbing The available documentation for this is pretty sparse. I'm doing what I can glean from what's available, filling the gaps in with what I *think* is reasonable, but who knows. Needs testing. - End-game mode Ditto. No realy documentation on this that I could find. Needs testing, specifically: when should I enter end-game mode? With 10 pieces left? With 1% of total bytes left? Etc. - Super-seeding mode. Needs to be implemented. - General performance tweaking and comparisons How well does RubyTorrent compare to Bram's BitTorrent client? To Azareus? To other clients? If worse, what are they doing differently? There are tons of tweakable things in peer.rb, both in terms of numbers, threshold conditions, and algorithms. Does that help? -- William From wmorgan-rubytorrent-devel at masanjin.net Tue Jan 11 08:17:55 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Tue Jan 11 08:16:36 2005 Subject: [rubytorrent-devel] rubytorrent In-Reply-To: <20050111122455.GA5511@manaus.ic.unicamp.br> References: <20050110202056.GB1470@manaus.ic.unicamp.br> <20050110215317.GA4283@masanjin.net> <20050111122455.GA5511@manaus.ic.unicamp.br> Message-ID: <20050111131755.GB5818@masanjin.net> Excerpts from Luis Felipe Strano Moraes's mail of 11 Jan 2005 (EST): > I guess we're gonna try to code a client, since that would help out a > lot apparently, and then while we do it, we'll try to mess around with > the library. Ok, cool. > Is the tracker already working ? I have no plans to write a tracker, so that might be another good hackfest idea. I thought the Aversa folks (aversa.rubyforge.org) had one, but I can't find it anywhere. Either way, everything in bencoding.rb and metainfo.rb would be very useful for writing a tracker. -- William From mail at exceptionfault.de Wed Jan 12 15:52:50 2005 From: mail at exceptionfault.de (Andreas Habel) Date: Wed Jan 12 15:51:04 2005 Subject: [rubytorrent-devel] Extending metainfo class Message-ID: <41E58E22.3090602@exceptionfault.de> Hi, I`ve still posted this comment on comp.lang.ruby and after that I found this list ;) I`ve had some problems with a .torrent file because of unknown fields. The file was created with: BitComet/0.56 So, I extended the metainfo class like this: -- Andreas Index: rubytorrent/rubytorrent/metainfo.rb =================================================================== RCS file: /var/cvs/rubytorrent/rubytorrent/rubytorrent/metainfo.rb,v retrieving revision 1.4 diff -r1.4 metainfo.rb 62,63c62,67 < :ed2k => String < s.label :piece_length => "piece length", :name_utf8 => "name.utf-8" --- > :ed2k => String, > :publisher_url => String, > :publisher_url_utf8 => String > s.label :piece_length => "piece length", :name_utf8 => "name.utf-8", > :publisher_url => "publisher-url", > :publisher_url_utf8 => "publisher-url.utf-8" 134c138,139 < :comment_utf8 => String --- > :comment_utf8 => String, > :torrent_name => String 136c141,142 < :creation_date => "creation date", :created_by => "created by" --- > :creation_date => "creation date", :created_by => "created by", > :torrent_name => "torrent filename" From wmorgan-rubytorrent-devel at masanjin.net Wed Jan 12 15:59:46 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Wed Jan 12 15:57:28 2005 Subject: [rubytorrent-devel] Extending metainfo class In-Reply-To: <41E58E22.3090602@exceptionfault.de> References: <41E58E22.3090602@exceptionfault.de> Message-ID: <20050112205946.GA8825@masanjin.net> Excerpts from Andreas Habel's mail of 12 Jan 2005 (EST): > I`ve had some problems with a .torrent file because of unknown fields. > The file was created with: BitComet/0.56 > > So, I extended the metainfo class like this: Thanks! I'll incorporate that into CVS. The typedstruct thing is very strict in terms of parsing, but that was mostly to help my debugging. One thing on the todo list is to make it ignore unknown fields rather than dying horribly. :) Either way, good to know what other fields are out there. What was the value for the "torrent name" field? Seems a little redundant to me.... -- William From mail at exceptionfault.de Wed Jan 12 16:29:26 2005 From: mail at exceptionfault.de (Andreas Habel) Date: Wed Jan 12 16:27:31 2005 Subject: [rubytorrent-devel] Extending metainfo class In-Reply-To: <20050112205946.GA8825@masanjin.net> References: <41E58E22.3090602@exceptionfault.de> <20050112205946.GA8825@masanjin.net> Message-ID: <41E596B6.9020901@exceptionfault.de> William Morgan wrote: > > What was the value for the "torrent name" field? Seems a little > redundant to me.... > The field contains the path and filename of my local .torrent file what was very confusing for me. I`ve downloaded the file again and the field was missing. I found out, that Azureus modified the .torrent file and added this field when starting the torrent. Maybe you can use this method for rubytorrent too? From eko at softhome.net Wed Jan 19 21:04:10 2005 From: eko at softhome.net (Eko Budi Setiyo) Date: Wed Jan 19 21:05:12 2005 Subject: [rubytorrent-devel] rubytorrent problem on windows xp Message-ID: <41EF119A.7000001@softhome.net> Hi everyone Is rubytorrent work on windows XP. I have problem for using it. Here my Configuration OS: Windows XP Ruby Version: 1.8.2 Already Install Azureus and ABC torrent. I manage to set Azerus behave as tracker that listen to IP 127.0.0.1 and seeding file from "\ekobudi\bittorrent\host0". After that I copy torrent file from"\ekobudi\bittorent\host0" to" \ekobudi\bittorrent\host1" and use ABC torrent client to download the file to " \ekobudi\bittorrent\host1" by using torrent inside "\ekobudi\bittorrent\host1". I try to do the same thing to "\ekobudi\bittorrent\host2" by using rubytorrent but never succeed. Always giving me error "Permission denied" Any suggestion what should I do? regards Eko From wmorgan-rubytorrent-devel at masanjin.net Thu Jan 20 11:21:22 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Thu Jan 20 11:18:49 2005 Subject: [rubytorrent-devel] rubytorrent problem on windows xp In-Reply-To: <41EF119A.7000001@softhome.net> References: <41EF119A.7000001@softhome.net> Message-ID: <20050120162122.GB26901@masanjin.net> Hi Eko, Excerpts from Eko Budi Setiyo's mail of 19 Jan 2005 (EST): > I try to do the same thing to "\ekobudi\bittorrent\host2" by using > rubytorrent but never succeed. Always giving me error "Permission > denied" Any suggestion what should I do? Can you cut and paste the invocation of RubyTorrent and the resulting error? That might help diagnose the problem. Also, are you using Cygwin? -- William From wmorgan-rubytorrent-devel at masanjin.net Sun Jan 23 20:22:14 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Sun Jan 23 20:19:33 2005 Subject: [rubytorrent-devel] rubytorrent problem on windows xp In-Reply-To: <41F44571.4020607@softhome.net> References: <41EF119A.7000001@softhome.net> <20050120162122.GB26901@masanjin.net> <41F44571.4020607@softhome.net> Message-ID: <20050124012214.GA3779@masanjin.net> Excerpts from Eko Budi Setiyo's mail of 23 Jan 2005 (EST): > My development note book is in my house where i don't have internet > access. Tomorrow I will give you the message. Ok. If there's a Ruby backtrace that would be helpful too. > Any way I want to say thank for making torrent availabe on ruby. My pleasure! -- William From wmorgan-rubytorrent-devel at masanjin.net Tue Jan 25 12:17:11 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Tue Jan 25 12:14:31 2005 Subject: [rubytorrent-devel] rubytorrent problem on windows xp In-Reply-To: <41F5A580.9080507@softhome.net> References: <41EF119A.7000001@softhome.net> <20050120162122.GB26901@masanjin.net> <41F44571.4020607@softhome.net> <20050124012214.GA3779@masanjin.net> <41F5A580.9080507@softhome.net> Message-ID: <20050125171711.GC8232@masanjin.net> Eko, Excerpts from Eko Budi Setiyo's mail of 24 Jan 2005 (EST): > Hi William > Here is my error message from rubytorrent Thanks for the report. I've fixed both of these problems in CVS. You can check out the new code from there, or I will probably be releasing 0.3 within the next few days. (In the future, you can probably just cut and paste the error messages rather than doing a screenshot. Should be easier.) -- William From wmorgan-rubytorrent-devel at masanjin.net Tue Jan 25 12:25:10 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Tue Jan 25 12:22:24 2005 Subject: [rubytorrent-devel] lots of changes in cvs Message-ID: <20050125172510.GD8232@masanjin.net> Hi all, I've been spending a lot of time over the past few weeks on RubyTorrent. All the changes are in CVS. Highlights are: - Transfer speeds should be much better, thanks to a better piece selection algorithm, and being more aggressive about dropping boring peers and adding new ones, - Download/upload rate limits now work. - Many bugs fixed. - .torrent creation now supported (make-metainfo.rb) Note that rtpeer by default has a download limit of 20kb/s and an upload limit of 10kb/s. If you're actually using it to transfer .torrents, you might want to change those. (I should probably give it some command-line arguments.) Like I said to Eko, I'm planning on releasing an 0.3 in the next few days. If you'd like to help out by bug-testing the code in CVS, here are the instructions from the RubyForge page: Anonymous CVS Access This project's CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the Enter key. cvs -d:pserver:anonymous@rubyforge.org:/var/cvs/rubytorrent login cvs -z3 -d:pserver:anonymous@rubyforge.org:/var/cvs/rubytorrent co modulename Updates from within the module's directory do not need the -d parameter. Let me know how it goes. -- William From mail at exceptionfault.de Tue Jan 25 18:34:11 2005 From: mail at exceptionfault.de (Andreas Habel) Date: Tue Jan 25 18:31:28 2005 Subject: [rubytorrent-devel] Testing preRelease 0.3 Message-ID: <41F6D773.9060005@exceptionfault.de> Hi all, I?ve updated my local repository with version from 05/01/26 0:00 CET My test - torrent is very active, so Azureus gets an average download of 40kb/s after a few seconds running, and up to 90kb/s after two minutes. Rubytorrent has not even 1 piece after fifteen minutes. It gets connected to 12 or 15 peers but the download ratio is always below 2kb/s. From my point of view there is a long break while trying to connect to a peer. I didn`t watch the code but there seems to happen nothing for at least half a second. And much more than half of all connects fails. Maybe Ruby threads under Windows didn`t perform as they should? [snip] I?ve watched a little more the debugging output and it seems that all connections, rubytorrent actually has, are established by remote peers. No connection from me to other peers a successfull ?? [snip] Ok, now I have about 20 connections and a download ratio of 19kb/s. Thats near the maximum of 20kb/s. My console is flooded with incoming and outgoing blocks as long as no new connections are going to be established. If so, everything stops up to 20 seconds. I keep on testing.. attached, some error messsages appeared during testing... Andreas =========================================================================================== couldn't connect to peer 138.217.126.134:6346 ./rubytorrent/server.rb:108:in `accept': An operation was attempted on something that is not a socket. (Errno::ENOTSOCK) from ./rubytorrent/server.rb:108:in `receive' from ./rubytorrent/server.rb:81:in `start' from ./rubytorrent/server.rb:79:in `initialize' from ./rubytorrent/server.rb:79:in `new' from ./rubytorrent/server.rb:79:in `start' from ./rubytorrent.rb:59:in `initialize' from D:/rubyt/rubytorrent/rtpeer.rb:71:in `new' from D:/rubyt/rubytorrent/rtpeer.rb:71 =========================================================================================== * calculating optimistic unchokes... * anti-snubbing mode, 0 extra optimistic unchoke slots connected to peer 68.63.255.20:23628 * recalculating piece popularity... Exception `NoMethodError' at ./rubytorrent/controller.rb:69 - undefined method `each' for nil:NilClass ./rubytorrent/controller.rb:69:in `each': undefined method `each' for nil:NilClass (NoMethodError) from ./rubytorrent/controller.rb:305:in `each_wanted_block' from ./rubytorrent/peer.rb:506:in `get_want_blocks' from ./rubytorrent/peer.rb:464:in `handle_message' from ./rubytorrent/peer.rb:342:in `input_thread_step' from ./rubytorrent/peer.rb:154:in `start' from ./rubytorrent/peer.rb:152:in `initialize' from ./rubytorrent/peer.rb:152:in `new' from ./rubytorrent/peer.rb:152:in `start' ... 17 levels... from ./rubytorrent/server.rb:61:in `add_torrent' from ./rubytorrent.rb:62:in `initialize' from rtpeer.rb:71:in `new' from rtpeer.rb:71 Exception `ThreadError' at c:/ruby/lib/ruby/1.8/thread.rb:112 - killed thread From wmorgan-rubytorrent-devel at masanjin.net Tue Jan 25 19:14:47 2005 From: wmorgan-rubytorrent-devel at masanjin.net (William Morgan) Date: Tue Jan 25 19:12:12 2005 Subject: [rubytorrent-devel] Testing preRelease 0.3 In-Reply-To: <41F6D773.9060005@exceptionfault.de> References: <41F6D773.9060005@exceptionfault.de> Message-ID: <20050126001447.GF8232@masanjin.net> Andreas, Excerpts from Andreas Habel's mail of 25 Jan 2005 (EST): > I?ve updated my local repository with version from 05/01/26 0:00 CET > My test - torrent is very active, so Azureus gets an average download > of 40kb/s after a few seconds running, and up to 90kb/s after two > minutes. Good stuff! Keep the bug reports coming, and I'll let you know as soon as I solve them (hopefully!). -- William