Skip to content
Junchuan Wang edited this page Sep 1, 2020 · 39 revisions

ParSeq is a framework that makes it easier to write asynchronous code in Java.

  1. The framework provides sets of APIs that gracefully handle async code. The Promise interface makes chaining async code blocks easier and prevents callback hell; The functional programming interface encourages isolation of code logic from the code execution, so that the programmers can focused on input, output and code functionality.
  2. The framework has an engine to run codes as a task so that the code execution is traceable. ParSeq trace and Traceviz provides great value to inspect the lifecycle of tasks and their timing of executions.
  3. For async operations, ParSeq engines provides a serial execution model so that out-of-order execution of tasks are indeed sequential and can be thread-safe. Concurrency achieved by ParSeq engine is resource efficient. This execution model would also make programmers' life easier by reducing race condition.
  4. Rich APIs are provided to manage lifecycle events and exception handling of tasks.

ParSeq best suits these use-cases:

  • Code uses operations that do not need to be synchronized (for example, out-of-order async operations, such as I/O).
  • Programmers want to utilize the callbacks or method chaining in programming paradigm.
  • Tasks are I/O intensive and would benefit from large number of concurrency.
  • Need a finer granularity of concurrency than multi-threading and need the framework to manage the concurrency.

In detail, some of the key benefits of ParSeq are listed:

ParSeq 2.*.* requires java 8. If you are using older version of java please use ParSeq 1.4.2.

See CHANGELOG for list of changes.

Resources

To get started, it is recommended to read the User's Guide first. Users might also find Execution Model Introduction useful to help understand how ParSeq execute Task asynchronously. There is also a video tutorial with slides created by the team to walk through the basics.

Latest Javadoc

Clone this wiki locally