Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Exhaustive Networking Tests #269

Closed
daviddias opened this issue May 25, 2016 · 5 comments
Closed

Exhaustive Networking Tests #269

daviddias opened this issue May 25, 2016 · 5 comments
Assignees

Comments

@daviddias
Copy link
Member

daviddias commented May 25, 2016

js-ipfs is really good leveraging several transports to guarantee connectivity, but it is not the best at handling error situations, from Sockets hanging up, other peers leaving and so on.

We need to beef up our networking testing suit, in a gain that we skim all of those errors out, or give better primitives for the users of js-ipfs to handle those situations.

Note that build an app like IPFS on JS is naturally hard on the network side of things, due to the fact that we open really a lot of connections to a lot of endpoints, and we cannot isolate those processes (like you would do with a go routine), one crash that is not handled properly and everything goes down. There has been an attempt to make Node.js core provide a mechanism to solve this issue, domains, but so far, there hasn't been a lot of success from the community in using it and AFAIK, the goal is to remove it from core.

This will be one of my core focus for the next few days, help is appreciated :)

@daviddias
Copy link
Member Author

daviddias commented May 26, 2016

@haadcode
Copy link
Member

haadcode commented May 26, 2016

Check orbit test (why it fails)

Tests updated and cleaned, instructions how to run the test are in the README. It passes now, most of the time.

Sometimes old peer id's are in the peer book and the test fails (if running the test several times in a row).
Sometimes only one of the peers is in the peer book and the test fails.

@daviddias
Copy link
Member Author

Sometimes only one of the peers is in the peer book and the test fails.

Note that identify is a not blocking operation. peerA can dial to peerB and only moments after, peerB will have finished identify and learn that it has a conn to peerA already open. You have to account (we typically do a setTimeout of 100 to 500ms just to be sure, specially cause everything is on the same proc)

Sometimes old peer id's are in the peer book and the test fails

I'm not sure how this is possible, need to investigate more. If you can replicate in a deterministic manner, it would be awesome

@daviddias
Copy link
Member Author

#299

@daviddias daviddias self-assigned this Sep 7, 2016
@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed js-ipfs-backlog labels Dec 5, 2016
@daviddias
Copy link
Member Author

Work happening on #299

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants