views:

823

answers:

4

Can you tell me: could I use twisted for p2p-applications creating? And what protocols should I choose for this?

+1  A: 

Yes, twisted was used to create the initial version of Bittorrent. There are some opensource libraries to start from.

Joshua
Can you show me that libs?
Ockonal
+2  A: 

bittorrent twisted python client/server

blackkettle
A: 

Yes, you can absolutely use twisted to create a p2p application. The one that comes first to my mind is Dtella (http://dtella.org/). It's uses the Direct Connect protocol.

They provide the source code, so that could get you started. I know that quite a few different university networks have DC hubs running. That seems to be the ideal use of this protocol.

Tim Swast
+6  A: 

The best solution is to use the source code for BitTorrent. It was built with Twisted until they switched over to a C++ implementation called Utorrent.

As an alternative, you also might want to take a look at Vertex.

It is a p2p library built on top of Twisted and comes with goodies like bypassing firewalls.

Its probably more complete than the other people's sample.

Unknown
Isn't Vertex unmaintained? The last release (0.2.0) was done 3 years ago (june 2006).
Tanelorn
Maybe, but its the next biggest p2p twisted software besides the old BitTorrent.
Unknown
It's not unmaintained. It's just ... sleeping. There are still occasional bugfixes, and if someone showed up with serious interest in development, things would pick up again rather quickly. There's a chicken-and-egg problem with Vertex and users: it doesn't have any users, so it doesn't get development, and it doesn't get development, so it doesn't get new users.However, the original authors (JP Calderone and myself) are still around and still interested in the project, just busy with other things until there's a compelling reason to work on it.
Glyph
@Glyph: that's one of the problems many opensource projects have. They were made for other people to use. The most successful projects were ones the author used themselves.
Unknown