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

You are 100% correct. UDP can be used to solve this problem, in fact, UDP can be used to solve any (software) networking problem, because its kind of what networking is.

The thing that webdevs want to solve is related but different, and whether the forest is missed for the trees is sometimes hard to tell.

What webdevs want to solve is data replication in a distributed system of transactions where availability is guaranteed, performance is evaluated horizontally, change is frequent and easy, barrier to entry is low, tooling is widely available, tech is heterogeneous, and the domain is complex relational objects.

Those requirements give you a different set of tradeoffs vs financial exchanges, which despite having their own enormous challenges, certainly have different goals to the above.

So does that mean this article is a good solution to the problem? I'm not sure, its hard to tell sometimes whether all the distributed aircastles invented for web-dev really pay out vs just having a tightly integrated low-level solution, but regardless of the hypothetical optimum, its hard to argue that the proposed solution is probably a good fit for the web dev culture vs UDP, which unfortunately is something very important to take into account if you want to get stuff done.





> in a distributed system of transactions where availability is guaranteed, performance is evaluated horizontally, change is frequent and easy,

Isn't that the situation inside a CPU across its multiple cores? Data is replicated (into caches) in a distributed system of transactions, because each core uses its own L2 cache with which it interacts, and has to be sent back to main memory for consistence. Works amazing.

Another even more complex system: a multi CPU motherboard supporting NUMA access: 2 CPUs coordinate their multiple cores to send over RAM from the other CPU. I have one of these "distributed systems" at home, works amazing.

[1] https://en.wikipedia.org/wiki/Non-uniform_memory_access


Indeed, again you are right. I've gone through the same motions as you trying to understand why the webdev people make this so complicated.

For your specific question here: NUMA & cpu cores don't suffer from the P in CAP: network partitions. If one of your CPU cores randomly stops responding, your system crashes, and that's fine because it never happens. If one of your web servers stops responding, which may happen for very common reasons and so is something you should absolutely design for, your system should keep working because otherwise you cannot build a reliable system out of many disconnected components (and I do mean many).

Also note that there is no way to really check if systems are available, only that you cannot reach them, which is significantly different.

Then we've not even reached the point that the CPU die makes communication extremely fast, whereas in a datacenter you're talking milliseconds, and if you are syncing with a different system accross data centers or even with clients, that story becomes wildely different.


> If one of your CPU cores randomly stops responding, your system crashes

Are you sure about that? I actually have no idea but I'm surprised by your claim.




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

Search: