Skip to content
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

[feature request] Demos for all connection strategies #4

Open
jeremyckahn opened this issue Apr 17, 2021 · 4 comments
Open

[feature request] Demos for all connection strategies #4

jeremyckahn opened this issue Apr 17, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@jeremyckahn
Copy link
Contributor

Hey there! Thanks for sharing this awesome library. It's one of the coolest projects I've seen recently! I've only experimented with it so far but I'm evaluating it for use in a game I'm developing.

I'd prefer to use the BitTorrent strategy because my heart yearns for decentralization. 😉 The official demo only uses the Firebase strategy, and it would be great if the alternative strategies could be toggled between to see how their behavior compares. So far I've just been hacking docs/site.js file to do this. Having this functionality on the demo site could also serve as a reference implementation for others who might want to use a decentralized strategy.

Thanks again for sharing the awesome work!

@lmangani
Copy link

All the strategies are equally featured, with the exception of the getOccupants being firebase only - so all examples literally work for either strategy and only the initialization is relevant.

@jeremyckahn
Copy link
Contributor Author

All the strategies are equally featured, with the exception of the getOccupants being firebase only - so all examples literally work for either strategy and only the initialization is relevant.

That's true, but there's a meaningful difference in how quickly pairing occurs depending on the chosen strategy. I was hoping to have a side-by-side demo of each strategy to see how the initialization time compares, as well as examine the network behavior from the browser inspector.

@lmangani
Copy link

True. The strategy comparison in the readme is quite insightful and honest. Firebase is the only one you could reliably benchmark by definition being centralized. The bittorrent strategy has been working consistently in some of our webrtc projects inside ctzn with pairing <3s on the average including mobile browsers, but we've also experienced sporadic cases where particular clients on public wifi or subpar networks were never able to connect as you might expect. We also have an experimental GUN/DAM strategy in the works we'll PR once stable. Interested in hearing your experience so far, what are you decentralizing?

@jeremyckahn
Copy link
Contributor Author

Yes, the README is excellent and helped me make the decision to use the BitTorrent strategy! I'm using that currently on https://jeremyckahn.github.io/farmhand/#online/global and am generally having good success (click the "Active Players" button to see your peers). My experience is roughly similar (2-5 seconds to connect typically with occasional flakiness on mobile). For my needs, decentralization is more important than pairing latency and reliability, so the BitTorrent strategy gives me what I need. 🙂

We also have an experimental GUN/DAM strategy in the works we'll PR once stable

That sounds interesting! I'm not familiar with GUN/DAM. What is that?

@dmotz dmotz added the enhancement New feature or request label Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants