What is it about?
Choral introduces a simple idea. Augment data types with lists of roles: simple names that abstract concurrent processes. For example, MyProtocol@(A,B,C) types an object implemented collaboratively by three roles A, B, and C. We can then codify the type of a communication from A to B as a traditional method that, given a value of type T@A, returns a value of type T@B. You can write the implementation of such methods in Choral itself. T@B com(T@A mesg); Hence, we can use methods to write choreographies. For example, we can have a client get some credentials validated from a server: Boolean@Client result = Validator@Server.check( http://ch.com( credentials ) ); The article contains many examples: concurrent computations, single sign-on, and even a mini Twitter clone. Choral’s type system allows developers to write custom communication semantics, wrt contextual needs (e.g., lossy channels, asynchronous communication, and result types and exceptions).
Featured Image
Photo by Michael Dziedzic on Unsplash
Why is it important?
One of the most remarkable traits of Choral is how it elegantly provides the most expressive choreographic programming language to date just from a simple extension of traditional data types (of Java). Besides giving developers support for writing choreographies using the typical idioms of the Java language, Choral programs in a way similar to Well, that and a very interesting compiler to #Java, in order to actually run this code. ;-)
Perspectives
Read the Original
This page is a summary of: Choral: Object-Oriented Choreographic Programming, ACM Transactions on Programming Languages and Systems, November 2023, ACM (Association for Computing Machinery),
DOI: 10.1145/3632398.
You can read the full text:
Contributors
The following have contributed to this page