• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

eCS and bittorrent

Started by craigm, 2008.06.01, 15:29:34

Previous topic - Next topic

craigm

Haya everyone...

Looking for a good bittorrent out there for eCS, anyone recommend one that is not Limeware or a bittorrent that is not being worked on anymore? Thanks!

Craig Miller

chennecke

I'm using both ctorrent and Azureus.

Ctorrent is a command line client that integrates nicely and unobstrusively with Firefox. Volker Ehlert has created a nice package: http://www.ehlertronic.de/esbin/ctorr-pack.zip

Azureus is a full-blown GUI client. Note that the normal version does NOT work on OS/2. However, Jürgen Ulbts has created a package that does: http://www.juergen-ulbts.de/content/download/project/ports/Azureus4eCS_v010_2007-10-03.zip Be very sure to follow the setup guide!

saborion2

Quote from: chennecke on 2008.06.01, 18:12:26
I'm using both ctorrent and Azureus.

Ctorrent is a command line client that integrates nicely and unobstrusively with Firefox. Volker Ehlert has created a nice package: http://www.ehlertronic.de/esbin/ctorr-pack.zip

Azureus is a full-blown GUI client. Note that the normal version does NOT work on OS/2. However, Jürgen Ulbts has created a package that does: http://www.juergen-ulbts.de/content/download/project/ports/Azureus4eCS_v010_2007-10-03.zip Be very sure to follow the setup guide!

Can anyone say what is the status of Peer-To-Peer that was once a prominent feature integrated into OS/2 Warp Ver. 3.0. I am not quite sure what has happened with Peer-To-Peer in OS/2 since Ver. 3.0.  ::) ::) ::)

Thank.

SAB

craigm

Thanks chennecke but I thought that CTorrent was dead? The CTorrent project was discontinued in 2004 by its primary author YuHong. I will look into Azureus though...

warpcafe

Quote from: saborion2 on 2008.06.01, 21:24:26
Can anyone say what is the status of Peer-To-Peer that was once a prominent feature integrated into OS/2 Warp Ver. 3.0. I am not quite sure what has happened with Peer-To-Peer in OS/2 since Ver. 3.0.  ::) ::) ::)

Hi SAB,

I think I finally made the link from the thread to your question. Peer-to-peer as seen in PC networking actually has little (if nothing) to do with so-called "peer networks" and the torrent-stuff that people use for sharing files nowadays. But getting back to your question "what has happened" with Peer-to-Peer since Warp 3: Some fixpacks. After then: Nothing.

HTH
Thomas
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy

chennecke

Quote from: craigm on 2008.06.01, 21:34:41
Thanks chennecke but I thought that CTorrent was dead? The CTorrent project was discontinued in 2004 by its primary author YuHong.

The original authors stopped working on it indeed, but what I'm talking about is called "Enhanced CTorrent" by the author who picked it up. To quote the readme file:

   The purpose of the Enhanced CTorrent effort is to fix problems that
   remain in the code, modernize existing features and algorithms, and
   implement new features while maintaining low overhead requirements and
   a high standard of performance (both part of the original CTorrent
   design philosophy). Highlights of the enhanced client include:
     * Support for large files (>2GB) and large torrents (>255 files)
     * Strategic selection of pieces to request for download
     * Continuous queueing of download requests, tuned based on latency
       and throughput for each peer
     * Improved download performance, including parallel requests in
       initial and endgame modes
     * Improved bandwidth regulation
     * Improved compatibility with other peers
     * Performance optimization and bug fixes
     * An interface for monitoring and managing multiple clients

ddan

The Enhanced CTorrent works fine for me after a read of its text
files, and then ignoring the .cmd file (which requires several directories to
previously exist) to instead use just: >ctorrent9 -U 32 file.torrent, where
the "-U" limits upload speed to 32KB/s so that other programs aren't entirely
shut out of the web.

Had a Linux client going previously, so knew my router was set up to allow the
port use, which could otherwise be a tangle. And you probably need a 32-bit
TCPIP stack, whatever that is. I never managed to sort through that maze of
fixpacks with W4. You could still try it.

I unzipped ctorrent9.exe into a temporary directory, haven't got it arranged
for convenience yet. Then spent quite a while locating a torrent worth its
"free" price; moved that .torrent file to the dir with ctorrent, used the one
parameter as above, copied and pasted the name text to the command line, and
after a short pause that I figured was negotiating the announcement stuff,
voila! Downloading began. Uses very little CPU time.

I prefer command line and would say that it's actually about as convenient as
GUI for this use, when you add in all the time you spend clicking around to
find the downloaded file, or find the torrent file if you ever need it again.

Saijin_Naib

O_o
I'd beg to differ. IMO, nothing beats being able to manage multiple torrents, select/deselect specific files in each torrent, assign priority, etc all from a nice GUI. With some of the better GUI torrent clients, you dont need to keep the .torrents around because the program keeps track of them once they are loaded, and if you set the torrent app to open .torrent files from Firefox directly, there's no need to move .torrents into program directories, copy torrent names, and then go.

RobertM

#8
Well, many of those features can be incorporated "into" cTorrent by anyone willing to play with the cTorrent.cmd script.

From there, either a text based "GUI" or a PM based GUI can be created.


  • The output can be either parsed from the cmdline window, or by having the app change the window list application name, can be read from there via a REXX or C++ app.

  • The download to location can be specified by a pop-up when called by Firefox as well using such a method.

  • The info (what's going on, how many torrents are being U/L or D/L) can be sent to xWorkplace or the desktop via WPSWizard to a REXX widget.


The list of possibilities is near endless. Maybe if someone has the time, they can whip something together.


Regardless, I'm finding it very fast, and very resource unintensive (and it finally resolves the 2GB file size limit if running on JFS).

Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM

#9
Quote from: Saijin_Naib on 2008.06.03, 22:31:41
...and if you set the torrent app to open .torrent files from Firefox directly, there's no need to move .torrents into program directories, copy torrent names, and then go.

Hi Saijin_Naib,

Sorry I didn't go into more detail about the above part of your post... I will now.


NOTE: The line numbers below are only accurate for the original cTorrent.CMD file. If it's been changed, they may no longer be accurate


  • Create a "Downloads" folder someplace (preferably on a JFS drive)

  • Open ctorrent.cmd in a text editor

  • Line #08 - Change to the Drive Letter that cTorrent is located on

  • Line #09 - Change to the Drive Letter that cTorrent is located on

  • Line #10 - Change to the location of the Downloads folder you wish to use (it does not have to be in the cTorrent directory)

  • Line #13 - Change FIRST DIRECTORY portion to the location of your TMP directory (if not sure where it is, look in your config.sys for SET TMP=_____)

  • Line #13 - Change SECOND DIRECTORY portion to the location of your newly created Downloads directory (from Step 1)

  • Line #15 - Change to the proper location for cTorrent9.exe (include executable name - just change directory and drive as needed)

  • In Firefox, if you ALREADY have a Torrent app assigned, go to Tools->Options->Content (Tab)->FileTypes
    ...THEN:
    Change the association for .torrent files to Z:\cTorrent\cTorrent.CMD (or wherever you have the edited file located).



    In Firefox, if you DO NOT already have a Torrent app assigned, when asked what to do with the file (when you click on a Torrent link), select the app from the Firefox's Browse dialog and click "Always use this..."


Done deal... when you click on a Torrent now, it will automagically start cTorrent9.exe with the parameters set in the cTorrent.CMD file and download them to the directory you specified in the CMD file.

Hope that helps,
Robert


As a side note, I have added the following config options in the CMD file (directly after the exe name on line 15):
-Z -R -G

These do the following:

-Z              Use icon as process indicator.
-R              Show current Down/Up rate in Window List string.
-G              Show current download % in Window List string.


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


ddan

Thanks RobertM for doing the post(s) that I was considering on how to make
ctorrent convenient from Firefox, and doing it much better than I would have.
Got distracted on what I might "whip up" in REXX besides still trying to find
anything worthwhile to download, to justify the time spent.

A point I omitted is that it's fun to show such text mode applications to
Windows types, how small and simple the actual program is, and point out the
vast bloat of a GUI, and how glitzy graphics and rarely used "features" often
so dominate that ease of use for basic function is neglected.

But I won't argue with Saijin_Naib that GUI can be more convenient, especially
for selecting arbitrary items. What really annoys me is the rabid insistence
on ONLY using the mouse when page-up, page-down, and arrow keys are often much
faster. Many programs, regardless of OS, simply don't have alternatives.

One convenience drawback to ctorrent command line use is re-starting after
shutdown, which I usually do at least overnight. So my sketch for a REXX
program now includes starting up all torrents that are in a given directory.

Thanks for pointing out the simple way to get info into monitoring portion by
reading the window list when those parameters are given on the command line.

RobertM

#11
Hi ddan!

No problem!

Though, to be fair... it's not GUI programs that are bloated. It is (certain) Windows GUI programs (that are the ones most people are familiar with) that are bloated. Describe comes to mind as very non-bloated in comparison to it's counterparts of the day.

:)

If you don't find the time to whip something up in REXX, let me know.

Something else... you can pipe all the output to RxQueue (or a file or wherever). Using just the normal pipe operator (ie: cTorrent9.exe > SomeFileOrRxQueue) will pipe all but the errors... and the OS/2 Command Reference shows how to pipe those as well (as well as Rexx Tips and Tricks if memory serves).

With just reading STDIO, it should be sufficient... only one error came up while running it that way, and it was more of a warning that really didnt matter about it trying the default ports, and then saying that everything was OK in the same line). But, both should be able to be piped to the same (or even different) RxQueues - or a different Queue for each instance (using a random Queue Name Generator). Done that little trick before... had a centralized Queue that was know to each program, each program registered it's Queue name with it, then popped it's own info into it's own queue... then the main program just cycled through active queues while checking it's main queue for a new instance of the sub program (which it would just add to it's queues to check list).

A variant of that (for the possibility of people starting dozens of ctorrents) is to have each instance assign it's "ID" at the beginning of each string sent and pop them onto one queue that way the main program can track each individually.

Just thoughts... was chatting with Saijin yesterday and working out the needs to make such a thing work...




I also had another "idea"... there is a torrent plugin for Firefox (it makes use of some Windows torrent app, who's name alludes me at the moment). I am wondering how difficult it would be to either (a) make a plugin similar for Firefox or (b) revise the current one to work with cTorrent...

As a side note, I'd rarely use it. I still have too many random issues with FF2 on OS/2 (mostly memory leaks - most of which seem to be Javascript (ie: leaving gMail or pages with Javascript ads open) related, which eventually causes the browser to crash (either the browser itself, or Innotek Font Engine). But... it might be nice to have. My setup is kinda weird in that I am stuck with IFE 2.40 even though everyone says 2.60beta is much better - installing 2.60beta manages to destroy my desktop/ini files to the point the system will not boot (and I am too lazy to find keys for everything needed (such as xFile as an example)) and reinstall).

Anyway... since I am rambling (and I havent even started my second cup of coffee yet)... if you dont find time, let me know. I started on an installer, as well as something to timeout-prompt the user for the directory to save the torrent in (ie: pop-up "Save To:" <Dir Dialog with Favorites Dialog> and if user doesnt do anything in x seconds, it will save to the default or last location).


As a final side note, I have VX-REXX... and I seem to recall that someplace there were updates and addons that:
(1) enabled Warp style tabs in notebooks
(2) enabled all sorts of other neat controls (different progress bars, different data fields, etc)

Do you (or anyone) know where I can find such (if they exist - it mighta been the other Visual Rexx I am thinking of)? I've found fixes and patches on Hobbes... could they be there, or are those just fixes and patches as the description implies?

Thanks,
Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


ddan

Hmm to RobertM. Okay, just WHERE did you find the "-Z -R -G" switches? Went
back and read the very short doc that's included, then went looking on the
referenced ctorrent site, on to the enhanced, and I seem to have missed it.
Haven't tried in the source code, as the run-time key commands listed online
don't seem to work, for a start. Those switches aren't even listed in the
Enhanced User's Guide at:
http://www.rahul.net/dholmes/ctorrent/userguide.html#-z

Don't know that I actually need to know any more, but I'm curious where you
got them.

Anyhoo, think reading the Window List is the only practical interface, unless
there's some way to find out which strings of colored numbers that go to a
central REXX control program's standard input belongs to which torrent. Right
now I don't see how that'd work, besides that ANSI codes (that garbage up at
least copy and paste) have to be stripped out.

Here's my program outline:
At start-up:
  Look in a special directory for .torrent files.
  Start a VIO for each (via properly modified ctorrent.cmd).
Main loop:
  Every 5 seconds: Read the Window List; massage, display. (25 lines, tops.)
  Every minute: read my download directory to check for new .torrents; if
    found, move to the special directory, then start a VIO. (Firefox would be
    set to just download the .torrent.)

Believe that'd be relatively easy, and fortunately, I'm not the type who even
thinks of bells and whistles. Start-up is the most important part for me, as
I'm near certain to turn the computer off. ── Hmm. Doing proper shutdown of
several torrents would be annoying in itself. I'd just crash 'em.

But now that I've completed all of four torrents for testing and haven't found
any that are of more use than to put some magnetic domains into a certain
pattern, feel free to expand my outline into working code. I'm sure you're
busy, but it's of only passing interest to me, and decreasing.

Have an interim solution that at least avoids typing in file names to start or
re-start (the likely use since you've got the MIME type in Firefox) a torrent.
Get my KMPFS10.ZIP from Hobbes. Modify the line for the file types to just
"*.torrent", and the two lines for the executable to:
start /win c:\temp2\ctorrent9.exe
Slight modification could automatically start all torrents with one <enter>.

Sorry, nothing at all on your side notes.

RobertM

#13
Quote from: ddan on 2008.06.05, 06:38:17
Hmm to RobertM. Okay, just WHERE did you find the "-Z -R -G" switches? Went
back and read the very short doc that's included, then went looking on the
referenced ctorrent site, on to the enhanced, and I seem to have missed it.
Haven't tried in the source code, as the run-time key commands listed online
don't seem to work, for a start. Those switches aren't even listed in the
Enhanced User's Guide at:
http://www.rahul.net/dholmes/ctorrent/userguide.html#-z

I kinda have a feeling they are OS/2 specific (as the method to populate/change the Window List data would need to be).

Open a command window, do a "MODE 120,60" (that way the output doesnt scroll off the screen), and run cTorrent9.exe...

It will list all it's commandline options, with those added in a section at the bottom (their placement is also another reason I suspect they are OS/2 specific).


Quote from: ddan on 2008.06.05, 06:38:17
Don't know that I actually need to know any more, but I'm curious where you
got them.

Anyhoo, think reading the Window List is the only practical interface, unless
there's some way to find out which strings of colored numbers that go to a
central REXX control program's standard input belongs to which torrent. Right
now I don't see how that'd work, besides that ANSI codes (that garbage up at
least copy and paste) have to be stripped out.


Well, that's where RxQueue and string parsing comes in handy... you could just pipe it there. Now... as for stripping out the ANSI code... well, that is a little more difficult, but could be done, simply by having a list of what the code looks like, or analyzing the output and figuring which sections to grab...

The Escape Sequences are all pretty much the same. The format is the same as well. There is documentation on it all someplace on Hobbes (and maybe in OS/2), and I have something someplace that documents it as well.

In this particular case, you would just need to look for the Escape char, then proceed to the first "m" and get rid of that data - repeat till end of string (or even easier, grab that section of data to a stem variable (ie: MyTorrent.downloadrate.#="Whatever") look for the next ESC sequence, find the data between it and the next ESC char and place in MyTorrent.UploadRate.#, and continue...

The beauty of the output (in terms of ease of parsing) is that it only seems to use color codes... the sequences are thus pretty easy to find. They are all (if memory serves):

ESC[(MODE);(COLOR);(COLOR)m

[ being the VIO color sequence byte (ie: ESC[ indicates color/attribute change to follow)
MODE being blink, bold, etc (some dont apply in certain video modes)
COLOR being either foreground or background colors or both...
m being the end character

On the screen, that looks like:

<[1;35;40m
(the < is supposed to be an arrow pointing left - but that doesnt display)

Everything after the "m" (to the next ESC char/arrow) is actual output/displayed on the screen.


Quote from: ddan on 2008.06.05, 06:38:17
Here's my program outline:
At start-up:
  Look in a special directory for .torrent files.
  Start a VIO for each (via properly modified ctorrent.cmd).
Main loop:
  Every 5 seconds: Read the Window List; massage, display. (25 lines, tops.)
  Every minute: read my download directory to check for new .torrents; if
    found, move to the special directory, then start a VIO. (Firefox would be
    set to just download the .torrent.)


Keep in mind one problem... cTorrent only displays part of the info. The title gets cut at a certain character count (havent counted, so dont know what it is - try d/l'ing a torrent with a long name and you will see what I mean).

Thus the only problem with using the Window List data as a method unless you are very careful not to mix up torrents. For instance:

My Big Torrent Name of Some Movie I am Sharing with the World for Everyone To Enjoy - Part 1
My Big Torrent Name of Some Movie I am Sharing with the World for Everyone To Enjoy - Part 2


Will all show up on the Window List as:
My Big Torrent Name of Some Movie I am Sharing with the Wor
(or something similarly truncated - you get the point)

Now, it is possible that the data stored is larger than that, and reading it from REXX will get a longer string (ie: the limitation is in the Window List - and xWP), but I think it unlikely.


Quote from: ddan on 2008.06.05, 06:38:17

Believe that'd be relatively easy, and fortunately, I'm not the type who even
thinks of bells and whistles. Start-up is the most important part for me, as
I'm near certain to turn the computer off. ── Hmm. Doing proper shutdown of
several torrents would be annoying in itself. I'd just crash 'em.

I have shut down cTorrent while it is running. It seems to exit cleanly. I think sending it a close command whould properly shut it down. On restart, it checks what's there, then continues the download.

So... either it properly shuts down, or verifies the chunks written, and discards bad or incompleted ones from killing it - either way, considering the size of BitTorrent chunks, no big deal.


Quote from: ddan on 2008.06.05, 06:38:17

But now that I've completed all of four torrents for testing and haven't found
any that are of more use than to put some magnetic domains into a certain
pattern, feel free to expand my outline into working code. I'm sure you're
busy, but it's of only passing interest to me, and decreasing.

Well, I have a bunch of projects I really wanna do... use the pipe control in mPlayer for one (to create a GUI controller/playlist)... this as another. So, I'll see what I can do. Wanted to leave it to someone else because I am going away for another Star Trek New Voyages episode shoot in a few days and wont get to it (or mPlayer) till July.

Quote from: ddan on 2008.06.05, 06:38:17
Have an interim solution that at least avoids typing in file names to start or
re-start (the likely use since you've got the MIME type in Firefox) a torrent.
Get my KMPFS10.ZIP from Hobbes. Modify the line for the file types to just
"*.torrent", and the two lines for the executable to:
start /win c:\temp2\ctorrent9.exe
Slight modification could automatically start all torrents with one <enter>.

Neat... will check it out in a bit...

Quote from: ddan on 2008.06.05, 06:38:17

Sorry, nothing at all on your side notes.


S'ok... I need to post it in the proper thread anyway... which I should know (being a moderator and all).  ;D

Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


ddan

To RobertM and others using ctorrent9.exe:

I've got working REXX code that automates torrent start-up and semi-automates adding a new torrent. Big too large for attachments here, so is at:
http://hobbes.nmsu.edu/pub/incoming/CTORMON2.ZIP

Add all the bells and whistles you wish. I'll get back with an update after further use.