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

Migration to Pull Streams - Experiment A #19

Closed
wants to merge 5 commits into from
Closed

Conversation

daviddias
Copy link
Member

Mode A

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

Mode A consists in having pull streams exposed from the spdy stream muxer, while layering spdy on top of Node.js Streams, which are layered on top of pull streams (using pull-pair). This mode represents the scenario used for testing the muxer, however, the real usage is Mode C.

Illustration:
image

Notes

  • Mid load tests fail due to messages being dropped. Seems that there is a problem with the backpressure mechanism when wrapping pull and Node.js streams.
  • Mega stress test runs out of memory if not throttled (and fails anyway)

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 git@github.com:libp2p/interface-connection.git -b pull
> cd interface-connection
> npm i && npm link
> cd ..
> git clone git@github.com:libp2p/interface-stream-muxer.git -b pull-mode-a
> cd interface-stream-muxer
> npm i && npm link
> cd ..
> git clone git@github.com:libp2p/js-libp2p-spdy.git -b pull-mode-a
> 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