0

E.g. ZeroMQ offers abstract communication patterns such as pub-sub, req-rep and others and handles connections (connect before bind is possible). Why is it still common to use raw sockets such as tcp and udp?

While libraries such as ZeroMQ offer those abstraction, I don't understand why this has not become part of the operating systems themselves.

Christoph
  • 45
  • 2
  • 9

1 Answers1

1

Why is it still common to use raw sockets such as tcp and udp?

Because of time. Raw tcp and udp communication protocols have "made it" into a common standard ( bearing all obligatory compatibility promises since then ).

O/S-es, hardware devices, even MITM-sniffers rely on them for having all those RFC-standards documented properties.

While ZeroMQ and other frameworks offer higher layer abstractions atop of these underlying standards, the also need the rudimentary standards to keep the promised compatibility.


... why this has not become part of the operating systems themselves?

O/S-es, for obvious reasons of accumulating minimum overheads, occupying minimum space and for similar reasons preferred since ever, currently prefer and will prefer to re-use mature public domain standard tools, i.e. no proprietary or license-restricted tools with unknown (un)supported cross-compilation compatibility. So no bottom-up, industry-wide total re-engineering will most probably come in any near future ( at unknown costs and lead-times till mature enough, if eventually the industry happened to decide, in spite of the above, to start and survive in doing that ).

halfer
  • 19,824
  • 17
  • 99
  • 186
user3666197
  • 1
  • 6
  • 50
  • 92
  • 1
    Thanks for the input. I have used ZMQ before and love it mostly for handling connections. So I do not have to monitor lost TCP connections or wait until services are available. I'm also not discussing the underlying raw protocols which of course are still needed as a foundation. I'm rather wondering why there is no standardised high level abstraction built into O/S-es for such a common thing. At least in my programming experience - I don't want to mess with raw sockets, want a clean communication mechanism taking away the ugliness that comes with this or that raw socket. – Christoph Mar 27 '20 at 09:06