Joins (concurrency Library)
   HOME

TheInfoList



OR:

Joins is an asynchronous concurrent computing
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
(
Join-pattern 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 t ...
) from
Microsoft Research Microsoft Research (MSR) is the research subsidiary of Microsoft. It was created in 1991 by Richard Rashid, Bill Gates and Nathan Myhrvold with the intent to advance state-of-the-art computing and solve difficult world problems through technologi ...
for the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
. It is based on
join calculus The join-calculus is a process calculus developed at INRIA. The join-calculus was developed to provide a formal basis for the design of distributed programming languages, and therefore intentionally avoids communications constructs found in other ...
and makes the concurrency constructs of the
Cω (pronounced "see omega"; usually written "Cw" or "Comega" whenever the "ω" symbol is not available) is a free extension to the C# programming language, developed by the WebData team in Microsoft SQL Server in collaboration with Microsoft ...
language available as a CLI assembly that any CLI compliant language can use.


Overview

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 Distribution may refer to: Mathematics *Distribution (mathematics), generalized functions used to formulate solutions of partial differential equations *Probability distribution, the probability of a particular value or value range of a varia ...
applications. The Joins API emulates declarative
type-safe In computer science, type safety and type soundness are the extent to which a programming language discourages or prevents type errors. Type safety is sometimes alternatively considered to be a property of facilities of a computer language; that is ...
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 Generic or generics may refer to: In business * Generic term, a common name used for a range or class of similar things not protected by trademark * Generic brand, a brand for a product that does not have an associated brand or trademark, other ...
delegate Delegate or delegates may refer to: * Delegate, New South Wales, a town in Australia * Delegate (CLI), a computer programming technique * Delegate (American politics), a representative in any of various political organizations * Delegate (Unit ...
s. 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 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()


References


The Joins Concurrency LibraryJoins — A Concurrency Library


External links


Joins at Microsoft Research
Concurrent programming libraries Microsoft Research Articles with example Java code {{Microsoft-software-stub