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

And then how does a client know whether an `order` was processed before or after a specific `status`? If you start talking about adding sequence numbers or duplicating application data between `status` and `order` (and its reply), that's the creation of an ad-hoc ordering protocol I'm talking about.


that doesn't sound like a socket level problem, it's more like an application level problem? how long does it take to obey-orders()? do you want to keep spitting out logs while doing it? maybe give orders a number, and the logs can include the order number and the progress?


It's a problem that the transport level would normally solve and then provide a single coherent stream to the higher layer. But with 0mq providing multiple parallel streams between each pair of endpoints means that events from each of those streams aren't necessarily received in relative order. And yes depending how long obey-orders() takes, there are actually two instances of this ambiguity per command - when in the log stream did the call start happening, and when in the log stream did it finish. Assigning serial numbers to commands on the request-reply channel and then having the log channel publish those serials is exactly the type of having to invent an ad-hoc ordering protocol that I was talking about. Of course this can be done, but at the expense of adding accidental complexity and unnecessary resource usage.

There's a similar problem with MQTT where the spec explicitly disclaims the ordering of messages across topics. Lots of people just ignore this and write software that works perfectly fine in the real world where messages generally get transported in order anyway. But it's still technically incorrect and strikes me as a breeding ground for Heisenbugs.


> mindslight 21 hours ago | root | parent | next [–]

It's a problem that the transport level would normally solve and then provide a single coherent stream to the higher layer. But with 0mq providing multiple parallel streams between each pair of endpoints means that events from each of those streams aren't necessarily received in relative order

zeromq isn't forcing you to use multiple streams. you can just use one. reqrep, send your command, wait for the response after it's done.


And then how does that client receive the broadcast updates? (`status`)




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

Search: