|
|
|
|
|
by kentonv
1339 days ago
|
|
> distinction about disk vs network latency Ah but that's not the distinction I'm making at all. This has nothing to do with the physical latency of the network, which can easily be less than that of a disk. It's about the application-level semantics of your communication. When you are waiting for a connection to arrive on a listen socket, you have no idea how long you might wait. It might never happen. Someone elsewhere on the network has to take the initiative to connect. Depending on the protocol, the same can be true of waiting for a read or even a write. > Windows had IOCP I think Windows is over-engineered in this respect. It doesn't seem to have given Windows any recognized fundamental advantage in running databases. > And why, fundamentally, can you not use blocking APIs with threads for networking? Well, you can, especially if you're only talking to a single peer. But when you are talking to multiple parties (especially as part of the same logical task, e.g. talking to multiple back-ends to handle one incoming request) it gets unwieldy to manage a thread for each connection. |
|