Take a look at Googles Protocol Buffers.
What Are Protocol Buffers?
Protocol buffers are Google s
language-neutral, platform-neutral,
extensible mechanism for serializing
structured data – think XML, but
smaller, faster, and simpler. You
define how you want your data to be
structured once, then you can use
special generated source code to
easily write and read your structured
data to and from a variety of data
streams and using a variety of
languages – Java, C++, or Python.
Taken from the FAQ:
How do protocol buffers differ from ASN.1, COM, CORBA, Thrift, etc?
We think all of these systems have
strengths and weaknesses. Google
relies on protocol buffers internally
and they are a vital component of our
success, but that doesn t mean they
are the ideal solution for every
problem. You should evaluate each
alternative in the context of your own
project.
It is worth noting, though, that
several of these technologies define
both an interchange format and an RPC
(remote procedure call) protocol.
Protocol buffers are just an
interchange format. They could easily
be used for RPC – and, indeed, they do
have limited support for defining RPC services – but they are not tied to
any one RPC implementation or
protocol.