Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the new draft #34

Closed
henkvancann opened this issue Sep 30, 2022 · 16 comments
Closed

Questions about the new draft #34

henkvancann opened this issue Sep 30, 2022 · 16 comments

Comments

@henkvancann
Copy link

In commit fbc5bff

Under "conversions" last sentence:

"Likewise, this means that the length of any primitive in the T domain MUST be an integer multiple of 4 Base64 characters with a minimum length of four Base64 characters."

Is this correct? It doesn't make sense to me.

@SmithSamuelM
Copy link
Contributor

SmithSamuelM commented Sep 30, 2022 via email

@henkvancann
Copy link
Author

Got it now

@henkvancann
Copy link
Author

Another question: how would you define 'naive conversion'

This is my take: https://github.com/trustoverip/acdc/wiki/naive-conversion

@SmithSamuelM
Copy link
Contributor

SmithSamuelM commented Sep 30, 2022 via email

@henkvancann
Copy link
Author

Thx, amended https://github.com/trustoverip/acdc/wiki/naive-conversion

Next question.
Last sentence in this paragraph:
"This provides an extremely compact and elegant stream parsing formula that generalizes not only support for CESR composability but also support for interleaved CESR with three of the most popular hash map serializations."
Question: does it also support both at the same time? composability OF interleaved CESR of one the popular hash map serializations?
If I use CESR to stream CBOR does that make this specific CBOR round-robin composable?

@SmithSamuelM
Copy link
Contributor

All four message serializations (JSON, CBOR, MGPK, CESR) may be interleaved in one stream. Message Bodies may be one of the four serializations. Attachments to Message Bodies are always CESR. The CESR pipelining codes enable the stream parser to detect what serialization is being for a given portion of the stream. For CESR encoded attachments and message bodies, the pipelining codes also allow interleaving Text CESR and Binary CESR with JSON, CBOR, MSGPK. So in reality there are 5 serializations supported. Text CESR, Binary CESR, JSON (text), CBOR (binary), MGPK (binary)

@SmithSamuelM
Copy link
Contributor

The term composable is used with a very specific definition in CESR its called concatenation composability. So I don’t now from your question which definition of composable your are using with regards CBOR. CBOR can be interleaved but is not concatenation composable the way CESR is.

@henkvancann
Copy link
Author

Yes, I meant concatenation composability (CESR's). But now I got my question answered: Interleaved CESR doesn't magically grant concatenation composability to the guest hash map serialization.

@SmithSamuelM
Copy link
Contributor

Yes. CBOR is binary only, it has no text domain representation so there is no possibility for it to be concatenation composable in both the text and binary domains. Likewise, JSON is text only and has no binary domain representation so there is also no possibility for it to be concatenation composable in both the text and binary domains. In a weak sense, some standards use JSON as the text domain, and CBOR as the binary domain to give a weak form of dual representation of full hash maps. CESR is a more elegant solution since its dual representation is at the individual primitive level not merely at the full hash map level. No more CBOR-JSON wars.

@henkvancann
Copy link
Author

If only they started seeing the beauty of it ;). Thx again, Sam, I am going through the white paper and I add some explanatory stuff to the glossary, concept.md (WOT-terms repo) and good old Q&A.

@SmithSamuelM
Copy link
Contributor

In the end, the beauty will only be recognized after the fact of adoption. Once we have production libraries in the open, where people don’t have to really understand it to use it, then will people see how elegant it is. We need enough early adopters to at least prime the pump of adoption but we are not going to get the standards people or the big enterprises to adopt it at first. It will be after the little guys who don’t understand it but use it because its free and open and has features that look interesting, even if they don’t understand how it works under the hood, who will start the adoption growth.

@SmithSamuelM
Copy link
Contributor

SmithSamuelM commented Oct 11, 2022 via email

@henkvancann
Copy link
Author

Thx, copied to the glossary

Non CESR Base64 conversion. How people are used to using the Base64 encode and decode. Without pre-padding etc all the stuff CESR does to ensure aligns on 24 bit boundaries so CESR never uses the '=' pad character. But naive Base64 will pad if the length is not 14 bit aligned.

@SmithSamuelM
Copy link
Contributor

SmithSamuelM commented Oct 11, 2022 via email

@henkvancann
Copy link
Author

Yes, had this correct in place already in the Glossary item itself.

24 bit aligned

@henkvancann
Copy link
Author

solved long time ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants