Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1632)

Issue 9102043: Support streaming record length-encoded messages.

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 4 months ago by mtp
Modified:
6 years, 6 months ago
CC:
dsymonds
Visibility:
Public.

Description

This commit introduces support for streaming from io.Reader and streaming to io.Writer with messages that have been prefixed with a varint-encoded length delimiter that indicates the size of the subsequent encoded message body payload length. There are many applications of this practice, but binary logging is one of the most notable ones. Overall the practice described in http://goo.gl/9863Z has been applied in a manner idiomatic to Go per the C++/Java reference implementations of writeDelimitedTo and mergeDelimitedFrom.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -0 lines) Patch
M proto/all_test.go View 2 chunks +68 lines, -0 lines 0 comments Download
M proto/decode.go View 1 chunk +31 lines, -0 lines 0 comments Download
M proto/encode.go View 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 8
mtp
7 years, 4 months ago (2013-05-01 20:20:38 UTC) #1
albert.strasheim
Any interest in getting this patch merged? It would definitely help us. Cheers Albert
6 years, 10 months ago (2013-11-12 21:25:56 UTC) #2
dsymonds
We aren't interested in merging this into goprotobuf. Protocol buffers are not self-delimiting, and this ...
6 years, 10 months ago (2013-11-12 21:41:01 UTC) #3
mtp
On 2013/11/12 21:41:01, dsymonds wrote: > We aren't interested in merging this into goprotobuf. Protocol ...
6 years, 10 months ago (2013-11-12 22:34:05 UTC) #4
dsymonds
Sure, but there's a lot of stuff in the C++ and Java implementations that the ...
6 years, 10 months ago (2013-11-12 22:55:59 UTC) #5
shanemhansen
On 2013/11/12 22:55:59, dsymonds wrote: > Sure, but there's a lot of stuff in the ...
6 years, 9 months ago (2013-11-28 05:52:28 UTC) #6
dsymonds
That's not my point. My point is that everything is "useful", but if that's the ...
6 years, 9 months ago (2013-11-28 05:54:41 UTC) #7
awalterschulze
6 years, 6 months ago (2014-03-14 08:47:55 UTC) #8
On 2013/11/28 05:54:41, dsymonds wrote:
> That's not my point. My point is that everything is "useful", but if
> that's the defining criteria then you'll get a big bloated package
> with an API that's hard to understand, and I'm drawing the line in a
> way that excludes record support. My comment about the C++ and Java
> implementations was mentioning that feature parity with those aren't
> an important goal for goprotobuf.

Something similar is in gogoprotobuf now.
http://code.google.com/p/gogoprotobuf/source/browse/#git%2Fio

gogoprotobuf: also known as the bloated goprotobuf ;)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b