Build a Dynamic Process Graph
Learn how to set up the ProcessGraph module with edge properties.
We'll cover the following...
Now that we’ve defined some of the machinery for creating and maintaining a supervision tree, we can turn to the process graph itself.
The ProcessGraph
module
Let’s create a new module:
Press + to interact
defmodule GraphCompute.ProcessGraph do# ...end
We should now have a module library tree that looks like this:
The graph_up/1
function
We want to add now a simple function—let’s call it graph_up/1
—that will map any %Graph{}
struct to a new %Graph{}
struct, where nodes are replaced by supervised ...