Traffic Aware Workflow#
Unlike traffic-oblivious topologies, traffic-aware architectures dynamically adapt the network topology based on runtime traffic patterns.
This requires a feedback loop to collect traffic information and update the network topology accordingly.
All of this functionality is encapsulated in openoptics.Toolbox.BaseNetwork.start_traffic_aware(), where users only need to
specify the topology generation function and the routing algorithm they wish to use.
The configuration workflow is nearly identical to the previous examples of traffic-oblivious architectures.
Try ping between nodes, what do you observe on the dashboard?
examples/ta.py#
1from openoptics import Toolbox, OpticalTopo, OpticalRouting
2import threading
3stop_event = threading.Event()
4
5if __name__ == "__main__":
6 nb_node = 4
7 nb_link = 1
8 net = Toolbox.BaseNetwork(
9 name="TA",
10 backend="Mininet",
11 nb_node=nb_node,
12 nb_link=nb_link,
13 arch_mode="TA",
14 use_webserver=True,
15 )
16 circuits = OpticalTopo.static_topo(nb_node=nb_node, nb_link=nb_link)
17 assert net.deploy_topo(circuits)
18 paths = OpticalRouting.routing_direct_ta(net.get_topo())
19 net.deploy_routing(paths, routing_mode="Per-hop", arch_mode="TA", start_fresh=True)
20 net.start_traffic_aware(
21 OpticalTopo.bipartite_matching,
22 OpticalRouting.routing_direct_ta,
23 routing_mode="Per-hop",
24 update_interval=2,
25 )