comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: protobuff for Ada
Date: Sat, 29 Dec 2018 12:05:40 +0100
Date: 2018-12-29T12:05:40+01:00	[thread overview]
Message-ID: <q07ke7$855$1@gioia.aioe.org> (raw)
In-Reply-To: 177bddd8-297e-4c5f-85aa-31cd694e68b4@googlegroups.com

On 2018-12-29 06:53, Shark8 wrote:

> Though, it should be noted that ASN.1 is *probably* the better technology in cases where ProtoBufs are being considered:
> http://ttsiodras.github.io/asn1.html

Sorry to disappoint you in this festive time, but this approach has the 
same fundamental flaw as prepared SQL statements do. You have to bind 
native Ada objects to protocol/serialized/persistent objects forth and 
back. This does not work well in practice. In fact, it barely work at 
all considering the overhead and hazards of type conversions.

A different approach is Ada's representation clauses which describe both 
objects same. Beyond simple textbook cases that does not work either.

The best practical method so far is using manually written stream 
attributes. Unfortunately it has shortcomings too:

1. Reuse is limited and composition is unsafe because stream attributes 
are non-primitive operations.

2. Introspection is almost non-existed. Only tagged types could have it.

3. No support of error handling and versioning. Though it is possible to 
do manually that is extremely error-prone and totally lacks static 
verification when the number of test cases is huge to potentially 
infinite. Even worse, the offending cases do not show up in a normally 
functioning system. So, when detected, it is always too late.

P.S. Needless to say, the problems 1-3 fully apply to other two methods 
as well.

P.P.S. And nothing was said about referential and recursive types...

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2018-12-29 11:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-28 18:57 protobuff for Ada Per Sandberg
2018-12-29  5:53 ` Shark8
2018-12-29 11:05   ` Dmitry A. Kazakov [this message]
2018-12-31 16:55     ` Olivier Henley
2018-12-31 17:59       ` Dmitry A. Kazakov
2019-01-01 14:56         ` Olivier Henley
2019-01-02  6:57         ` G. B.
2019-01-02 10:02           ` Dmitry A. Kazakov
2019-01-01  8:05     ` Per Sandberg
2019-01-01 15:04       ` Olivier Henley
2018-12-29 13:01 ` joakimds
2018-12-29 14:52   ` Per Sandberg
2018-12-30  0:27     ` joakimds
2018-12-30  0:28     ` joakimds
2018-12-30  6:21       ` Per Sandberg
replies disabled

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