Joins (concurrency library)

Asynchronous concurrent computing API for .NET

Joins is an asynchronous concurrent computing API (Join-pattern) from Microsoft Research for the .NET Framework. It is based on join calculus and makes the concurrency constructs of the Cω language available as a CLI assembly that any CLI compliant language can use.

## Overview

[edit]

Joins can be used to express concurrency in an application using the joins pattern, usable both for multi-threaded applications as well as for event based distributed applications. The Joins API emulates declarative type-safe expression of synchronization patterns.

The Joins library emulates asynchronous and synchronous methods. An asynchronous method, in Cω and Joins parlance, is one which does not block the caller method, nor does it return any result, whereas a synchronous method blocks the caller method. In the Joins API, synchronous as well as asynchronous methods are implemented as generic delegates. Usage of generics provide type safety. For example, a set of synchronous and asynchronous method can be created and using them to create an object that implements the pattern, as:

public class JoinDemo

public readonly Asynchronous.Channel<int> Queue;
public readonly Asynchronous.Channel<string> Send;
public readonly Synchronous<int>.Channel Retrieve;
private Join joinPattern = Join.Create();

public JoinDemo()

joinPattern.Initialize(out Queue);
joinPattern.Initialize(out Send);
joinPattern.Initialize(out Retrieve);

When asynchronous methods are called, the parameters are put in a channel, which is a queue managed by the Joins runtime. The method can optionally start a new thread to process the parameters in the background, and return the results. When the corresponding synchronous method is called the parameter is returned for further processing. If no parameter is present in the queue when the synchronous method is called, the caller stalls. The Joins runtime schedules which parameter is returned based on whether it is ready.

The synchronization pattern of the methods are defined by joins patterns, which describes what happens when a set of channels are invoked. For example, what happens when Send and Retrieve are called together can be different than Send and Queue.

public void SetPatterns()

join.When(Send).And(Retrieve).Do(s => s);
join.When(Queue).And(Retrieve).Do(n => n.ToString());
join.When(Send).And(Queue).And(Retrieve).Do(s =>

Send(s);
return Retrieve();
});

## References

[edit]

* The Joins Concurrency Library
* Joins — A Concurrency Library

## External links

[edit]

* Joins at Microsoft Research

* v
* t
* e

Microsoft Research (MSR)

Main
projects|

| Languages, compilers|

* Bartok
* Bosque
* Cω
* F*
* Lean
* P
* Project Verona
* Phoenix
* Polyphonic C#
* SecPAL

|

Distributed–grid computing|

* BitVault
* Confidential Consortium Framework
* DeepSpeed
* Orleans

Internet, networking|

* AjaxView
* Avalanche
* Conference XP
* Gazelle
* HoneyMonkey
* Penny Black
* Wallop
* WikiBhasha

Other projects|

* Automatic Graph Layout
* Cognitive Toolkit
* Digits
* Holoportation
* IllumiRoom
* Image Composite Editor
* Infer.NET
* LightGBM
* LiveStation
* MyLifeBits
* Neural Network Intelligence
* NodeXL
* OneFuzz
* PhotoDNA
* SEAL
* SLAM
* T2 Temporal Prover
* WorldWide Telescope
* Z3 Theorem Prover

Operating systems|

* Barrelfish
* HomeOS
* Midori
* Singularity
* Verve

APIs|

* Accelerator
* Dryad
* Joins
* mimalloc

Launched as products|

* C#
* Comic Chat
* Detours
* F#
* Sideshow
* PixelSense (TouchLight)
* SenseCam
* ClearType
* Group Shot
* Allegiance
* TrueSkill
* Songsmith
* Xbox
* Kinect

MSR Labs
applied
research|

| Live Labs|

| Current|

* Pivot
* Seadragon
* Deep Zoom

|

Discontinued|

* Deepfish
* Listas
* Live Clipboard
* Photosynth

FUSE Labs|

* Docs.com
* Kodu

Other labs|

* Academic Search
* adCenter Labs
* Office Labs

Category

This article about software created, produced or developed by Microsoft is a stub. You can help Wikipedia by expanding it.

|

* v
* t
* e

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template