-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make lab environment to reliably test hyper-* scenarios #2
Comments
@ninabreznik could you check out holepunchto/hypercore#242 and try to do the stuff that @RangerMauve suggested? Maybe we can give feedback to him and @mafintosh :-) |
Hey i stumbled upon this thread by accident. It allows you to spawn peers with different behaviour and run scenarios in a (not yet fully deterministic) simulated environment sampling metrics and statistics for each simulation step. |
oh @telamon thank you soooo much :-) our project actually is kind of a bridge between two complex ecosystems.
...but for the dat part it looks very useful :-) It doesn't mention in detail how it conceptually works. Especially // ...
const {
// 1.
id, // Uniquely generated id
name, // Name of peer as specified by launch()
storage, // An instance of random-access-file,
swarm, // An instance of simulated hyperswarm
opts, // Copy of opts given to launch()
// 2.
signal, // Function signal(eventName, payload) (more on this below)
ontick, // Lets you register a handler for peer.tick event: ontick(myHandlerFun)
simulator // reference to the simulator.
} = context
// ...
|
@serapath Ah I see, yeah it only makes-sense for dat-stack simulations. But as for how it works is pretty simple, the whole simulation runs offline and in-memory. Each connection generated during simulation will yield a ThrottledStream which gives us complete control over bandwidth. So the simulator runs in iterations where each call to During each tick; we animate the simulated swarm, firing simulated Each such process iteration generates multiple The resulting logfile can be analyzed offline or in realtime but given some custom signals it can tell you how your application will behave given a network of N-Peers. The project arose as an alternative to organize 30 people to run Anyway, let me know if you give it a test-run ❤️ I've only used it to debug scaling issues in my own apps so far. P.S. |
wow, that's something you might want to add to your readme. I'll definitely try it sooner or later. Awesome to know that this exists, so we don't have to re-invent something like it :-) Thx |
@serapath yes, thank you for asking inspiring questions :) |
@telamon btw. Karissa told us you might have some time in between here and there and we could need a helping hand with some of our tasks. If that's true and you are interested, we could pay a couple of hours every week to solve issues :-) Not sure if you use the gitter chat, because I wrote you a PM a long time ago, but I guess it didn't get through. We also have a telegram group and otherwise our public gitter channel next to github. |
@todo
lab/
folder with multiple namedlab/<scenarioNameFolder>/
s inside.lab/supporter-encoder-seeder/
) would have one js file per "node", e.g.:supporter.js
encoder.js
seeder.js
server.js
which would later be - of course - replaced by the substrate nodeTo give one example for the
"brotli encoding scenario"
you were already working on,it might be possible to add the
server.js
using something like the example code below:server.js
seeder/encoder/supporter.js
package.json
fornpm start
...i hope that makes the idea of all of this more clear :-)
The text was updated successfully, but these errors were encountered: