[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fwd: A modest proposal for an OpenSocial RESTful API]
On Mar 2, 2008, at 11:30 PM, James M Snell wrote:
I definitely don't think that batched requests are ideal, and I
certainly do not agree that using POST is appropriate, however,
based on the number of times this has come up, I think there's
definitely a need for a workable approach for batched operations.
Pipelining would likely be sufficient if caching and idempotency
issues were handled well, but they're not. IMHO, the BATCH
+Multipart approach that I've proposed provides a relatively decent
compromise in that the use of BATCH makes the intent of the request
clear and bypasses the caching and idempotency issues. For
security, intermediaries can choose to block the BATCH method
entirely. In time, intermediaries such as caching proxies could
even learn how to intelligently deal with BATCH+Multipart (e.g. by
analyzing the individual batched requests according to the security
policy, etc). I'm not saying that it's problem-free, I'm just
saying that it's a workable approach.
Changing the method to BATCH doesn't make any difference. You still
allow
HTTP to be tunneled through HTTP, you still need to reimplement an
entire
server within a server and an entire client within a client, you still
need to deal with the associated bypass of all security controls, and
you
still have gained nothing whatsoever over simple HTTP pipelining.
There are no caching issues with pipelining -- only benefits. The
idempotency issue is due to error-recovery concerns when a connection is
terminated, leaving the client with an unknown as to which non-
repeatable
requests were received by the origin. Those are not helped
whatsoever by
sticking the requests inside another envelope, but can be reduced with
pipelining simply by ensuring that the connection is sustained through
the delivery of all response messages. It is a pure server
implementation
problem.
I cannot imagine a worse idea for HTTP than BATCH+Multipart, and I've
seen
them all. Multipart is a terrible way to frame messages -- it isn't
even
sane unless you assume a 7bit unreliable transport, which is what
MIME was
designed to survive within. If you want to invent a new protocol,
than do
so at the session layer -- use SSH multiplexing or SCTP or some
variation
on the HTTPng session multiplexing.
....Roy