Re: New Version Notification for draft-nottingham-structured-headers-00.txt

On 3 November 2017 at 17:13, Andy Green <andy@warmcat.com> wrote:

>
>
> On 11/03/2017 02:44 PM, Matthew Kerwin wrote:
>
>>
>>
>> On 3 November 2017 at 15:53, Willy Tarreau <w@1wt.eu <mailto:w@1wt.eu>>
>> wrote:
>>
>>
>>     A possible solution derivating from the suggestions above could
>>     simply be
>>     to define a few profiles for Structured Headers :
>>        - SH0 : the lowest level, implementations do not support receiving
>> as
>>          large values as specified in next level (eg: my alarm clock's
>>     ESP8266
>>
>
> Implementations that want to speak 'Bar' but don't have native int64
>> support deal with edge-cases either by using an integer-extending library,
>> or by being non-compliant.  But if 'Bar' can definitely, reasonably,
>> contain values beyond what the implementation can deal with, then that
>> implementation was never going to be interoperable anyway.
>>
>
> I hesitate to bring it up but what about MPINT / BIGINT?  They're integers
> too.


​That's exactly what I meant by "integer-extending library".  I picked
19-digit-number and int64 because they're convenient for discussion, not
because I care about the particular numbers.​



>   If you don't want a limit, then a way to escape to a representation with
> a length + MSB payload will also be able to carry keys.
>
>
​Sorry, I can't parse that.  If you don't want a limit for your particular
header, don't use the common structure to define it.​



> If a limit is ok, that the supported values doesn't fit conveniently in
> the natural type for the platform is unrelated IMHO.


​Indeed.​



>   After all ESP8266 / 32 can do RSA via BIGINT / MPINT.  And the compiler
> for ESP8266 / ESP32 supports a 64-bit long long, there's no barrier to
> using it.  As already mentioned filesizes long ago made a 32-bit limit not
> very useful.  So doesn't it make sense to just require 64-bit if there's to
> be a simple limit?
>
> ​
If your implementation has trouble dealing with certain values (having to
rely on more-complicated data structures, algorithms, memory allocations,
etc), and you want to optimise for throughput/simplicity/etc., and the
header is clearly defined to have a limit within what you can handle
natively, why not be able to take advantage of that?  I'm thinking of
JavaScript (including Node.js) here, by the way, which stores all its
numbers in IEEE 754 floats.

Cheers
-- 
  Matthew Kerwin
  http://matthew.kerwin.net.au/

Received on Friday, 3 November 2017 07:40:50 UTC