Skip to content

Delimited Messages - let's harmonize across languages #10229

Open
@otri

Description

@otri

What language does this apply to?
If it's a proto syntax change, is it for proto2 or proto3?

No syntax change.

If it's about generated code change, what programming language?

All Languages

Describe the problem you are trying to solve.

Delimited messages is so core to serializing repetitive payloads to file and network streams that it seems this should be classed as a core use case.

Describe the solution you'd like

Coming into the parsing of delimited messages fresh and pulling my hair out, I missed the details that function for C++ was contained in delimited_message_util.h. However, the solution presented by Kenton in #710 is IMHO much better and more obvious.

Please harmonize this small but critical delimited function with codegen, and let's get this key function mainlined across; Python, Java, C++, and C#. I'm using this length delimited reading/writing on three of the four languages here, and it's telling of how valuable the cross-platform nature of protocol buffers is with delimited messages.

Describe alternatives you've considered

It's varied, but stuffing the delimited reading/writing into C++ utils is confusing. It's missing from Python so always rolling own, but length delimited function is present in Java and C#. They all share uint32 length with specific byte ordering style.

Additional context
Add any other context or screenshots about the feature request here.

Not at this time.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions