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

docs: add archive notice to webrtc star and direct #1488

Merged
merged 15 commits into from
Jul 28, 2023

Conversation

p-shahi
Copy link
Member

@p-shahi p-shahi commented Nov 22, 2022

Relates to: libp2p/github-mgmt#80

@achingbrain
Copy link
Member

Can we please only archive these things when there's an actual alternative for people to use?

Right now @libp2p/webrtc-star is the only way to do browser to browser communication - once the @libp2p/webrtc transport has the browser to browser component done, then we can archive WebRTC-Star but given it hasn't even made it on to npm yet this feels a little premature.

@p-shahi
Copy link
Member Author

p-shahi commented Nov 27, 2022

@achingbrain I see your point, the alternatives don't exist or aren't mature enough. However, the primary motivation to archive was to alleviate us of further maintenance work as that's sunken cost (this includes triaging new issues) and let the community know our intention.

If you feel this is a bit too soon, I don't see any problem unarchiving them for now.
However, archiving shouldn't prevent users from still using them and technically they can fork the repos to upstream patches (as onerous as that may be for some users.)

cc: @BigLep as he was also keen to archive the older solutions

@p-shahi
Copy link
Member Author

p-shahi commented Dec 6, 2022

@BigLep poke. we discussed this in last weeks SitRep but can you confirm here as well.

@BigLep
Copy link
Contributor

BigLep commented Dec 6, 2022

I agree it stinks to pull things away from users, but it's being truthful. It's not a priority for the js-libp2p maintainers to support it. We shouldn't spend time triaging or supporting it. Lets put that effort into the general WebRTC effort.

I think the message we want to get across crystal clear is "use at your own risk. This is not maintained. Here is what we're working on to replace it."

I think we're doing this, but if we need to message this better, let's do it.

That said, @p-shahi it looks like npm hasn't been updated to make clear this is deprecated: https://www.npmjs.com/package/@libp2p/webrtc-star

Can we please do that as well?

@maschad
Copy link
Member

maschad commented Apr 19, 2023

Given that we released browser to browser in https://github.com/libp2p/js-libp2p-webrtc/releases/tag/v1.1.0 we should be good to merge this once https://www.npmjs.com/package/@libp2p/webrtc-star is deprecated on npm @p-shahi

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of extra things to do here:

  1. Update webrtc-direct/webrtc-star examples to use new webrtc transport
  2. Sweep docs to update references to old webrtc transports to point to new version

@achingbrain achingbrain changed the title chore: add archive notice to webrtc star and direct docs: add archive notice to webrtc star and direct May 10, 2023
achingbrain added a commit that referenced this pull request May 12, 2023
Add new transports to the browser example and remove the outdated webrtc-direct example as it uses a deprecated transport.

Refs: #1488
examples/libp2p-in-the-browser/README.md Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Show resolved Hide resolved
@p-shahi
Copy link
Member Author

p-shahi commented Jun 20, 2023

@maschad Can you take over this PR? i.e. replace the customizing transports with your suggestion

@maschad maschad self-assigned this Jun 20, 2023
@maschad maschad requested a review from achingbrain June 22, 2023 02:31
packages/transport-websockets/examples/index.js Outdated Show resolved Hide resolved
packages/transport-websockets/examples/package.json Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Outdated Show resolved Hide resolved
- [@chainsafe/discv5](https://github.com/chainsafe/discv5)

**Note**: `peer-discovery` services within transports (such as `js-libp2p-webrtc-star`) are automatically gathered from the `transport`, via it's `discovery` property. As such, they do not need to be added in the discovery modules. However, these transports can also be configured and disabled as the other ones.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still true of modules like kad-dht so might be worth mentioning here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the note is a bit confusing overall, since we configure our discovery service via a services module now, intuitively one would configure that separately from the transport.

So I think it's best to exclude this note.

webRTC.discovery
webRTC({
dataChannel: {
maxMessageSize: 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this config key necessary? People will copy/paste this as good config so it's worth noting why we're overriding the default value here. If the default value is wrong it should probably be changed instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this example was to hihglight that you can pass an optional maxMessageSize value as mentioned in the above paragraph.

doc/production/README.md Outdated Show resolved Hide resolved
examples/libp2p-in-the-browser/README.md Outdated Show resolved Hide resolved
@maschad maschad marked this pull request as draft June 28, 2023 19:10
@maschad maschad marked this pull request as ready for review June 28, 2023 19:51
@maschad maschad requested a review from achingbrain June 28, 2023 19:52
@maschad
Copy link
Member

maschad commented Jun 28, 2023

I've move the webRTC, websocket and webtransport examples to their own subdirectories within the libp2p-in-the-browser example subdirectory to make the more discoverable as @achingbrain suggested.

@achingbrain achingbrain merged commit 7f60b57 into master Jul 28, 2023
@achingbrain achingbrain deleted the archive-webrtc-star-and-direct branch July 28, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants