Paradigm | concurrent computing, distributed programming |
---|---|
Developer | INRIA Inria |
Website | Inria Join |
Major implementations | |
Join Java, Polyphonic C#, Unified Parallel C, Cω, Joins library, Boost. | |
Influenced | |
Join Calculus |
Join-patterns provides a way to write concurrent, parallel and distributed computer programs by message passing. Compared to the use of threads and locks, this is a high level programming model using communication constructs model to abstract the complexity of concurrent environment and to allow scalability. Its focus is on the execution of a chord between messages atomically consumed from a group of channels.
This template is based on join-calculus and use pattern matching. Concretely, this is done by allowing the join definition of several functions and/or channels by matching concurrent call and messages patterns. It is a type of concurrency pattern pattern because it makes easier and more flexible for these entities to communicate and deal with the multi-threaded programming paradigm.
The join-pattern (or a chord in Cω) is like a super pipeline with synchronisation and matching. In fact, this concept is summarise by match and join a set of message available from different message queues, then handles them all simultaneously with one handler. It could be represented by the keywords when
to specify the first communication that we expected, with the and
to join/pair other channels and the do
to run some tasks with the different collected messages. A constructed join pattern typically takes this form:
Argument a1 of When(a1) may be a synchronous or asynchronous channel or an array of asynchronous channels. Each subsequent argument ai to And(ai) (for i > 1) must be an asynchronous channel.
More precisely, when a message matches with a chain of linked patterns causes its handler to run (in a new thread if it's in asynchronous context) otherwise the message is queued until one of its patterns is enabled; if there are several matches, an unspecified pattern is selected.Unlike an event handler, which services one of several alternative events at a time, in conjunction with all other handlers on that event, a join pattern waits for a conjunction of channels and competes for execution with any other enabled pattern.