Add rewritten metadata specification #250

Open
wants to merge 1 commit into
from

Projects

None yet

3 participants

@attilamolnar
Member
attilamolnar commented Mar 16, 2016 edited

TODO:

  • Update numerics to match inspircd implementation
  • Rewrite to include the parts of 3.2 that still apply, clarifying if necessary and mention that 3.2 is deprecated (see #279)
  • Add a requirement that clients should expect to receive notifications even if they haven't subscribed to any key, e.g. if a server needs to update a client's own metadata, e.g. on oper, or auth, or if an oper sets a key on another user.
  • Specify a cap value that advertises a limit of key and/or value names
  • Drop the 3.3 versioning. (see #265)
  • #278 Additional non-normative sections
  • Remove RPL_METADATAEND replies, clients should use labeled-response
  • Allow async processing of requests

Discuss:

  • Rename CAP to just metadata (no need for version number, values are about more than notifications)
@Aerdan Aerdan and 1 other commented on an outdated diff Mar 16, 2016
extensions/metadata-3.3.md
+
+The <key> parameter of this numeric is the first key that the client was not
+subscribed to.
+
+## Compatibility with `metadata-notify`
+
+It is pointless to use `metadata-notify-2` and `metadata-notify` (as described
+in the [metadata v3.2 specification](http://ircv3.net/specs/core/metadata-3.2.html))
+together.
+
+This is because `metadata-notify` implicitly subscribes the client to all keys,
+while `metadata-notify-2` requires the client to tell the keys it wants to
+subscribe to.
+
+Servers and clients MAY support both of the mentioned extensions, but MUST NOT
+negotiate both of them at the same time in the same connection.
@Aerdan
Aerdan Mar 16, 2016 Contributor

Depending on the order, I'd allow the client to either request both (metadata-notify and then ...-2) or allow ...-2 and reject the other.

@attilamolnar
attilamolnar Mar 16, 2016 Member

Any good reason to do it that way? I've deliberately tried to avoid adding special cases like "if both are present, accept only one" or "if the order is X Y accept if Y X then reject". Servers must accept all caps in a CAP REQ or reject them all per the cap spec.

@Aerdan
Aerdan Mar 16, 2016 Contributor

By 'order' here I mean specifically each capability is in a REQ of its own; it doesn't make sense to reject ...-2 if metadata-notify was negotiated previously.

Clients MAY request metadata-notify-2 after a successful metadata-notify.

...may be the best way to phrase it.

@attilamolnar
attilamolnar Mar 16, 2016 Member

Any good reason to deliberately allow that?

@Aerdan
Aerdan Mar 16, 2016 Contributor

...Well, if a client author's developing support for IRCv3.3 metadata, they might have already negotiated metadata-notify by default. It's not a particularly good reason, though, so I won't insist on it.

@Aerdan
Contributor
Aerdan commented Mar 16, 2016

The key subscription needs to be disclosed to the client somewhere, e.g. via a METADATA key on RPL_ISUPPORT.

@jwheare jwheare referenced this pull request Mar 16, 2016
Closed

Metadata tracker #244

2 of 7 tasks complete
@attilamolnar
Member

The key subscription needs to be disclosed to the client somewhere, e.g. via a METADATA key on RPL_ISUPPORT.

I don't exactly understand what you mean. Can you elaborate? If this is about advertising the availability of the new subcommands, the presence of metadata-notify-2 implies support for them.

@Aerdan
Contributor
Aerdan commented Mar 16, 2016

Sorry, I missed a word there; the key subscription limit needs to be disclosed.

@attilamolnar
Member

I agree, that should be advertised. I think it should be in the cap's value because we can't change the format of the value of the METADATA ISUPPORT token after release and adding a new ISUPPORT token is not necessary if there is a cap already.

@Aerdan
Contributor
Aerdan commented Mar 16, 2016

I disagree; the METADATA token could be changed to use the same key/value format other RPL_ISUPPORT tokens use (TARGMAX, for instance), and clients should be able to figure out which version is which trivially.

@jwheare
Member
jwheare commented Mar 16, 2016

Changing the ISUPPORT format only if the CAP is negotiated seems reasonable.

@attilamolnar
Member

I disagree; the METADATA token could be changed to use the same key/value format other RPL_ISUPPORT tokens use (TARGMAX, for instance), and clients should be able to figure out which version is which trivially.

Clients released before this specification can't figure out "which version is which" because they expect a single integer as the value of the ISUPPORT token.

Changing the ISUPPORT format only if the CAP is negotiated seems reasonable.

Clients can request metadata-notify-2 after ISUPPORT (say after they receive a CAP NEW) and they won't get the value that way. Also existing servers have a cached ISUPPORT and send that to all clients. Having per client ISUPPORT is something they'd have to add support for separately for this case and it has no benefit over advertising as a cap value. (In fact, the cap value has benefits as it allows changing the limit on the fly for example).

@Aerdan
Contributor
Aerdan commented Mar 16, 2016

Clients released before this specification can't figure out "which version is which" because they expect a single integer as the value of the ISUPPORT token.

This is a valid criticism.

Changing the ISUPPORT format only if the CAP is negotiated seems reasonable.

This is a terrible idea.

@attilamolnar
Member
attilamolnar commented Apr 27, 2016 edited

What's the status of this? Do we need implementations for this to move forward?

@jwheare
Member
jwheare commented Apr 27, 2016 edited

Yes, and I think it should be merged with #245 so we can point to a single PR from the tracker issue.

@attilamolnar
Member

Somewhat experimental implementation here: https://github.com/attilamolnar/inspircd/tree/master%2Bmetadata

@jwheare jwheare referenced this pull request Nov 18, 2016
Closed

Problems with metadata #219

@attilamolnar attilamolnar changed the title from Add metadata-3.3 specification to Add rewritten metadata specification Nov 22, 2016
@attilamolnar
Member

More ideas: Remove the End of metadata numeric sent in reply to every METADATA command, clients that want to track when the reply ends should use labeled-response. Also allow the server to asynchronously process any METADATA request (but still in order).

@jwheare jwheare added the metadata label Jan 7, 2017
@jwheare jwheare added this to the Roadmap milestone Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment