spec: use URL patterns instead of URI templates #831
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The URL Pattern standard has finally been published. This is great news for Mercure, as it was the only missing part to publish a definitive version of the protocol, and a version 1.0 of the hub.
Until now, we've allowed multiple resources to be selected to subscribe to notifications using URI patterns (RFC 6570). This approach works, but has a few drawbacks:
This (hopefully last) change in the specification replaces usage or URI Templates by URL patterns for subscribing to several topics at the same time.
I've also taken the opportunity to separate the comparison of raw topics (exact comparison) from the comparison with URL patterns. The
topic
query parameter is still used for raw string comparison, but a newpattern
query parameter is used for URL templates. In addition, support for pattern comparison by hubs is now optional, facilitating protocol implementation.This change simplifies the implementation of the specification, and makes it possible to switch from URI patterns to URL patterns (a hub will be able to support both obsolete patterns and new ones). This is important, as Mercury is now very popular.
@wanderview, as the lead author of the URL Pattern standard, I wonder if you could verify that we are using the standard as intended.
For #588.
Next steps: