|
|
|
|
|
by unoti
4592 days ago
|
|
> Length-prefixed message framing winds up being 10-100 lines of code in almost any language/environment. Over the years, I've worked on several different systems that wrote those "10-100" lines of message framing from scratch, and had to fix subtle, hard-to-track-down bugs with those. It's a conceptually simple thing that's very easy to have subtle bugs in edge cases. Edge cases that are difficult or impossible to produce in development systems, that do happen in production systems once you're running high volumes. An example of this is sockets pausing and in the middle of sending the multi-byte length, and needing to fiddle with certain parameters on the sockets that control heartbeat and other minutia. It's certainly simple to write something that works well, but also very simple to write something that works well but will fail in subtle ways under certain kinds of circumstances. |
|
Your application protocol needs to handle timeouts (some sort of retry, preferably with some notion of idempotency).
The problem with:
> > Length-prefixed message framing winds up being 10-100 lines of code in almost any language/environment.
is that it's not really a response the ZMQ feature. With ZMQ you don't have to reimplement for every application and platform.