You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/writing-function-compositions.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
1
# Functions composition
2
2
3
-
Serverledge accepts DAGs defined by users through a subset of the JSON-based *Amazon States Language*, currently in use by AWS Step Functions. Furthermore, you can define DAGs programmatically
4
-
with the DagBuilder APIs.
3
+
Serverledge accepts workflows defined by users through a subset of the JSON-based *Amazon States Language*, currently in use by AWS Step Functions. Furthermore, you can define workflows programmatically
4
+
with the Builder APIs.
5
5
6
-
Serverledge DAGs comprise 4 types of nodes:
6
+
Serverledge workflows comprise 4 types of nodes:
7
7
-**SimpleNode**: a node that wraps a function. This is the only node that executes user-defined functions.
8
8
-**ChoiceNode**: a node with N conditions that transfers its input to the first branch whose condition is evaluated as true
9
9
-**FanOutNode**: a node with N outputs that copies (or scatters) the input to all the outputs (with subsequent nodes activated in parallel)
10
10
-**FanInNode**: a node with N inputs that waits for the termination of all the parent nodes, and then merges the results in one output. The node fails after a specified timeout.
11
11
12
12
Three special nodes are always present and pre-built when using the APIs:
13
-
-**StartNode**: the single node from which the DAG starts executing
14
-
-**EndNode**: the final node of the DAG
15
-
-**ErrorNode**: a node that terminates DAG execution with failure
13
+
-**StartNode**: the single node from which the workflow starts executing
14
+
-**EndNode**: the final node of the workflow
15
+
-**ErrorNode**: a node that terminates workflow execution with failure
16
16
17
17
18
18
## Signature
19
19
Specifying a signature is optional for Serverledge functions. However,
20
-
in order to use functions within DAGs, they must have an associated signature.
20
+
in order to use functions within workflows, they must have an associated signature.
21
21
A signature specifies the type of the inputs accepted by the function, as well as the type of the produced outputs. For instance, a *Fibonacci* function might have a single integer input, and produce a single integer output.
22
22
23
23
The signature can be specified when creating a function through the CLI.
@@ -41,10 +41,10 @@ Example:
41
41
42
42
TODO
43
43
44
-
## DagBuilder API
44
+
## Builder API
45
45
46
-
It is possible to use the internal builder APIs to build complex DAGs programmatically in Go.
47
-
Here is an example of a DAG made by two simple nodes and a choice node, with N alternative conditions
46
+
It is possible to use the internal builder APIs to build complex workflows programmatically in Go.
47
+
Here is an example of a workflow made by two simple nodes and a choice node, with N alternative conditions
48
48
49
49
N := 4
50
50
function := function.Function{...}
@@ -53,11 +53,11 @@ Here is an example of a DAG made by two simple nodes and a choice node, with N a
0 commit comments