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

Request-level extensibility (top level object rather than array) #115

Closed
brong opened this issue Jul 19, 2017 · 4 comments
Closed

Request-level extensibility (top level object rather than array) #115

brong opened this issue Jul 19, 2017 · 4 comments

Comments

@brong
Copy link
Member

brong commented Jul 19, 2017

From Chris Newman:

3.2. API structure

This model only allows extensibility by adding methods or altering
method parameters. There's no way to attach properties to the entire
API request. There are a number of potentially interesting
request-level properties such as "fail on error" (stop on first error)
or "transaction"/"atomic" (either perform all methods successfully or
none of them). If you made the top-level an object and the array of
methods a property of the top-level object, you'd get request-level
extensibility.

@neilj neilj closed this as completed in a0be259 Nov 20, 2017
@cjnewman
Copy link
Contributor

Questions:

  1. How does the server respond if the client lists a capability the server doesn't recognize? (RFC5161 says the server MUST ignore unrecognized client capabilities)

  2. Does the client need an ACK for capabilities the server does recognize (RFC 5161 has the ENABLED reply)? Or can the client assume any capability listed in server capabilities will always work in the using parameter?

  3. Is it necessary to include using in every request, or is using "sticky" for the HTTP session? Is using optional for cases where it's implicit from the method call what extensions are being used?

  4. Is there a size limit on the properties the server must ignore?

@brong
Copy link
Member Author

brong commented Nov 22, 2017 via email

@cjnewman
Copy link
Contributor

RFC 5161 is based on the assumption that most server capabilities can simply be used by the client if it sees them in the server capability list so there's normally no need for additional negotiation. I think there are only 3 IMAP extensions that recommend/require explicit client enable, so an IMAP client can simply have a fixed enable string it sends to all servers and it gets a list of the enabled features back -- that's simple to implement on both ends. It's a fine model for an interactive protocol.

The Sieve require model is appropriate for a non-interactive format (although I like the ihave Sieve extension in RFC5463).

An example of a bad negotiation model for an interactive protocol is Telnet option negotiation. Consider that the "how not to do it" guide (either side can request negotiation of an option and both sides must agree to use an option).

While I can live with your proposal, I think it would be more efficient to get closer to the 5161 model where the client only lists the capabilities that enable changes to server response syntax/semantics that are not implicit from the request structure.

@brong
Copy link
Member Author

brong commented Nov 22, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants