Simplereact is a small, concurrency-enabled library package from AOL, built directly on the Java 8-based completablefuture, JDK function interface, and streams API, and its fluent API provides a solution to 90% Reactive usage scenarios, it is important not to bring in any complexity. Can implement functional reactive programming paradigm (for short: FRP, functional response programming)
With Simplereact, you can easily extend microservices, which can be used to manage remote calls to microservices and to meet the requirements of high-concurrency large-scale high-performance platforms.
Use Simplereact to build non-clogging microservices and rest clients.
Simplereact starts in the supplier array, which primarily produces data that other functions need to respond to, and each supplier is passed to executor execution in a separate thread execution mode.
List<completablefuture<integer>> futures = new simplereact () .<integer> react ((), 1, () , 2, (), 3). With (IT--it * 100);
In this case, 3 supplier produce three numbers, which can be executed in parallel, when they complete each number multiplied by 100, which is also performed as a parallel separate task (by Forkjoinpool or a configurable task executor), simple React will immediately return to the list of future object collections, which will also execute asynchronously without any clogging.
New Simplereact () .<integer> react ((), 1, (), 2, (), 3). Then (IT-it * 100 ). Then (it, "*" + IT)
React then allows event reactor to be concatenated, unlike "React with", returning only a future collection, React then is a fluent interface, capable of returning React builder, Allow subsequent reactor to be added to the series chain, React then will not clog, React with can be called after React then, as long as React then provide access to the full completeablefuture API, Completeablefuture can be passed back to Simplereact via Simplereact.react (streamofcompleteablefutures).
More complex application cases visible
Project: Aol/simple-react GitHub
Simplereact: Java 8-based simple FRP Fluent API