comp.lang.ada
 help / color / mirror / Atom feed
From: hanslad@gmail.com
Subject: Re: Binary and XML serialization of types
Date: Fri, 24 Jan 2014 06:44:39 -0800 (PST)
Date: 2014-01-24T06:44:39-08:00	[thread overview]
Message-ID: <b5196a27-ae54-43a6-a6ec-4650edcb3b83@googlegroups.com> (raw)
In-Reply-To: <14k7gbu5ws82b.3pn20kh5ci50.dlg@40tude.net>

> 
> In the case 2, you should consider using packets instead of a raw octet
> 
> stream. Typically you would form an outgoing packet in the memory, using
> 
> whatever means (e.g. by a string-mapped stream) and then send the packet
> 
> out as a whole. It is especially important to do if you are going to use
> 
> NO_DELAY socket option.
> 
> 

This sounds interesting. Do you know any good examples of this? 

 
> 
> Is it a custom protocol you are going to invent? Anyway, the protocols
> 
> usually deploy some sort of packet header to describe the request and the
> 
> body of. The most efficient way is when the body length can be determined
> 
> from the header. You read the body into memory and then parse it, e.g.
> 
> using a string-mapped stream.
> 

The protocol is certanly not invented by me(OPC UA), but I want to implement it in Ada as a long term hobby project. The base types(int, IEEE-754 float) is encoded with the least significant byte appearing first (i.e. little endian).
 
> 
> > For me it would be locical to separate all the "wire information" from the
> 
> > type information. Today, the binary and xml encoding scheme is defined,
> 
> > and I had hope to be able to separate this in different packages.
> 
> 
> 
> That is doable.
> 

A simple example would be great!
As a total Ada beginner, any code examples or references to it will help me alot.

Thanks

HP


  reply	other threads:[~2014-01-24 14:44 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 18:53 Binary and XML serialization of types hanslad
2014-01-23 19:15 ` adambeneschan
2014-01-23 19:17   ` adambeneschan
2014-01-23 19:58     ` hanslad
2014-01-23 20:03       ` adambeneschan
2014-01-23 21:00       ` Dmitry A. Kazakov
2014-01-24  8:54         ` hanslad
2014-01-24 10:01           ` Dmitry A. Kazakov
2014-01-24 14:44             ` hanslad [this message]
2014-01-24 15:22               ` Dmitry A. Kazakov
2014-01-31  9:51                 ` hanslad
2014-01-31 10:49                   ` Dmitry A. Kazakov
2014-02-04 10:33                     ` AdaMagica
2014-02-04 11:14                       ` Dmitry A. Kazakov
2014-02-04 11:20                         ` AdaMagica
2014-02-04 13:04                           ` Dmitry A. Kazakov
2014-02-04 17:16                             ` AdaMagica
2014-02-04 17:57                               ` Dmitry A. Kazakov
2014-02-04 22:34                               ` Simon Wright
2014-02-05  9:02                                 ` AdaMagica
2014-02-05  9:39                                   ` Simon Wright
2014-02-05 10:35                                   ` Dmitry A. Kazakov
2014-02-05 13:03                                     ` AdaMagica
2014-02-05 13:44                                       ` G.B.
2014-02-05 15:34                                       ` Niklas Holsti
2014-02-06  1:32                                       ` adambeneschan
2014-01-24 17:36             ` Simon Wright
2014-01-24  8:44       ` Georg Bauhaus
2014-01-24 17:13         ` Simon Wright
2014-01-23 22:44   ` Simon Wright
2014-01-23 23:43     ` adambeneschan
2014-01-24  0:58       ` Randy Brukardt
2014-01-24  8:29       ` Oliver Kleinke
2014-01-24 16:22         ` adambeneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox