Open Kentoseth opened 7 years ago
Hello, I wrote the original software and didn't realise people were starting to get interested in it. This particular implementation has a few problems because using a non-blocking model to manage data in Python is a really bad approach due to the design of the GIL. For this reason it would need to be refactored to use asynchronous callbacks for sockets (not that difficult, really, but the code is messy.)
Unfortunately, this would probably mean also breaking some of the hole punching code as it depends deeply on timing to work. It might make more sense to have a separate process running the hole punching code as kind of like a server. It really is painful not having threads in Python :(
I haven't had a lot of time recently to fix this but there are other libraries that do p2p networking in Python, I believe. You could checkout this library: https://github.com/ethereum/pydevp2p I don't know how good it is though.
Thank you for the response.
You mentioned this link: pydevp2p
What about this one: p2p-today ? (your opinions)
I also attempted to run the basic example between Alice and Bob, but that failed because of the hard-coded .sh file (I am running the code in a venv, so I am using python
instead of python3.3
as the call to the interpreter) - I assume the hard-coded .sh file is the issue.
Het @robertsdotpm. I am currently working on a project that aims to solve the pain of multiprocessing by providing a high level abstraction over zeromq
. Please let me know if you are interested.!
EDIT:
I have used it to create a Music Player using aplay
( which is a blocking command-line tool ).
In only ~75 lines of code, i was able to create a non-blocking music player that supports features like playlists
I see that this project is stored under:
StorjOld/pyp2p
Does this mean that this project is no longer being worked on? (it also looks like no code updates have been provided for the past 2 years)