logoalt Hacker News

alethic • today at 5:37 PM • 2 replies • view on HN

Choreographic programming is well-known within the programming languages literature, which is the audience this README is intended for. The level of detail here is fine, not everything is written with being posted on news.ycombinator.com in mind.

To explain it briefly though, choreographic programming is a method of writing distributed programs that communicate in some message-passing fashion by -- rather than writing separate programs that communicate with send/recv and must be very intentionally designed to be in sync -- you have /one/ unified messaging primitive. In a typical distributed system, you might have something like A.send_to(B) / B.recv_from(A). In a choreographic system, you'd rather have something like A ~> B, where send_to and recv_from are /projected/ from ~> into separate programs during the process of compilation.

You might want this kind of abstraction for various reasons, but the biggest is that many choreographic systems offer a guarantee of deadlock-freedom. This isn't without tradeoff. At the moment, choreographic systems (and session types, another distributed abstraction) are very bad at handling any kind of failure / degraded performance over the network. There is active work within the PL community on resolving these issues, but for now, choreographic programming is primarily useful for prototypes, rather than production systems.


Replies

sebastianconcpt • today at 7:35 PM

Thanks for elaborating, I knew already what it is and is actually adequate architecture for some cases. I just complain at how is explained in an exclusive abstract level instead of an approachable dance of balancing definitions with real word examples to give our brains a break and let them breath bits of real world.

snitty • today at 6:55 PM

> not everything is written with being posted on news.ycombinator.com in mind.

The creator of this posted it here, though. So maybe if someone is posting something here we can ask that they include sufficient context for the intended readers to understand it.