November 2022
Intermediate to advanced
294 pages
5h 58m
English
Now that we’ve defined some of the machinery for creating and maintaining a supervision tree, we can turn to the process graph itself.
Let’s create a new module:
| | defmodule GraphCompute.ProcessGraph do |
| | |
| | # ... |
| | |
| | end |
We should now have a module library tree that looks like this:
| | . |
| | ├── README.md |
| | ├── lib |
| | │ ├── graph_compute |
| | │ │ ├── application.ex |
| | │ │ ├── graph.ex |
| » | │ │ ├── process_graph.ex |
| | │ │ ├── process.ex |
| | │ │ └── state.ex |
| | │ └── graph_compute.ex |
We now want to add 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 processes and the node terms are stored away in the supervised node’s ...
Read now
Unlock full access