Skip to content

Commit d8d2d65

Browse files
committed
Recommend registries, and give some guidance on how to define them.
1 parent 98f4a02 commit d8d2d65

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

index.bs

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3567,6 +3567,80 @@ and makes it clear when the state described by the flags is reset.
35673567

35683568
<!-- TODO: add examples -->
35693569

3570+
<h3 id="registries">Use registries to allow constrained extensions outside the original standards track</h3>
3571+
3572+
When you expect a feature to need to be extended over time,
3573+
and it would be inappropriate to
3574+
manage that change through the same standards process that defined the original feature,
3575+
then a registry is usually the right design.
3576+
3577+
[[spec-variability#variability|"Variability complicates interoperability."]]
3578+
When a feature needs optional components,
3579+
it is easiest to manage the complication if
3580+
a single group is in charge of the whole design.
3581+
This implies that most optional features should be defined
3582+
in the same specification that defined the original feature.
3583+
3584+
Sometimes new extensions are expected to be needed in the future.
3585+
In this case, the right plan is often to
3586+
have the original standards body continue or restart
3587+
a working group to produce an update to the feature's full specification.
3588+
3589+
However, if extensions need to be defined through
3590+
a different process than updating the full specification,
3591+
a registry is usually the right way to manage the known extensions.
3592+
Default to defining either
3593+
an IANA registry governed by [[RFC8126]] or a [[w3c-process#registries|W3C Registry]],
3594+
but another similar mechanism is also acceptable.
3595+
3596+
Registries are helpful because they
3597+
3598+
1. Reduce name collisions.
3599+
1. Help readers find the name for a desired purpose.
3600+
1. Direct readers to a specification for each name
3601+
(if the registry requires this).
3602+
3603+
Items in a registry generally need to implement a defined interface
3604+
in order to plug into the specification they're extending.
3605+
The definition of the registry must be clear about this interface,
3606+
and it should require new entries to include a specification that follows it.
3607+
This roughly corresponds to
3608+
the IETF's [[RFC8126#section-4.6|Specification Required]] registration policy.
3609+
It's difficult to be confident in an interface definition
3610+
before that interface has several implementations,
3611+
so any new registry should start with at least 2-3 entries defined.
3612+
3613+
It is tempting to additionally require that registry entries be
3614+
"good" in some way beyond simply being specified.
3615+
Use a permissive registration policy instead of doing this
3616+
unless the feature includes
3617+
some way to enforce that no implementation can use an unregistered name.
3618+
The IETF has found that
3619+
when it's too hard to add entries to a registry,
3620+
implementers will often simply use names without registering them.
3621+
3622+
When a feature's main specification defines some initial registry entries,
3623+
each one can be either required or optional for implementations to recognize.
3624+
If implementations need to pick an understood registry entry to send to their recipients,
3625+
then the registry should include at least 1 required entry.
3626+
If implementations can be
3627+
divided into distinct [[spec-variability#subdivision-profile|profiles]]
3628+
that tend not to need to communicate with other profiles,
3629+
it can be sufficient for each profile to require a registry entry
3630+
even if the main specification leaves them all optional.
3631+
3632+
It can be tempting to use URLs instead of registered strings to identify extensions.
3633+
This has the benefit of making it very easy to extend the feature,
3634+
by just picking a URL from a domain that the extender controls.
3635+
However, there's no way to ensure that
3636+
these URLs point to a specification for the extension they name,
3637+
or even that the domain stays under the control of the entity that defined the extension.
3638+
URLs are appropriate for a few kinds of completely-permissionless extension,
3639+
but most of the time a WG-managed permissive registry table will work better.
3640+
3641+
See [[qaframe-spec#extensions]] for
3642+
more guidance on how to design extensibility.
3643+
35703644
<h3 id="implementability">Resolving tension between interoperability and implementability</h3>
35713645

35723646
<!--

0 commit comments

Comments
 (0)