Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For a slow protocol like protobufs that is rarely streamed, I agree a length prefix should be the default

One way to make streaming work is just to allow the length value to be bigger than needed and add a padding scheme at the end of the message. This is overhead free in terms of processing time since fields must be decoded sequentially anyway.



> For a slow protocol like protobufs that is rarely streamed...

In my experience, protobufs are often streamed, especially in the cases where performance matters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: