Earlier quoted context omitted.
What would all the other FDs be instead? Like an eventfd or epoll handle, it obviously couldn't be an FD so what would it actually be?
Sorry, what I meant was that FDs that aren’t sockets should be uniformly handled by the async IO syscalls rather than having to parse man pages or trip over EINVALs to figure out the answers to questions like “can I select(2) on a pidfd? Can I O_NOBLOCK a regular on-disk file?”. For a concrete example, I should be able to select/poll/epoll any file descriptor. The multiplexers can short-circuit return for things wher…
Hooray for the Sockets Interface
81–86 of 86 posts
Re: Hooray for the Sockets Interface
#82Earlier quoted context omitted.
> This is a severe limitation. Rather, it is a feature.
How so?
Standards as well as all manual pages and other documentation say that getaddrinfo() should be called via a loop by clients. And results show that almost all clients indeed do that. Therefore, on the server-side, you can do round-robin DNS, randomization (as suggested by the post linked), fall-backs, CDN things, and many other things.
Re: Hooray for the Sockets Interface
#83Earlier quoted context omitted.
Why would you implement multiple concurrent connections at the network level instead of making the one single connection work well?
Because there's no way to make that one connection that works well. IPv6 transitional state is fundamentally less stable than IPv4. If you mean that one connection should be able to use multiple address families and addresses, then yes. It would be great, but at a much higher complexity than just making several connections at once and then discarding all but the first succcessful one.
Really? With unlimited ability to tamper with the stuff below the sockets layer, you couldn't make a reliable network? I'm surprised.
Re: Hooray for the Sockets Interface
#84Earlier quoted context omitted.
Then it's libseat and seatd limitations. Why rely on a system that doesn't do what you want? Bypass it and DIY what you actually want.
I personally use a systemd-based distro (NixOS) and logind is able to handle this use case. The point of trying to support libseat was for the sake of non-systemd distros. (Though elogind would probably work too.) I certainly wouldn't DIY this; nothing would support my DIY version, which would defeat the purpose.
Re: Hooray for the Sockets Interface
#85Earlier quoted context omitted.
I personally use a systemd-based distro (NixOS) and logind is able to handle this use case. The point of trying to support libseat was for the sake of non-systemd distros. (Though elogind would probably work too.) I certainly wouldn't DIY this; nothing would support my DIY version, which would defeat the purpose.
The Linux platform gives you full control. If the box you seek doesn't exist, you have to create your own box instead of thinking inside someone else's box that doesn't even do what you need.
Re: Hooray for the Sockets Interface
#86Earlier quoted context omitted.
How so?
> How so? Standards as well as all manual pages and other documentation say that getaddrinfo() should be called via a loop by clients. And results show that almost all clients indeed do that. Therefore, on the server-side, you can do round-robin DNS, randomization (as suggested by the post linked), fall-backs, CDN things, and many other things.