The majority of software interfaces are broken.
-
-
Replying to @nouswaves
Servers have an explicit mapping between URI and request handler but on the client we imply the mapping of response and response handler.
1 reply 0 retweets 0 likes -
Replying to @nouswaves
The implication that we make is that a request implies a specific response handler.
1 reply 0 retweets 0 likes -
Replying to @nouswaves
This is not necessarily the case, and nowadays with asynchronous coding styles this coupling cannot always be relied on.
1 reply 0 retweets 0 likes -
Replying to @nouswaves
E.g. if I use a JavaScript promise library to make 100 GET /user/N requests in parallel I lose the request and response coupling.
1 reply 0 retweets 0 likes -
Replying to @nouswaves
Say one of the responses comes back with the user's blob - but it doesn't contain the userId. What then?
1 reply 0 retweets 0 likes -
Replying to @nouswaves
Either I rewrite the back-end code or I write extensions on top of the libraries I am using to attach request metadata to the response.
1 reply 0 retweets 0 likes -
-
Replying to @nouswaves
The simpler solution is to reframe requests and responses as explicitly encoded method signatures.
2 replies 0 retweets 0 likes -
Replying to @nouswaves
With a request: the URI is the method, its header, query and data are its arguments.
1 reply 0 retweets 0 likes
Likewise a response should encode a handler's method signature. (This has the added benefit of allowing use of the same system for push.)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.