Euphrates is a flow execution engine written in Java. The purpose of Euphrates is to simplify development of highly concurrent and distributed Java applications.
Utilize modern multi-core computers better leveraging data and task parallelism without having to deal explicitly with threading, synchronization, and data consistency.
Java developers think in objects, object associations, method invocations, inheritance, polymorphism, etc. For a number of scenarios the flow paradigm is a better fit. Flow developers think in terms of processing nodes, which are objects, and data and control flowing concurrently between nodes through transitions.
Back-end is an object to which the flow routes outbound invocations. It is purposed to simplify integrating flows into Java applications.
If facade interface is set for the flow, then the flow creates a dynamic proxy implementing the interface. Proxy method invocations are routed to flow pins with matching names. The purpose of the facade interface is to simplify integrating flows into Java applications.
Flow is a collection of flow elements - nodes and transitions. Flow is itself a node, so flows can be nested.
Invocable is a receptor of invocations (activations). Transition starts and node inputs are invocables.
Euphrates invocation extends semantics of Java method invocation. It consists of:
obj argument of Method.invoke(Object obj, Object... args).args argument of Method.invoke(Object obj, Object… args).Invokers invoke/activate invocables. Transition ends and node outputs are invokers.
Nodes are primary processing units. A node has one or more pins. Nodes are activated by invocations arriving from incoming transitions.
Transitions connect node pins and pass invocations between pins/nodes. Transitions can modify invocation data along the way, stop invocation propagation, or perform several invocations of target invocable in response to incoming invocation.
Pins are node connection points. Each pin can have multiple inbound and outbound transitions. Nodes can implement different merge/join logic for incoming invocations. Euphrates Engine provides a helper class for implementing join/merge logic.
PropertySet is a set of name/value pairs, similar to java.util.Map. The distinguishing features of Euphrates property sets are:
java.util.concurrent.Callable) for later retrieval in other nodes/transitions. The property set will calculate the value asynchronously in a separate thread (for cook() methods) or on demand (for lazy() method).Synapse is an interceptor of invocations. Synapses are provided by the flow engine. Synapses are responsible for:
This section describes responsibilities of flow developer, flow engine and client code.
Flow developer is responsible for