HOME

TheInfoList



OR:

Reactive Streams is an initiative to provide a
standard Standard may refer to: Symbols * Colours, standards and guidons, kinds of military signs * Standard (emblem), a type of a large symbol or emblem used for identification Norms, conventions or requirements * Standard (metrology), an object ...
for
asynchronous Asynchrony is the state of not being in synchronization. Asynchrony or asynchronous may refer to: Electronics and computing * Asynchrony (computer programming), the occurrence of events independent of the main program flow, and ways to deal wit ...
stream processing In computer science, stream processing (also known as event stream processing, data stream processing, or distributed stream processing) is a programming paradigm which views data streams, or sequences of events in time, as the central input and o ...
with non-blocking back pressure.reactive-streams.org
/ref> __TOC__


Origin

Reactive Streams started as an initiative in late 2013 between engineers at
Netflix Netflix, Inc. is an American subscription video on-demand over-the-top streaming service and production company based in Los Gatos, California. Founded in 1997 by Reed Hastings and Marc Randolph in Scotts Valley, California, it offers a ...
, Pivotal and
Lightbend Lightbend, formerly known as Typesafe, is a company founded by Martin Odersky, the creator of the Scala programming language, Jonas Bonér, the creator of the Akka middleware, and Paul Phillips in 2011. It provides an open-source platform for ...
. Some of the earliest discussions began in 2013 between the
Play Play most commonly refers to: * Play (activity), an activity done for enjoyment * Play (theatre), a work of drama Play may refer also to: Computers and technology * Google Play, a digital content service * Play Framework, a Java framework * P ...
and
Akka Akka or AKKA may refer to: Arts and entertainment * ''Akka'' (film), a 1976 Indian Tamil film * ''Akka'' (TV series), a 2014–2015 Indian Tamil soap opera * Akka, a character in the children's novel ''The Wonderful Adventures of Nils'' by Selma ...
teams at Lightbend. Lightbend is one of the main contributors of Reactive Streams. Other contributors include Red Hat,
Oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The wor ...
,
Twitter Twitter is an online social media and social networking service owned and operated by American company Twitter, Inc., on which users post and interact with 280-character-long messages known as "tweets". Registered users can post, like, and ...
and spray.io.


Goals

The main goal of Reactive Streams is to govern the exchange of stream data across an asynchronous boundary like passing elements on to another
thread Thread may refer to: Objects * Thread (yarn), a kind of thin yarn used for sewing ** Thread (unit of measurement), a cotton yarn measure * Screw thread, a helical ridge on a cylindrical fastener Arts and entertainment * ''Thread'' (film), 2016 ...
or
thread-pool In computer programming, a thread pool is a software design pattern for achieving Concurrency (computer science), concurrency of execution in a computer program. Often also called a replicated workers or worker-crew model, a thread pool maintains ...
while ensuring that the receiving side is not forced to
buffer Buffer may refer to: Science * Buffer gas, an inert or nonflammable gas * Buffer solution, a solution used to prevent changes in pH * Buffering agent, the weak acid or base in a buffer solution * Lysis buffer, in cell biology * Metal ion buffer * ...
arbitrary amounts of data. In other words, back pressure is an integral part of this model in order to allow the queues which mediate between threads to be bounded. The intention of the specification is to allow the creation of many conforming
implementation Implementation is the realization of an application, or execution of a plan, idea, model, design, specification, standard, algorithm, or policy. Industry-specific definitions Computer science In computer science, an implementation is a real ...
s, which by virtue of abiding by the rules will be able to
interoperate Interoperability is a characteristic of a product or system to work with other products or systems. While the term was initially defined for information technology or systems engineering services to allow for information exchange, a broader defi ...
smoothly, preserving the mentioned benefits and characteristics across the whole processing graph of a stream application. A freely-available
Technology Compatibility Kit A Technology Compatibility Kit (TCK) is a suite of tests that at least nominally checks a particular alleged implementation of a Java Specification Request (JSR) for compliance. It is one of the three required pieces for a ratified JSR in the Java ...
was developed alongside the specification that allows implementors of the specification to verify if they covered all rules and requirements, including checks for potential race conditions. The scope of Reactive Streams is a minimal set of
interfaces Interface or interfacing may refer to: Academic journals * ''Interface'' (journal), by the Electrochemical Society * ''Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics'' * '' Inte ...
, methods and protocols that describe the necessary operations and entities to achieve the asynchronous streams of data with non-blocking back pressure. End-user DSLs or protocol binding
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 ...
s have purposefully been left out of the scope to encourage and enable different implementations that potentially use different programming languages to stay as true as possible to the idioms of their platform.


Inclusion in Java standard

The specification developed with the intent of future inclusion in the official Java standard library, if proven successful and adopted by enough libraries and vendors. Reactive Streams were proposed to become part of
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
9 by
Doug Lea Douglas S. Lea is a professor of computer science and current head of the computer science department at State University of New York at Oswego, where he specializes in concurrent programming and the design of concurrent data structures. He was o ...
, leader of
JSR 166 The Java programming language and the Java virtual machine (JVM) have been designed to support concurrent programming, and all execution takes place in the context of threads. Objects and resources can be accessed by many separate threads; each ...
as a new Flow class that would include the interfaces currently provided by Reactive Streams.JEP 266: More Concurrency Updates
/ref> After a successful 1.0 release of Reactive Streams and growing adoption, the proposal was accepted and Reactive Streams was included in JDK9 via the JEP-266.


Adoption

On April 30, 2015 version 1.0.0 of Reactive Streams for the
JVM A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes ...
was released,Reactive Streams Releases First Stable Version for JVM
/ref>
/ref>Reactive Streams 1.0.0 is here!
/ref> including
Java API There are two types of Java programming language application programming interfaces (APIs): * The official core Java API, contained in the Android (Google), SE (OpenJDK and Oracle), MicroEJ. These packages (java.* packages) are the core Java l ...
, a textual
specification A specification often refers to a set of documented requirements to be satisfied by a material, design, product, or service. A specification is often a type of technical standard. There are different types of technical or engineering specificat ...
, a TCK and implementation examples. It comes with a multitude of compliant implementations verified by the TCK for 1.0.0, listed in alphabetical order: *
Akka Akka or AKKA may refer to: Arts and entertainment * ''Akka'' (film), a 1976 Indian Tamil film * ''Akka'' (TV series), a 2014–2015 Indian Tamil soap opera * Akka, a character in the children's novel ''The Wonderful Adventures of Nils'' by Selma ...
Streams *
MongoDB MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Ser ...
* Ratpack * Reactive Rabbit driver for
RabbitMQ RabbitMQ is an open-source message-broker software (sometimes called message-oriented middleware) that originally implemented the Advanced Message Queuing Protocol (AMQP) and has since been extended with a plug-in architecture to support Stre ...
/
AMQP The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-subs ...
*
Spring Spring(s) may refer to: Common uses * Spring (season), a season of the year * Spring (device), a mechanical device that stores energy * Spring (hydrology), a natural source of water * Spring (mathematics), a geometric surface in the shape of a h ...
and Pivotal Project Reactor *
Netflix Netflix, Inc. is an American subscription video on-demand over-the-top streaming service and production company based in Los Gatos, California. Founded in 1997 by Reed Hastings and Marc Randolph in Scotts Valley, California, it offers a ...
RxJava * Slick 3.0 * Vert.x 3.0
Mutiny

Helidon
Other implementations include
Cassandra Cassandra or Kassandra (; Ancient Greek: Κασσάνδρα, , also , and sometimes referred to as Alexandra) in Greek mythology was a Trojan priestess dedicated to the god Apollo and fated by him to utter true prophecies but never to be believe ...
,
Elasticsearch Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. Elasticsearch is developed in Java and is dual ...
,
Apache Kafka Apache Kafka is a distributed event store and stream-processing platform. It is an open-source system developed by the Apache Software Foundation written in Java and Scala. The project aims to provide a unified, high-throughput, low-latency pla ...
, Parallel Universe Quasar,
Play Framework Play Framework is an open-source web application framework which follows the model–view–controller (MVC) architectural pattern. It is written in Scala and usable from other programming languages that are compiled to JVM bytecode, e.g. Java. ...
, Armeria. Spring 5 is announced to be built upon Reactive Streams compatible Reactor Core. Amazon announced that its
Amazon Web Services Amazon Web Services, Inc. (AWS) is a subsidiary of Amazon.com, Amazon that provides Software as a service, on-demand cloud computing computing platform, platforms and Application programming interface, APIs to individuals, companies, and gover ...
SDK would support Reactive Streams to provide streaming capabilities in its client libraries in version 2.0. Reactive Streams 1.0.1 is released on August 9, 2017, including various improvements in specification preciseness, TCK improvements and other clarifications. The specification as well as interfaces remained fully backwards compatible with the 1.0.0 version, however aimed to streamline the adoption for future implementors as well as align with some additional requirements set by the OpenJDK.


Ports and influences

* A direct port of the specification, interfaces and TCK was made available under the same working group for the .NET platform. * When the
Elixir ELIXIR (the European life-sciences Infrastructure for biological Information) is an initiative that will allow life science laboratories across Europe to share and store their research data as part of an organised network. Its goal is to bring t ...
language introduced its streaming API called GenStage, the authors extended a thanks " oakka-streams and reactive-streams projects which provided us guidance in implementing the demand-driven exchange between stages".


References

*  ''This article incorporates text from {{URL, http://www.reactive-streams.org/, which is released under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication''. Java platform Open standards