Sample
mvp-spike
Count the letter r. Then classify the text. Then wait for a person. The graph is a straight line. It is not a routine for real work.
This routine has no Ganda command. A parent routine runs it.
Select a node, or run the path that the host uses.
How you write it
You write the routine in C#. Each call adds one node. Build makes the intermediate representation.
public static RoutineDefinition Build()
{
return Routine.Named(RoutineId)
.Compute("count-r", CountLetterR)
.Oracle<Classify>("classify", schema: "Classify.ClosedEnum", pack: Pack.None, budget: Budget.Small)
.Gate("operator-ack")
.Build();
}The file is source/timewarp-taratibu/mvp-spike.cs. Taratibu master 53de8c4.
Why this shape
This library exists to refuse one failure. Do not write a recipe and then start a model to read that recipe. A count of the letter r in a text is a function. The question “which class is this work?” is an oracle. A person who accepts the result is a gate. If the program that runs the graph is a model, the answer is no.
What you get
- A compute node does not call the oracle provider. The schema type stays in the host table. It is not in the intermediate representation. A model must not read the schema as a script.
- The graph id does not change. The text of the intermediate representation does not change. Then the content hash stays the same.
- A pause and a later start are journal rules. They are not extra nodes.
Rules
- Ganda has no command for this routine.
- Classify on this graph does not stop the host. Only the gate waits.
- This routine has no D2 file next to the other routines. The drawing is the result of MvpSpike.Build().
This sample has no D2 file in the repo. The nodes come from MvpSpike.Build(). Ganda connects the commands. Ganda does not change the graph.