[Coldstuff] ColdRPC draft
xmath
xmath@nubz.org
Tue, 8 Jan 2002 15:04:08 +0100
>I don't know anyone who's tried using MCP as a server-to-server
>connection. It *could* do the job I think, but so far most people
>have been interested in client-to-server uses only.
MCP is meant as an extension of the normal line-based client->server
session, which doesn't exist between servers. I suppose it could be
done but it wouldn't be the best choice.
>If I had to pick server-to-server RPC implementation to go with I'd
>choose SOAP or XML-RPC. ... So you can wire up calendars, games, and
>whatever other services 3rd parties are building using
>XML-over-the-web techniques.
if I had to pick something XMLish, I think BEEP would be better: SOAP
and XML-RPC are both layered on HTTP, which just isn't great for this
purpose. It isn't symmetrical and there's no real concept of a
"session" which I do need sometimes. It's just too one-shot.
Don't get me wrong, if someone has XML parsing nicely working in
Cold, I'd be happy to write XML-RPC support or so, to be able to
access other systems that use it and vice versa. But it wouldn't be
my protocol of choice for a Cold client-server or server-server
connection.
>The MCP data is sent over the same connection as ordinary chat, and
>is meant to be in a format that can be interleaved with other
>traffic. My limited understanding of SOAPs is that they're
>basically one-shot HTTP requests, existing in their own connection
>and with no other transmissions getting in the way.
ColdRPC and BEEP are even different: they're simply a dedicated
(unlike MCP which is interleaved with other data) symmetrical (unlike
SOAP and XML-RPC) connection, which allows messages in either
direction.
Note that ColdRPC has big advantages, in that it's very easy to use:
if you want to experiment with it, create some object $my_object that
derived from $remote. Add my_method and mark it as remote. Set the
+remote flag of $my_object and then you can call from anywhere (via
ColdRPC): $my_object.my_method()
With MCP you still have to worry about data conversion, registering
your package with the central handling of those things, etc. MCP etc
could possibly be made to fit the purpose of doing RPCs, but ColdRPC
fits it nicely and exactly, being custom-tailored, while still
allowing a little room for growth.
In short, they're just different protocols for different purposes.
And XML-RPC, SOAP, MCP, ColdRPC and whatever don't necessarily
exclude each other. I have the time to implement multiple of 'em :-)
(Note also I'm rather fond of efficiency: ColdRPC has a 4-byte
message header, and packs data in a way that's even more compact than
what Genesis does, except for objects because ColdRPC pack the name
while Genesis packs just the number)
- xmath
PS damn, again I sent the reply to the sender, rather than to the list