MIME-RPC (was Re: REST)
S. Alexander Jacobson
Thu, 17 Jan 2002 09:16:02 -0800 (Pacific Standard Time)
On Wed, 16 Jan 2002, Paul Prescod wrote:
> "S. Alexander Jacobson" wrote:
> > Ok. So, if I want to send a message to an HTTP
> > server and have it call back my HTTP server later,
> > how do I specify that?
I don't think you answered this one at all.
> > If I want to send an integer, a real, and a
> > picture, how do I do that?
> Don't think about it as sending an integer, a real and a picture. Think
> about it as sending a "employee record" which happens to include a
> height (real), a weight (integer) and a picture.
> Then you write a schema for this record format. Then you publish that on
> the Web and (ideally) get hundreds of other organizations to agree to
I completely agree. In MIME, that record format
is called a "content-type". MIME even defines a
procedure for getting organizations to agree on
the name for that type. It is RFC 2048. With
MIME-RPC, you would send e.g.
OPAQUE DATA THAT IS INTERPRETED BY A MIME-RPC
IMPLEMENTATION IN ACCORDANCE WITH THE SPEC FOR
THIS FORMAT -- THE FORMAT MIGHT BE BINARY!!!
> Answer #1 is basically today's SOAP practice and also seems to be the
> model endorsed by MIME-RPC. I don't know of any massively deployed web
> services that use that model. It is best for small, ad hoc systems where
> widely shared interoperability is not important.
It is also effectively what is used in many web
applications and therefore needs some support.
> Ansewr #2 is the picture I think is necessary for massive
> interoperability. The two "web services" that I can point to that use it
> are "the Web" which standardized on the HTML (and now XHTML) schema. And
> the world of content serialization (e.g. Meerkat) which standardized on
MIME-RPC encourages #2. The point is that for
massive interoperability, applications need to be
able to send each other messages that may include
objects of various types packaged together. MIME
is a well defined and well used mechanism for
doing exactly that.
> Creating a strongly defined schema with obvious element type names and
> wide industry buy-in is much harder than just sending parameters through
> RPC. But if your goal is to build a massively interoperable web system
> then that is what you must do. This may help you to understand why Jeff
> Bone says that REST doesn't have to be standardized. Rather, to use REST
> with XML we will have to standardized hundreds of XML vocabularies. Go
> forth and standardize!
> (actually some REST advocates have expressed a dislike of XML but I
> really don't know what else you could use to do the vocabulary
> standardization part of REST...)
XML is a useful format for defining a
serialization for specific object types. I don't
think it is a good format for transmitting
interapplication messages that are really tuples
of arbitrary type. For that MIME is much better.
S. Alexander Jacobson i2x Media
1-212-787-1914 voice 1-603-288-1280 fax