These are chat archives for anacrolix/torrent

29th
Jan 2018
Matt Joiner
@anacrolix
Jan 29 2018 01:03
where are you seeing seed stats? i don't think i ever exposed that
Denis
@elgatito
Jan 29 2018 05:38
i'm just thinking about the nature of splitting peers and seeds stats
Matt Joiner
@anacrolix
Jan 29 2018 05:49
it's easy enough to do, but doens't provide much value i think
Denis
@elgatito
Jan 29 2018 05:51
people used to see that stats
Matt Joiner
@anacrolix
Jan 29 2018 05:51
yeah we should definitely add it
you want to see it in Torrent.Stats right?
Denis
@elgatito
Jan 29 2018 05:51
yup
Matt Joiner
@anacrolix
Jan 29 2018 05:52
i think make an issue for it
Denis
@elgatito
Jan 29 2018 05:53
there is one anacrolix/torrent#231 :)
Matt Joiner
@anacrolix
Jan 29 2018 05:54
oh lol
so what would you consider to be a seed?
it could be: someone uploading to us, someone who has us unchoked, someone with all the pieces, someone with all the pieces we want, etc.
Denis
@elgatito
Jan 29 2018 05:56
I have some problems with deleting files, created by default storage, I even added funny logic to retry deleting files - https://github.com/elgatito/elementum/blob/master/bittorrent/torrent.go#L536 but still people say files are not deleting sometimes, which is strange, since I'm accessing them only through a File.Reader
Matt Joiner
@anacrolix
Jan 29 2018 05:56
you may be on windows, and you can't delete files that have open handles to them
Denis
@elgatito
Jan 29 2018 05:57
is there any popular torrent client with open source to see their logic? )
Matt Joiner
@anacrolix
Jan 29 2018 05:57
transmission and libtorrent are the big ones
transmission probably is nicer imo, but the code base is pretty huge
Denis
@elgatito
Jan 29 2018 05:58
that is why I added retries, strange which handles are opened, or we are not forcing connections close and very slow connection can take a long time to close?
herrwusel
@herrwusel
Jan 29 2018 05:59
so what would you consider to be a seed?
Isn't a seed someone who has all the pieces by definition?
Matt Joiner
@anacrolix
Jan 29 2018 06:01
lol
herrwusel
@herrwusel
Jan 29 2018 06:01
Ups, didnt mean to quote all...
But isnt that true?
Matt Joiner
@anacrolix
Jan 29 2018 06:02
yeah it's the best definition i've seen
by why is it useful?
but*
herrwusel
@herrwusel
Jan 29 2018 06:02
No idea... guess the guy is used to it because of quasar
Denis
@elgatito
Jan 29 2018 06:02
at least you know there are people who have complete torrent
Matt Joiner
@anacrolix
Jan 29 2018 06:02
but what does that tell you?
Denis
@elgatito
Jan 29 2018 06:03
having a lot of peers does not mean any of them has 100% of torrent
Matt Joiner
@anacrolix
Jan 29 2018 06:03
it's an indication of the health of the torrent i guess
herrwusel
@herrwusel
Jan 29 2018 06:03
That your chances of getting 'everything' is more likeley
Matt Joiner
@anacrolix
Jan 29 2018 06:03
yeah ok
i'll add ConnectedSeeders to TorrentStats
there's no confusing what that means
Denis
@elgatito
Jan 29 2018 06:03
you'll have a very long debugging when someone gets a low-seed torrent and asks why there are peers but download is stale :D
Matt Joiner
@anacrolix
Jan 29 2018 06:04
yeah
is this a value you expose to your users?
Denis
@elgatito
Jan 29 2018 06:04
yup
total count and active ones
Matt Joiner
@anacrolix
Jan 29 2018 06:05
okay so ConnectedSeeders will always be <= ActivePeers
I should probably rename ActivePeers to ConnectedPeers or something, i think i named it that because they had to have completed handshakes
Denis
@elgatito
Jan 29 2018 06:06
ConnectedSeeders will always be <= ActivePeers
Yes
Matt Joiner
@anacrolix
Jan 29 2018 06:06
another weird "where do you draw the line"
Denis
@elgatito
Jan 29 2018 06:07
draw the line?
herrwusel
@herrwusel
Jan 29 2018 06:07
semantics...
always the hardest :D
Matt Joiner
@anacrolix
Jan 29 2018 06:07
yes totally :P
i don't like to commit to things that have semantic meaning until i have the precise definition, otherwise you just cause more problems
herrwusel
@herrwusel
Jan 29 2018 06:08
Sure. Have a plan first then solve problems
Matt Joiner
@anacrolix
Jan 29 2018 07:22
anacrolix/torrent@ef4c0f1
Denis
@elgatito
Jan 29 2018 07:27
+    // Ordered by expected descending quantities (if all is well).
 +    TotalPeers       int
 +    PendingPeers     int
 +    ActivePeers      int
 +    ConnectedSeeders int
 +    HalfOpenPeers    int
and what is for total seeders?
Matt Joiner
@anacrolix
Jan 29 2018 07:28
there isn't. we don't know. the best information for that is what the trackers reply with
i checked transmission, i can't find anything on this doing this with connected seeders, they show some tracker seeder counts tho, which we can do too
Denis
@elgatito
Jan 29 2018 10:42
so tired managing data within boltdb (key-value in general)
probably will have to move to sqlite since we do cgo all the way
btw, xxhash is pretty fast, even comparing to murmur
Matt Joiner
@anacrolix
Jan 29 2018 12:38
yeah nosql sux
i want to see go-sqlite3 add support for sqlite blob api
i'll probably end up adding it myself