Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Migration to Pull Streams - Experiment C #21

Closed
wants to merge 5 commits into from
Closed

Conversation

daviddias
Copy link
Member

@daviddias daviddias commented Aug 28, 2016

Mode C

This is one of the experiments done in order to test the migration to pull-streams, with regards to stream muxing.

Mode B consists in having pull streams exposed from the spdy stream muxer, while layering spdy on top of Node.js Streams, that are layered on pull-streams, that are layered on Node.js streams. This experiment was created because it represents most of the real scenarios, where we have Node.js streams from the transports and have to convert them to pull-streams for the connection upgrades, secio, etc, but for spdy, we need to convert it back. The problems that this solution presents match the same problems in Mode A.

Illustration:
image

Notes

  • Mid stress tests fail
  • Mega stress test runs out of memory if not throttled

How to test it yourself

In order to test this, you need to have to have the pull-streams migration of interface-connection available in your local env. Here are the steps

> git clone [email protected]:libp2p/interface-connection.git -b pull
> cd interface-connection
> npm i && npm link
> cd ..
> git clone [email protected]:libp2p/interface-stream-muxer.git -b pull-mode-c
> cd interface-stream-muxer
> npm i && npm link
> cd ..
> git clone [email protected]:libp2p/js-libp2p-spdy.git -b pull-mode-c
> cd js-libp2p-spdy 
> npm i
> npm link interface-connection
> npm link interface-stream-muxer
> npm test

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

Successfully merging this pull request may close these issues.

2 participants