We need help with Bittorrent

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

side.dish
level0
Posts: 9
Joined: Mon Oct 08, 2012 5:47 am

Postby side.dish » Fri Oct 26, 2012 8:55 pm

DHKold wrote:May I ask why you don't simply read the official bittorrent protocol? It's not very complicated :)

Free labor.
DHKold
level1
level1
Posts: 60
Joined: Mon Oct 08, 2012 9:29 am

Postby DHKold » Sun Oct 28, 2012 9:44 pm

paktsardines wrote:As Chris' post suggests, knowledge != experience.

Plus, I'm pretty sure Chris has better things to worry about.

It's a very simple protocol. I just think reading a two pages well written document is as fast as looking for someone that has experience, setting up the conversation and obtaing answers.
And if it's about coding something, in fine he would need to spend time on it.

By reading the subject, I'm gonna make a big guess and saying it's probably about "how to allow the game to include a torrent-based updating system" or something like this.
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Thu Nov 01, 2012 5:30 pm

It's a very simple protocol, but it can have horrific consequences if implemented incorrectly.
User avatar
ronanc
level4
level4
Posts: 563
Joined: Wed Sep 26, 2012 2:56 pm
Location: Vietnam

Postby ronanc » Thu Nov 01, 2012 5:31 pm

lukegb wrote:It's a very simple protocol, but it can have horrific consequences if implemented incorrectly.


Horrific how? Sounds interesting...
User avatar
paktsardines
level5
level5
Posts: 1752
Joined: Mon Oct 01, 2012 11:10 am
Location: Australia

Postby paktsardines » Fri Nov 02, 2012 4:26 am

Have you forgotten about Fukushima? Rumour has it that it was caused by torrents [of water] .... ah, never mind.
User avatar
Harmonica
level1
level1
Posts: 25
Joined: Sun Sep 30, 2012 1:27 pm

Postby Harmonica » Thu Nov 08, 2012 8:58 pm

Bear in mind that a lot of ISPs if not all now throttle down torrent type connections as a matter of course, because they are run or subsidised by people who fear that kind of technology.

Many games have used p2p connections and they all suffer the effects of this, most notably Blizzard earlier this year with Diablo 3 which was rendered unusable for a period in the UK because of the protocols it used, which were being throttled down.

Matters more for online only games, obviously, but still if your userbase is primarily updating via torrents they will be affected by these practices.
Collic001
level2
level2
Posts: 116
Joined: Sat Sep 29, 2012 10:41 pm
Location: United Kingdom

Postby Collic001 » Sat Nov 10, 2012 5:36 am

Harmonica wrote:Bear in mind that a lot of ISPs if not all now throttle down torrent type connections as a matter of course, because they are run or subsidised by people who fear that kind of technology.

Many games have used p2p connections and they all suffer the effects of this, most notably Blizzard earlier this year with Diablo 3 which was rendered unusable for a period in the UK because of the protocols it used, which were being throttled down.

Matters more for online only games, obviously, but still if your userbase is primarily updating via torrents they will be affected by these practices.


This is true, but not all ISPs do. In any case, Bittorrent is usually used in conjunction with direct http downloads for this reason; to help increase download speeds without replacing direct downloads altogether, with far less expense involved for the developer.

In the case of Blizzard, I'd be more inclined to point my finger at their customer support and deployment practices (everything about the launch of Diablo 3 was a needless mess) than at the protocol itself. Many developers use it without any issue at all. Bittorrent is a godsend for small companies with limited resources.
User avatar
Carmelle
level1
level1
Posts: 41
Joined: Mon Oct 22, 2012 1:20 am

Postby Carmelle » Sat Nov 10, 2012 9:35 am

Bittorrent is generally throttled in Canada by Rogers and Bell :/ not consistently though, and not for everyone. But I know a lot of friends who play WoW that always get gypped during big updates.
User avatar
koshensky
level3
level3
Posts: 407
Joined: Tue Dec 27, 2011 7:57 pm
Location: Cornwall

Postby koshensky » Sat Nov 10, 2012 10:59 am

Either way, there are plenty enough of us who aren't being throttled for using torrents, or who would still download and seed the game that it might save the server from melting down everytime they release a new update :p

I know very little about how to actually make the torrent work with private trackers and all that jazz, but I can help seed it once it's out there - which I'm imagining is half the battle anyway
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Sat Nov 10, 2012 12:35 pm

ronanc wrote:
lukegb wrote:It's a very simple protocol, but it can have horrific consequences if implemented incorrectly.


Horrific how? Sounds interesting...


You can influence the BitTorrent swarm to DDoS random addresses of your choice, by inserting peers into the swarm if Peer EXchange is enabled. Peer Exchange is a way for torrents (usually trackerless ones) to spread themselves about by allowing the peers to tell each other where the other peers for that torrent are. If you implement PEX yourself or use a library that implements it, you need to make sure that they don't inadvertently allow you to do that, usually by blocking access to ports < 1024 - which is more of a workaround than a fix.

Of course, that's less of an issue with smaller swarms, but if you can get many big swarms to all do this...

See "Lying to the Neighbours" presented at the 27th CCC.

Basically, it's never a good idea to implement BitTorrent yourself - you should always use an established library to do it, like libtorrent, because there are loads of small niggles and things which can easily be got wrong, and can either lead to "proper" torrent clients causing data corruption (which is a non-issue, because the hashes won't match, but it will cause lots of additional data to be sent to make up for the corrupted data, depending on your piece size), or issues like allowing evil peers to cause the swarm to DDoS somewhere.
User avatar
paktsardines
level5
level5
Posts: 1752
Joined: Mon Oct 01, 2012 11:10 am
Location: Australia

Postby paktsardines » Sat Nov 10, 2012 8:16 pm

Um... pretty sure the post was about making a .torrent file available, not about implementing introversion's own bittorrent client and/or protocol.

But, you are an interesting font of knowledge nonetheless. Well, a font at any rate... ;)
Last edited by paktsardines on Sun Nov 11, 2012 4:30 am, edited 1 time in total.
User avatar
ronanc
level4
level4
Posts: 563
Joined: Wed Sep 26, 2012 2:56 pm
Location: Vietnam

Postby ronanc » Sat Nov 10, 2012 8:49 pm

Here's that talk you mentioned -

http://www.youtube.com/watch?v=b3wGmTHBcv0
MaDHaTTeR
level1
level1
Posts: 10
Joined: Tue Oct 23, 2012 12:02 pm

Postby MaDHaTTeR » Sat Nov 10, 2012 10:18 pm

lukegb wrote:
ronanc wrote:
lukegb wrote:It's a very simple protocol, but it can have horrific consequences if implemented incorrectly.


Horrific how? Sounds interesting...


You can influence the BitTorrent swarm to DDoS random addresses of your choice, by inserting peers into the swarm if Peer EXchange is enabled. Peer Exchange is a way for torrents (usually trackerless ones) to spread themselves about by allowing the peers to tell each other where the other peers for that torrent are. If you implement PEX yourself or use a library that implements it, you need to make sure that they don't inadvertently allow you to do that, usually by blocking access to ports < 1024 - which is more of a workaround than a fix.

Of course, that's less of an issue with smaller swarms, but if you can get many big swarms to all do this...

See "Lying to the Neighbours" presented at the 27th CCC.

Basically, it's never a good idea to implement BitTorrent yourself - you should always use an established library to do it, like libtorrent, because there are loads of small niggles and things which can easily be got wrong, and can either lead to "proper" torrent clients causing data corruption (which is a non-issue, because the hashes won't match, but it will cause lots of additional data to be sent to make up for the corrupted data, depending on your piece size), or issues like allowing evil peers to cause the swarm to DDoS somewhere.


While that may be the case, as was stated above they aren't looking to develop a client or server, like Blizzard has done (or are they using someone else's under the cover?) But instead are looking at setting up a tracker and distributing the .torrent to help seed each release and hopefully cut down on their bandwidth. Much like the Humble Indie Bundle does. That would leave the users client responsible irrespective of what Introversion is doing, to make sure it can't be exploited and such.

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 21 guests