Search⌘ K
AI Features

Simulate a Network

Explore how to map a source graph to a process graph in Elixir and preserve node state through supervised process restarts. Learn to simulate network survivability by managing graph node processes, inspecting supervision trees, and maintaining consistent graph structure after node failures. This lesson provides hands-on experience with Elixir's concurrency and process supervision applied to graph data models.

We'll cover the following...

The ARPANET graph

Let’s get ourselves an example NativeGraph graph. The ARPANET graph we stored earlier would make a good candidate.

And speaking of the ARPANET, it’s worth noticing that while it might not have been built specifically to survive a extremely strong attack, it was still designed to be resilient in the event of network losses and to reroute traffic as required. This small simulation here will aim to demonstrate similar survivability of a network against inflicted outages.

Demonstration

Slide 1: We start off with a small ARPANET graph. This is a simple undirected graph with atoms for nodes. Let’s now create a new graph with processes for nodes on the back of this.
Slide 2:
We import the GraphCompute.ProcessGraph module to save on typing.
Slide 3:
We then bring up the process graph.
Slides 4–5: ...