> On July 23, 2015, 11:52 p.m., Benjamin Hindman wrote: > > The names 'encode' and 'decode' seem weird for the function parameters to > > Encoder and Decoder, since Encoder::encode and Decoder::decode (which are > > named the same thing) are really the things that are "encoding" and > > "decoding" the stream (i.e., adding the number and newline). These inner > > functions are more like 'serialize' and 'deserialize'? And by default > > shouldn't we just assume we'll take string to string? > > > > Also, this is not async, but I guess we'll async read data that we plug > > into Decoder::Decode?
serialize and deserialize are much clearer, thanks Ben! Yeah, it's not async for now, so we'll just plug in the data, but per my comment earlier I'll add a TODO for making it async. > On July 23, 2015, 11:52 p.m., Benjamin Hindman wrote: > > 3rdparty/libprocess/3rdparty/stout/tests/recordio_tests.cpp, line 32 > > <https://reviews.apache.org/r/36677/diff/3/?file=1019202#file1019202line32> > > > > Why not add these to try.hpp like we did with Option? Decided to punt because I'm not sure whether equality should include the error message equality, thoughts? - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36677/#review92812 ----------------------------------------------------------- On July 22, 2015, 11:24 p.m., Ben Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36677/ > ----------------------------------------------------------- > > (Updated July 22, 2015, 11:24 p.m.) > > > Review request for mesos, Anand Mazumdar, Benjamin Hindman, and Jie Yu. > > > Bugs: MESOS-3067 > https://issues.apache.org/jira/browse/MESOS-3067 > > > Repository: mesos > > > Description > ------- > > Note that most "Record-IO" encodings are used for file I/O > and consequently use a fixed-size header to encode the record > length. However, decoding a base-10 integer is more > straightforward to implement in most languages, and so this > was chosen instead. (Note that the Twitter streaming API > uses the same technique for portability). > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/Makefile.am > 2394b95462182273464f0847f416ad83c3b64485 > 3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp > 8c75f6b28c18596018eaefe427b238424aae2fd9 > 3rdparty/libprocess/3rdparty/stout/include/stout/recordio.hpp PRE-CREATION > 3rdparty/libprocess/3rdparty/stout/tests/recordio_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/36677/diff/ > > > Testing > ------- > > Added tests. > > > Thanks, > > Ben Mahler > >
