TorrentFlux.com Welcome, Guest. Please login or register.
03-12-2010, 14:30:45
Home Help Search Login Register donate
TorrentFlux Home | TorrentFlux Hosting

+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  TorrentFlux 2.1-b4rt [Current: 2.1-b4rt-98]
« previous next »
Pages: 1 ... 5 6 [7] 8 9 ... 58 Go Down Print
Author Topic: TorrentFlux 2.1-b4rt [Current: 2.1-b4rt-98]  (Read 164674 times)
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« on: 04-24-2006, 11:08:10 »



moved...

since version 2.1-b4rt-94 this version is moved to :




Do you plan to update tf-b4rt with TF2.3 as a base?

the old 2.1-branch of tf-b4rt (2.1-b4rt-xxx) is not actively developed (only fixes, minors and updates) but should be still an alternative for official 2.2/2.3.
all things from the changelogs of 2.2/2.3 are ported to both tfb-branches (except the image-vali which is only in torrentflux-b4rt but there in an extended implementation)
so old branch has "all" (except the image-vali) from 2.2/2.3 already in v98.

"torrentflux-b4rt" (which will be renamed to a real different name before going final) is a new thing and has nothing to do with the official tf-lines. only thing you can do is upgrade from official tfs to torrentflux-b4rt (check the INSTALL-doc how to do that). just check out the latest alpha, its installed "in a minute" (web-based setup + upgrade).

« Last Edit: 02-02-2007, 10:16:42 by b4rt » Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
 
michaels
Newbie
*
Offline Offline

Posts: 18



View Profile
« Reply #91 on: 05-12-2006, 08:10:05 »

Code:
<input name="btphpbin" type="Text" maxlength="254" value="<?php    //echo($cfg["btphpbin"]); ?>" size="55"><?php echo //validateFile($cfg["btphpbin"]) ?>
to:
Code:
<input name="btphpbin" type="Text" maxlength="254" value="<?php    echo($cfg["btphpbin"]); ?>" size="55"><?php echo validateFile($cfg["btphpbin"]) ?>
Logged
mb.Tab
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 574


Gotta love my Avatar !!





View Profile WWW
« Reply #92 on: 05-12-2006, 08:43:09 »

Sag mal könntest du bitte noch den Hack integrieren Smiley Wäre dir sehr dankbar....!
Logged

b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #93 on: 05-12-2006, 09:07:06 »

Code:
<input name="btphpbin" type="Text" maxlength="254" value="<?php    //echo($cfg["btphpbin"]); ?>" size="55"><?php echo //validateFile($cfg["btphpbin"]) ?>
to:
Code:
<input name="btphpbin" type="Text" maxlength="254" value="<?php    echo($cfg["btphpbin"]); ?>" size="55"><?php echo validateFile($cfg["btphpbin"]) ?>

i commented that out in a quick-way because i didnt want to delete it... as i now noticed was a no good way.

------------------------------------------------------------------------------------------------------------------------------------------------

about queue-manager-support in v61+v7 :

although its not tested tfQManager should work with tornado-clients.

tfQManager + transmission does not work !


my thoughts on queue-manager + multi + different clients.

  • one thing would be to enhance tfQManager.py to support multi-multi-clients.
    the problem (for me) in this is that i never wrote a line of python and didnt really look into the tfQManager-code but just overflew it to see it does not work in its current form. so i dunno what really awaits me if i try to do so.
  • another thing to do would be a rewrite of queue-manager. a rewrite in a generic form so its not only supporting tornado/python. when doing this a complete removal of the dependency on python may be a good step. (rewrite not in python so flux is usable without any python eg with only transmission)
    this of course means quite some work inside flux and even more work on the rewrite of a queue-manager so i dont really know atm if am willing to do so. (mainly depends on the feedback i get)

notes:
as i am not using queue-manager this would be complete for "you" (the community). so any help would be highly appreciated, especially when it comes to testing.
and of course i only think further on this if there are ppl out there who really want to use it as i dont have in mind writing code that is not used. (there is nicer code to write for the fun of writing code Wink)
so this "queueing-thingy" is complete on hold for me without feedback of "you".
i for my part would prefer having a clienthandler for a more feature-rich torrentclient (DHT, peer-exchange, SafePeer,...).

regards,
b4rt
« Last Edit: 05-16-2006, 18:03:38 by b4rt » Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #94 on: 05-12-2006, 09:50:36 »

I have a lot of following lines in the apache log:

Quote
PHP Notice:  unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Argument is not a string in /var/www/html/torrent/AliasFile.php on line 94
PHP Notice:  Undefined index:  download in /var/www/html/torrent/functions.php on line 125
PHP Notice:  Undefined index:  upload in /var/www/html/torrent/functions.php on line 129
PHP Notice:  Undefined index:  upload in /var/www/html/torrent/functions.php on line 126
PHP Notice:  Undefined index:  total in /var/www/html/torrent/functions.php on line 127
PHP Notice:  Undefined index:  total in /var/www/html/torrent/functions.php on line 128



grml.. another issue...  Sad

to fix :

AliasFile.php:
find this:
Code:
return new AliasFileTornado($inFile, $user, $fluxCfg);
change to:
Code:
return new AliasFileTornado($inFile, $user, serialize($fluxCfg));
and
find this:
Code:
return new AliasFileTransmission($inFile, $user, $fluxCfg);
change to:
Code:
return new AliasFileTransmission($inFile, $user, serialize($fluxCfg));

RunningTorrent.php
find this:
Code:
return new RunningTorrentTornado($psLine,$fluxCfg);
change to:
Code:
return new RunningTorrentTornado($psLine,serialize($fluxCfg));
and
find this:
Code:
return new RunningTorrentTransmission($psLine,$fluxCfg);
change to:
Code:
return new RunningTorrentTransmission($psLine,serialize($fluxCfg));

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #95 on: 05-12-2006, 10:04:03 »


all issues/solutions found so far written together :



regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #96 on: 05-12-2006, 15:13:49 »


because the main-post is too long already i moved out this part.


thoughts about client-handler:
some years ago i wrote a app (named 'metafront' for further references) like
flux for edonkey/overnet-clients. (it was very very low indeed, didnt use any
db, had no multi-user,... but had the same basic concept : webfrontend to operate a client)
one part (the frontend) were perl-cgis.
in userland doing the "same" like tflux. see/operate your "seeds+leeches".
the other part was a "control-wrapper" (a perl-daemon) for the
ed2k/overnet-client. (this was based on code from ocbMaurice in case someone
remembering that.)
what that daemon actually does is:
  • starts up core and pipes stdin and stdout under script control
  • stdin and stdout accessible via a socket from script
this is where the approaches differ :
  • flux uses stat-file as the interface to communicate with clients
  • metafront used the perl-daemon to communicate with the metamachine-client.
    the perl-cgis connected to the the daemon via the open socket and
    "communicated" "directly" with the core (proxied by daemon).
    means cgis were sending commands and parsing + displaying returns.
advantages of this approach are there is no need to patch the client (which was
not possible because metamachine code is closed source) and client/frontend dont
need to be on the same machine.
dis-advantage is that you need to write ugly parsing code to parse the cores
return. (gettin even nicer when client-versions output in different formats)

so why this story about an old code ?
i tried to do the client-handler-design in a way that integrating
clients with complete different interfaces should be possible.
afaic in theory writing a client-handler-implementation for a client like
azureus (commons-cli) may be done without hacking azureus. (quite some work of
course, but may be possible)
you can virtually do anything in the subclasses. all you need to serve public
are "getters/setters" for the "values" and in case of class ClientHandler
itself methods for operation of the client(s).
how you really get values and if its based on any concept like a "statfile"...
is encapsulated in the handler-classes.
the ClientHandler-implementation may not start a new process for a client but
send a "start-command" to a "multi-torrent-client".

note : i dont have in mind doing this as i dont really need it. would be a
nice to have but is no must for me. if someone wants to dig into it
and wants to take a look at the metafront code drop me a pm. (but dont
expect too much. its old and no good code.)

note : these are only thoughts and i cant really say if it would really work well
or would integrate well in torrentflux. additionally "external" tools
using stat-files (like fluxpoller.pl) would have a hard time then.


b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #97 on: 05-12-2006, 15:18:02 »



*** UPDATE v61 ***

have fun + sorry for the issues in v6.



regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #98 on: 05-12-2006, 16:14:20 »

That is some good points about the client handler interface that you've done up. My main reason in thinking it was cool is that it gives choice. If down the line some better than torrents comes along, modifying TF to use it is just a matter of a new subclass to use this new app while still leaving Bittorrent running fine.

On your bit about parsing in/out streams with the azureus example, azureus is Gui only to the best of my knowledge so how exactly did your code handle that kinda thing?
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #99 on: 05-12-2006, 17:02:15 »

That is some good points about the client handler interface that you've done up. My main reason in thinking it was cool is that it gives choice. If down the line some better than torrents comes along, modifying TF to use it is just a matter of a new subclass to use this new app while still leaving Bittorrent running fine.

On your bit about parsing in/out streams with the azureus example, azureus is Gui only to the best of my knowledge so how exactly did your code handle that kinda thing?

no it isnt. there is a option to run azureus in command-line mode like the old ed2k-cores.
its with help of the apache "commons-cli" lib as i noted in brackets.

i used this for some time and works quite well although gui is more convenient if you have an x-server.
also you can have an telnet-interface in azureus so writing an extra-wrapper "around" azureus might not even be neccessary. (might as i didnt really test the telnet-interface so far.)

i have a shell-script controlling azureus either in gui or console mode as it was pre 2.4 neccessary to execute the console-class direct. (dunno if it still is... i only use my shell-script to control it)
included scripts were not able to do so. (commons-cli wasnt included too. dunno if it is in vanilla 2.4.0.2 atm)

note: this script wont work unmodified as it integrates routingD.
Code:
#! /bin/sh
################################################################################
# $RCSfile: azureus.sh,v $                                                     #
# $Revision: 1.15 $                                                            #
# $Date: 2005/11/25 10:11:23 $                                                 #
# b4rt@hotmail.com                                                             #
#------------------------------------------------------------------------------#
# script 4 azureus                                                             #
#------------------------------------------------------------------------------#
# This Stuff is provided 'as-is'. In no way will the author be held            #
# liable for any damages to your soft- or hardware from this.                  #
# Feel free to change or rip the code.                                         #
################################################################################

# azureus-settings
AZUREUS_USER="anuser"
AZUREUS_DIR="/usr/local/share/azureus"
AZUREUS_HOME="/home/$AZUREUS_USER/.Azureus"
AZUREUS_WEBUI_PORT="6883"
AZUREUS_TELNET_PORT="6870"

# system-settings
SYSTEM_OPENFILES="2048"
SYSTEM_IP_WAN="10.0.10.1"

# bins
BIN_TELNET="/usr/bin/telnet"
BIN_SUDO="/usr/bin/sudo"
BIN_NETCAT="/usr/bin/nc"
BIN_GREP="/bin/grep"
BIN_NETSTAT="/bin/netstat"
BIN_AWK="/usr/bin/awk"
BIN_BASENAME="/usr/bin/basename"
BIN_ID="/usr/bin/id"
BIN_PS="/bin/ps"
BIN_IPTABLES="/sbin/iptables"

# routingD integration
PATH_COMMAND_FIFO="/var/routing2/COMMAND_FIFO"

################################################################################

#-------------------------------------------------------------------------------
# inits
#-------------------------------------------------------------------------------
PROGNAME=`$BIN_BASENAME $0`
AZUREUS_LOCKFILE="/$AZUREUS_HOME/.lock"
CONNECTIONS="0"

#-------------------------------------------------------------------------------
# print_usage
#-------------------------------------------------------------------------------
print_usage() {
echo
echo "Usage: $PROGNAME <cmd|start_cmd|start_gui|webui|stop_cmd|stop_gui>"
echo "       $PROGNAME <status|cons|cons_cacti>"
echo "       <cmd>         : connect to console mode azureus with telnet."
echo "       <start_cmd>   : start azureus in console mode."
echo "       <start_gui>   : start azureus in gui (swt motif) mode."
echo "       <webui>       : start swing webui as standalone application."
echo "       <stop_cmd>    : stop running console instance."
echo "       <stop_gui>    : stop running gui instance."
echo "       <status>      : show status."
echo "       <cons>        : show number of core-connections."
echo "       <cons_cacti>  : show number of core-connections formatted for cacti."
echo
}

#-------------------------------------------------------------------------------
# bail_wo_root
#-------------------------------------------------------------------------------
bail_wo_root() {
USER_ID=`$BIN_ID -u`
if [ "$USER_ID" != "0" ]; then
echo "ERROR - this script needs to be run as root"
exit 1
fi
}

#-------------------------------------------------------------------------------
# core_status
#-------------------------------------------------------------------------------
core_status() {
if [ -f $AZUREUS_LOCKFILE ]; then
return 1
else
return 0
fi
}

#-------------------------------------------------------------------------------
# get_core_connections
#-------------------------------------------------------------------------------
get_core_connections() {
CONNECTIONS=`$BIN_NETSTAT -p -n --inet 2> /dev/null | $BIN_GREP $SYSTEM_IP_WAN | $BIN_GREP -c java`
}

#-------------------------------------------------------------------------------
# start_bandwidth
#-------------------------------------------------------------------------------
start_bandwidth() {
if [ -p $PATH_COMMAND_FIFO ]; then
echo "start:java:BANDWIDTH_AZUREUS_INET" > $PATH_COMMAND_FIFO
else
echo "ERROR - $PATH_COMMAND_FIFO not present, routingD down ?"
exit 1
fi
}

#-------------------------------------------------------------------------------
# stop_bandwidth
#-------------------------------------------------------------------------------
stop_bandwidth() {
if [ -p $PATH_COMMAND_FIFO ]; then
echo "stop:java:BANDWIDTH_AZUREUS_INET" > $PATH_COMMAND_FIFO
else
echo "ERROR - $PATH_COMMAND_FIFO not present, routingD down ?"
exit 1
fi
}


#-------------------------------------------------------------------------------
# main
#-------------------------------------------------------------------------------
bail_wo_root
case "$1" in

#-----------------------------------------------------------------------------
# cmd
#-----------------------------------------------------------------------------
cmd)
core_status
if [ $? = 0 ]; then
echo "azureus is not running"
exit
fi
echo "Connecting to azureus..."
$BIN_TELNET localhost $AZUREUS_TELNET_PORT
  ;;

#-----------------------------------------------------------------------------
# start_cmd
#-----------------------------------------------------------------------------
start_cmd)
core_status
if [ $? = 1 ]; then
echo "azureus is already running ($AZUREUS_LOCKFILE)"
exit
fi
echo "Starting azureus in console mode..."
# start bandwidth
start_bandwidth
# set open files limit
ulimit -n $SYSTEM_OPENFILES
cd $AZUREUS_DIR
$BIN_SUDO -H -u $AZUREUS_USER $JAVA_HOME/bin/java -Xms16m -Xmx128m \
-cp $AZUREUS_DIR/Azureus2.jar:$AZUREUS_DIR/swt-mozilla.jar:$AZUREUS_DIR/swt.jar:$AZUREUS_DIR/log4j.jar:$AZUREUS_DIR/commons-cli.jar \
-Djava.library.path=$AZUREUS_DIR -Dazureus.install.path=$AZUREUS_DIR -Dazureus.skipSWTcheck=1 \
  org.gudy.azureus2.ui.common.Main --ui=console,telnet 2> /dev/null
rm -f $AZUREUS_LOCKFILE
# stop bandwidth
stop_bandwidth
  ;;

#-----------------------------------------------------------------------------
# start_gui
#-----------------------------------------------------------------------------
start_gui)
core_status
if [ $? = 1 ]; then
echo "azureus is already running ($AZUREUS_LOCKFILE)"
exit
fi
echo "Starting azureus in gui (swt motif) mode..."
# start bandwidth
start_bandwidth
# set open files limit
ulimit -n $SYSTEM_OPENFILES
cd $AZUREUS_DIR
$BIN_SUDO -H -u $AZUREUS_USER $JAVA_HOME/bin/java -Xms16m -Xmx128m \
-cp $AZUREUS_DIR/Azureus2.jar:$AZUREUS_DIR/swt-mozilla.jar:$AZUREUS_DIR/swt.jar \
-Djava.library.path=$AZUREUS_DIR -Dazureus.install.path=$AZUREUS_DIR \
org.gudy.azureus2.ui.swt.Main
rm -f $AZUREUS_LOCKFILE
# stop bandwidth
stop_bandwidth
  ;;

#-----------------------------------------------------------------------------
# webui
#-----------------------------------------------------------------------------
webui)
core_status
if [ $? = 0 ]; then
echo "azureus is not running"
exit
fi
echo "Starting Web-UI..."
cd $AZUREUS_DIR
#java -cp Azureus2.jar;webui.jar org.gudy.azureus2.ui.webplugin.remoteui.applet.RemoteUIApplet http://localhost:6883
$BIN_SUDO -H -u $AZUREUS_USER $JAVA_HOME/bin/java \
-cp $AZUREUS_DIR/Azureus2.jar:$AZUREUS_DIR/plugins/webui/webui.jar \
org.gudy.azureus2.ui.webplugin.remoteui.applet.RemoteUIApplet "http://localhost:$AZUREUS_WEBUI_PORT"
  ;;

#-----------------------------------------------------------------------------
# stop_cmd
#-----------------------------------------------------------------------------
  stop_cmd)
core_status
if [ $? = 0 ]; then
echo "azureus is not running"
exit
fi
echo "Stopping azureus..."
echo "erm this seems broken in azureus atm :("
echo -n "try anyway ? [y|N] "
    read shootit
    case $shootit in
    y|Y)
# shoot it
echo -n "quitting..."
cd $AZUREUS_HOME
bash -c "$BIN_NETCAT 127.0.0.1 $AZUREUS_TELNET_PORT <<STOPHERE
quit iamsure
STOPHERE"
# echo -n "." ; sleep 1 ; echo -n "." ; sleep 1 ; echo -n "." ; sleep 1 ; echo -n "."
rm -f $AZUREUS_LOCKFILE
echo "  done."
## stop bandwidth
stop_bandwidth
      ;;
    *)
      exit
      ;;
esac
  ;;

#-----------------------------------------------------------------------------
# stop_gui
#-----------------------------------------------------------------------------
  stop_gui)
core_status
if [ $? = 0 ]; then
echo "azureus is not running"
exit
fi
echo "Stopping azureus..."
cd $AZUREUS_DIR
$BIN_SUDO -H -u $AZUREUS_USER $JAVA_HOME/bin/java -Xms16m -Xmx128m \
-cp $AZUREUS_DIR/Azureus2.jar:$AZUREUS_DIR/swt-mozilla.jar:$AZUREUS_DIR/swt.jar \
-Djava.library.path=$AZUREUS_DIR -Dazureus.install.path=$AZUREUS_DIR \
org.gudy.azureus2.ui.swt.Main --closedown
rm -f $AZUREUS_LOCKFILE
echo "  done."
# stop bandwidth
stop_bandwidth
  ;;

#-----------------------------------------------------------------------------
# status
#-----------------------------------------------------------------------------
  status)
core_status
if [ $? = 1 ]; then
echo -n "azureus is running"
get_core_connections
echo " ($CONNECTIONS connections)"
else
echo "azureus is stopped"
fi
  ;;

#-----------------------------------------------------------------------------
# cons
#-----------------------------------------------------------------------------
  cons)
core_status
if [ $? = 1 ]; then
get_core_connections
echo "$CONNECTIONS connections"
else
echo "azureus is stopped"
fi
  ;;

#-----------------------------------------------------------------------------
# cons_cacti
#-----------------------------------------------------------------------------
  cons_cacti)
core_status
if [ $? = 1 ]; then
get_core_connections
echo -n "$CONNECTIONS" | $BIN_AWK '{ printf("%i", $1) }'
else
echo -n "0"
fi
  ;;

#-----------------------------------------------------------------------------
# helper
#-----------------------------------------------------------------------------
-h|--h|-help|--help|-usage|--usage)
print_usage
exit
;;

#-----------------------------------------------------------------------------
# *
#-----------------------------------------------------------------------------
*)
print_usage
core_status
if [ $? = 1 ]; then
echo -n "azureus is running"
get_core_connections
echo " ($CONNECTIONS connections)"
else
echo "azureus is stopped"
fi
echo
;;

esac


regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #100 on: 05-12-2006, 17:37:23 »

Ok wow I didn't know azureus had a proper headless client like that. There wouldn't actually be that much work to get most things working inside of TF with it using your classes. The only thing I do see that isn't there is the kill ratio although that could be done via whatever daemon is used for building the stats.

Saying all that, it'd be alot easier to totally hack TF into reading the show torrents command from the headless client to reader the index page instead of stat files but doing so locks TF's interface into azureus. While it would give some benefits there would be alot of hacking needed to get everything else working that way.
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
Paczesiowa
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 177



View Profile
« Reply #101 on: 05-12-2006, 17:43:09 »

actually why does TF use bittornado? it's kinda crappy ( plenty of bugs, no dht, running 3+ torrents result in more ram used than azureus)
Logged

ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #102 on: 05-12-2006, 17:56:47 »

TF has been around from a while (not sure how long) and azureus didn't always have these kind of features. Qrome would be a better person to answer that question though.
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #103 on: 05-12-2006, 18:06:40 »

While it would give some benefits there would be alot of hacking needed to get everything else working that way.

yes thats what scares me to do. while the handler itself might be doable as standalone thing you would have to rewrite much code of tf itself to have all supported in a transparent way. (only use classes for all kind of operations on "downloadclients"). there is much code based on the concepts "1 stat-file per torrent" and "1 pid-file per torrent". my handler for transmission eg takes care of the pid-file as transmission lacks support for one.

EDIT:
the term "AliasFile" for the interface-class would not really fit then anymore Wink

EDIT2:
i wouldnt have choosen to use the AliasFile- and RunningTorrent-interfaces at all as they are now if i would have designed all from scratch.
that functionality would belong to the Client-handler itself. its only to stay partly flux-compatible and get stuff working without rewriting even more tf-code.

« Last Edit: 05-12-2006, 18:14:41 by b4rt » Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #104 on: 05-12-2006, 18:25:13 »

Perhaps the best method of getting it into TF is to have a daemon type script running which sittings between the handler class and the azureus headless client. It loops every 5 seconds on show torrents generating stat files for running torrents and killing any ones that reach the sharekill ratio. The handler would pass any details for startings / stopping torrents to it.

I'd try writing it but I don't know python and haven't time to learn. Using something like Perl would add another dependancy and ph has exec timelimits. Saying that it's just occured to me that the stat files only need to be updated when the index page is being updated so something could be added in there to do the updating of the stat files. Only thing is that sharekill in azureus wouldn't work unless the index page was open.
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #105 on: 05-12-2006, 18:39:25 »

Perhaps the best method of getting it into TF is to have a daemon type script running which sittings between the handler class and the azureus headless client. It loops every 5 seconds on show torrents generating stat files for running torrents and killing any ones that reach the sharekill ratio. The handler would pass any details for startings / stopping torrents to it.
would have stat-files and client-integration without hacking client. probably the best atm to "hack up" on existing tf.

I'd try writing it but I don't know python and haven't time to learn.
same for me, never wrote a line of python.

Using something like Perl would add another dependancy
true when you see things like they are (tf requiring python). but ... imho a perl 5.6(+) is much more common on most *nix-flavors being not 10 years old than a recent python-version.

Saying that it's just occured to me that the stat files only need to be updated when the index page is being updated so something could be added in there to do the updating of the stat files.
jep its possible to fetch data on demand so cont. updating stat-files is not needed.

Only thing is that sharekill in azureus wouldn't work unless the index page was open.
and all tools polling stat-files (like fluxpoller.pl for mrtg-hack) wouldnt get updated data as well.

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
Pages: 1 ... 5 6 [7] 8 9 ... 58 Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP