Re:The Sorry State of Convenient IPC (2014)
by JoachimSchipper on Sunday August 30, 2015 @02:29PM
(#10144107)
Encoding complex objects is just hard (in the sense that it's going to get ugly, complicated, and usually both); however, just getting framing right (i.e. ensuring that client and server agree on where messages/objects start and end) at least solves many security problems. A simple binary (tag-)length-value works, as do schemes based on http://cr.yp.to/proto/netstrings.txt.
[ Parent
| on HN ]
Re:The Sorry State of Convenient IPC (2014)
by tedunangst on Sunday August 30, 2015 @06:09PM
(#10144631)
Using new line delimiters makes the strings a little prettier, and every IO library has a function to read a line, sparing you the trouble of looking for the colon yourself.
netstrings of JSON is my goto for "trivial protocol that people can easily implement".
Re:The Sorry State of Convenient IPC (2014)
by JoachimSchipper on Sunday August 30, 2015 @04:43PM
(#10144437)
That's fairly easy when most of your data isn't binary, and when you're using only languages with good UTF-8 support, yes.