Re: Suggestions for custom application-layer protocol?

From: Måns Rullgård (mru_at_inprovide.com)
Date: 05/25/05


Date: Wed, 25 May 2005 20:33:33 +0200

Jonathan Bartlett <johnnyb@eskimo.com> writes:

>> I want the protocol to be text based rather than binary since the data
>> throughput is low.
>
> If the throughput is low, binary would be better.
>
> For example, "1.0000236" is four bytes in binary, but 10 bytes as text.

I think the OP means that the amount of data is small, so the larger
size of a text based protocol doesn't matter.

>> I also want the protocol to be based on TCP/IP. Does anyone here
>> have any suggestions on the design of a simple protocol? Are there
>> simple, standard ways of formatting text messages to be sent over a
>> TCP socket (such as comma-separated)?
>
> Read the HTTP protocol. If you really want text-based, HTTP is
> probably the way to go.

HTTP is a document retrieval protocol, not a two-way message passing
protocol, despite it's frequent abuse as such.

> My suggestion would be just to use CORBA, since it maps easily into
> most languages, has a binary representation, and is fairly standard.

CORBA is also difficult to use and debug, has a large overhead in
code, and is largely incompatible with itself. Avoid at all cost.

>> I would prefer to avoid the complexities of XML.
>
> What sort of complexities do you wish to avoid? Most of these
> complexities exist with all text-based messages.

Have you ever read the XML specification, and all the other required
documents (DTD spec, etc.)? Do so, and let's discuss complexities
afterwards.

> With XML you have the advantage that you don't have to write your
> own parser.

With XML you have the disadvantage that you have to write a
complicated parser, or integrate a huge library, for little gain.

>> Any suggestions or pointers to further reading are much appreciated.
>
> Use CORBA. There are lots of good, free ORBs, including MICO, TAO,
> and ORBit. There are also some Java ORBs.

Just keep in mind that most of these are incompatible, often even
between different versions of the same one.

-- 
Måns Rullgård
mru@inprovide.com


Relevant Pages

  • Re: Suggestions for custom application-layer protocol?
    ... > If the throughput is low, ... size of a text based protocol doesn't matter. ... HTTP is ... > complexities exist with all text-based messages. ...
    (comp.unix.programmer)
  • Re: Suggestions for custom application-layer protocol?
    ... > I want the protocol to be text based rather than binary since the data ... If the throughput is low, ... What sort of complexities do you wish to avoid? ... There are lots of good, free ORBs, including MICO, TAO, and ...
    (comp.unix.programmer)
  • Re: Suggestions for custom application-layer protocol?
    ... > I want the protocol to be text based rather than binary since the data ... If the throughput is low, ... What sort of complexities do you wish to avoid? ... There are lots of good, free ORBs, including MICO, TAO, and ...
    (comp.os.linux.embedded)
  • Re: Web Proxy Filter exception not working
    ... Allow all traffic but HTTP between all protected networks and the ... Unrestricted internet access between all protected networks and the ... The unfiltered protocol is denied so all other HTTP traffic still uses ... The intial connection to the MetroList site uses my unfiltered protocol. ...
    (microsoft.public.isa.configuration)
  • Re: Is HTTP an Async Protocol
    ... If you say that HTTP is 3 layers, which is true in one sense, ... TCP/IP is an asynchronous protocol (like most ... > network protocols). ... >> "asynch" is a term related to programming. ...
    (microsoft.public.dotnet.framework.aspnet)