Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upWebRTC transport #11
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 14, 2015
Collaborator
I fixed my broken test. It took me a while to track down the source of my problem (I had copy-pasted the TCP integration tests but bucketIndex wasn't lining up in the WebRTC tests because it uses a different Contact and thus a different hash for nodeID.)
I still need to:
- Add argument
assertsper the coding convention in this repo. - Implement a thorough test suite for the
address-port-contact,webrtc-contact, andwebrtcfiles. - Clean up my commit history.
Right now I'm just using EventEmitter as a pluggable stub for a signalling server. While convenient, I'm not sure if that's ideal. Also, the wrtc package doesn't compile on all platforms so I wonder if it's not better to make the WebRTC transport its own module.
|
I fixed my broken test. It took me a while to track down the source of my problem (I had copy-pasted the TCP integration tests but I still need to:
Right now I'm just using |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 14, 2015
Member
Looking great! Keep up the awesome work. I'll proactively start reviewing and make some comments.
|
Looking great! Keep up the awesome work. I'll proactively start reviewing and make some comments. |
bookchin
reviewed
Sep 14, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
On which platforms does the wrtc package fail to compile? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 15, 2015
Collaborator
Here's a discussion about the webtorrent project deciding to remove their wrtc dependency: webtorrent/webtorrent#303. It looks like it fails to compile on Windows and some Linux variants.
|
Here's a discussion about the webtorrent project deciding to remove their wrtc dependency: webtorrent/webtorrent#303. It looks like it fails to compile on Windows and some Linux variants. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 15, 2015
Collaborator
@gordonwritescode Thanks for the feedback! I'll make that _createInstance change along with the other things I mentioned (asserts, tests, and rewriting my commits).
|
@gordonwritescode Thanks for the feedback! I'll make that |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 17, 2015
Collaborator
The tests pass for me; I have to investigate why that one is failing on travis.
|
The tests pass for me; I have to investigate why that one is failing on travis. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 17, 2015
Member
That's strange. I can investigate as well. Thanks for all your hard work on this!
|
That's strange. I can investigate as well. Thanks for all your hard work on this! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Let's add an example page/script to a new |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Let me know when you think this is ready to merge. :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 17, 2015
Member
Must be a race condition, running the build again passes. I suspect this issue already existed.
|
Must be a race condition, running the build again passes. I suspect this issue already existed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 18, 2015
Collaborator
@gordonwritescode Thanks again for taking a look. I'll do a little more clean up. Regarding new EventEmitter - sorry about that, I try to follow the coding style of what repo I work in and I should have looked more closely at that one! I'll also come with an example too. Accordingly I'll update the README.
Also, I'm not sure if you noticed, but the WebRTC transport doesn't emit a ready event (since it's ready right away). The other two transports do; it's not used anywhere in the code but I wanted to bring it up. If we wanted to do it with webrtc.js I think I would have to do it in a setImmediate call or something (otherwise it's pointless).
|
@gordonwritescode Thanks again for taking a look. I'll do a little more clean up. Regarding Also, I'm not sure if you noticed, but the WebRTC transport doesn't emit a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 18, 2015
Member
Hmmm, yeah for now I'd emit on a setImmediate for the ready event. I can't remember exactly why I decided to emit that from the other transports, but I'd rather follow the same API and we can rip it out later if need be.
Super excited to see this merged, what a great contribution!
|
Hmmm, yeah for now I'd emit on a Super excited to see this merged, what a great contribution! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 18, 2015
Collaborator
Yeah, I'm excited too. Honestly the codebase makes it really easy to contribute to; I found all the code to be simple and very clean, practically pristine. It's one of the things that attracted me to this project.
Regarding the wrtc dependency, one idea is to keep it out of package.json so it doesn't trip people up and install it separately as step in travis. And maybe add a note to the README about this step in case someone comes by and decides they want to run the tests, since it's a little out of the ordinary. I like devDependencies for this but I think most people install those by default with npm install.
|
Yeah, I'm excited too. Honestly the codebase makes it really easy to contribute to; I found all the code to be simple and very clean, practically pristine. It's one of the things that attracted me to this project. Regarding the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 18, 2015
Collaborator
I still have to test the examples but wanted to get the initial version out of the way.
|
I still have to test the examples but wanted to get the initial version out of the way. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 18, 2015
Member
Thanks for the kind words on code quality!
Instead of devDependencies, let's use optionalDependencies. That way folks can install with:
npm install --no-optional
|
Thanks for the kind words on code quality! Instead of
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jimlyndon
commented
Sep 18, 2015
|
Nice. @changetip give a coffee for @omphalos giving my browser dhts. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
changetip
Sep 18, 2015
Hi @omphalos, I've delivered a tip worth a coffee (6,397 bits/$1.50) from @jimlyndon to your ChangeTip pocket.
changetip
commented
Sep 18, 2015
|
Hi @omphalos, I've delivered a tip worth a coffee (6,397 bits/$1.50) from @jimlyndon to your ChangeTip pocket. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 20, 2015
Collaborator
Thanks @jimlyndon! Coffee and beer are two of my favorite things :)
I need to give the examples some more TLC as they're not functional in their current state.
|
Thanks @jimlyndon! Coffee and beer are two of my favorite things :) I need to give the examples some more TLC as they're not functional in their current state. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Kind of stuck on this issue at the moment. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 26, 2015
Member
Aw man, I wish I could help. I'm on Debian. I'll poke some of my Mac friends.
|
Aw man, I wish I could help. I'm on Debian. I'll poke some of my Mac friends. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 29, 2015
Member
@martindale if you have a chance could you try installing on OSX and see if you get the same compilation problem for wrtc?
|
@martindale if you have a chance could you try installing on OSX and see if you get the same compilation problem for wrtc? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Sep 29, 2015
Member
@omphalos I re-ran the Travis build to see if the EADDRINUSE error was a race condition. Looks like it's new. Perhaps some of your tests use ports that are already bound?
|
@omphalos I re-ran the Travis build to see if the EADDRINUSE error was a race condition. Looks like it's new. Perhaps some of your tests use ports that are already bound? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
martindale
Sep 29, 2015
Fortunately, I've rid myself of OSX, back to Linux for me -- maybe @unusualbob can help?
martindale
commented
Sep 29, 2015
|
Fortunately, I've rid myself of OSX, back to Linux for me -- maybe @unusualbob can help? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Sep 30, 2015
Collaborator
@gordonwritescode Regarding the tests failures, the most questionable thing I did in this batch of changes (I think) was adding a setTimeout to WebRTCTransport#_send. I did this to get one of the eamples to work properly. Unfortunately I can't test my theory that this is the cause very easily. I guess I could use travis to run and debug the tests for me, but that sounds painful.
Also, I tried running the Dockerfile (Debian) but that fails as well for me.
|
@gordonwritescode Regarding the tests failures, the most questionable thing I did in this batch of changes (I think) was adding a Also, I tried running the Dockerfile (Debian) but that fails as well for me. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Oct 1, 2015
Collaborator
I was able to work around this by rewriting the Dockerfile and using an old tag, so I'm not stuck any more. I'll take a look at the EADDRINUSE stuff before going further with the examples.
|
I was able to work around this by rewriting the Dockerfile and using an old tag, so I'm not stuck any more. I'll take a look at the EADDRINUSE stuff before going further with the examples. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@changetip send @omphalos some 1337 h4x0rz to help him finish! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
changetip
Oct 7, 2015
Hi @omphalos, I've delivered a tip worth 1 1337 h4x0rz from @gordonwritescode to your ChangeTip pocket.
changetip
commented
Oct 7, 2015
|
Hi @omphalos, I've delivered a tip worth 1 1337 h4x0rz from @gordonwritescode to your ChangeTip pocket. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Oct 7, 2015
Collaborator
Haha, alright .. hopefully over the next few days I will make some headway.
|
Haha, alright .. hopefully over the next few days I will make some headway. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Oct 10, 2015
Collaborator
@gordonwritescode I'm thinking EADDRINUSE is due to a change on travis' side. When I build master on travis, I see the same error.
|
@gordonwritescode I'm thinking EADDRINUSE is due to a change on travis' side. When I build master on travis, I see the same error. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Oct 10, 2015
Collaborator
Along these lines, I can't repro the issue when I run the tests myself (from inside docker).
|
Along these lines, I can't repro the issue when I run the tests myself (from inside docker). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I had a feeling. I'll fix the tests! Otherwise is this ready to merge? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Oct 11, 2015
Collaborator
@gordonwritescode Sorry, not ready yet. I have to wrap these examples up. I have time this weekend to work on this stuff so hopefully done real soon.
|
@gordonwritescode Sorry, not ready yet. I have to wrap these examples up. I have time this weekend to work on this stuff so hopefully done real soon. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@gordonwritescode I believe this is all set. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omphalos
Oct 12, 2015
Collaborator
@gordonwritescode just a heads up - I created a repo for the localStorage version of the storage option for the webRTC examples so it can be reused by folks in the future. Hope that sounds alright.
|
@gordonwritescode just a heads up - I created a repo for the localStorage version of the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Oct 12, 2015
Member
@omphalos that's awesome! this is such a great addition to this project. merging now and will bump version and publish to npm shortly. thanks for all the hard work! @changetip celebrate!
|
@omphalos that's awesome! this is such a great addition to this project. merging now and will bump version and publish to npm shortly. thanks for all the hard work! @changetip celebrate! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
changetip
Oct 12, 2015
Hi @omphalos, I've delivered a tip worth 1 celebrate (40,594 bits/$10.00) from @gordonwritescode to your ChangeTip pocket.
changetip
commented
Oct 12, 2015
|
Hi @omphalos, I've delivered a tip worth 1 celebrate (40,594 bits/$10.00) from @gordonwritescode to your ChangeTip pocket. |
pushed a commit
that referenced
this pull request
Oct 12, 2015
bookchin
merged commit 4b1918c
into
kadence:master
Oct 12, 2015
1 check passed
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bookchin
Oct 12, 2015
Member
Okay @omphalos, v0.6.0 is published to NPM and tagged. I've also added you as a collaborator to this repo. :) Cheers!
|
Okay @omphalos, v0.6.0 is published to NPM and tagged. I've also added you as a collaborator to this repo. :) Cheers! |
bookchin
changed the title from
WIP WebRTC transport
to
WebRTC transport
Oct 12, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Great, thanks! |


omphalos commentedSep 3, 2015
Continuing the conversation from here.
Yeah, I agree with you. I'm thinking just a
createContactfunction on the transport would be better.Good point.
I think that's a good suggestion and would simplify things a bit.