Messages provide the second corner stone of client/server communication in Remoting SDK, next to Channels.

In order for any information to be passed from client to server or from server to client, this information must be encoded in a way that both sides can understand it. Message components provide this functionality by offering the means to encode parameters, method name and other related information in a predetermined format and writing it to a stream that can be passed over the network - or reading a stream and decoding the respective information again.

Different message formats are provided for different needs and both client and server must use compatible message formats to successfully communicate - a BinMessage encoded call, for example, cannot be decoded by a SOAP message, or vice versa.

Just like with channels, matching message types are compatible between the different editions of Remoting SDK so, for example, a .NET client can use the BinMessage class to talk to a Delphi server using TROBinMessage, just as a an Cocoa client could use ROBinMessage.

The preferred message format for the vast majority of cases will be BinMessage, as it provides the most efficient transfer, both from a speed and bandwidth perspective. SOAP, on the other hand, is useful for accessing existing Web Services provided by third parties using this widely-used format, or to publish servers that should be accessible by non-Remoting SDK clients.

To provide more flexibility, Remoting SDK introduces the concept of Smart Services that allows you to create servers that are exposed through a variety of different message formats at the same time. This enables you to create servers that can use the efficient BinMessage when talking to your own clients, while still being open to third parties via SOAP and/or XML-RPC.

Commonly Used Message Types

  • BinMessage - fast and efficient communication using a proprietary binary format.
  • SOAP Message - standards based communication with SOAP Web Services.

Infrequently Used Message Types

  • XML-RPC Message - standards based communication using the simple XML-RPC protocol.
  • JSON Message - standards based communication using JSON, particularly well suited for JavaScript Clients.
  • BSON Message - standards based communication using Binary JSON.
  • PostMessage - simple text-based messaging.

Special Message Types

Message Envelopes

Message Envelopes are a concept that make it easy to extend and influence the on-the-wire format of data on top of what the basic Messages provide out of the box.

See Also