|
1 | 1 |
|
2 | 2 | package openflow.hyperflow; |
3 | 3 |
|
4 | | - |
5 | | - |
| 4 | +// |
| 5 | +// The HyperFlowAgent is a core component of the HyperFlow distributed controller architecture |
| 6 | +// for OpenFlow networks. It enables multiple OpenFlow controllers to work together as a logically |
| 7 | +// centralized controller while being physically distributed. |
| 8 | +// |
| 9 | +// HyperFlow is a distributed controller architecture that: |
| 10 | +// - Enables multiple OpenFlow controllers to work together as a logically centralized controller |
| 11 | +// - Provides fault tolerance and scalability through controller distribution |
| 12 | +// - Synchronizes state between controllers using a publish-subscribe mechanism |
| 13 | +// - Allows controllers to operate independently while maintaining a consistent network view |
| 14 | +// |
| 15 | +// HyperFlowAgent's Role: |
| 16 | +// |
| 17 | +// 1. State Synchronization: The HyperFlowAgent maintains two channels for synchronization: |
| 18 | +// - Control Channel: Contains information about controllers and their connected switches |
| 19 | +// - Data Channel: Contains events and state changes that need to be synchronized |
| 20 | +// |
| 21 | +// 2. Controller Communication: The HyperFlowAgent connects to a central HyperFlowSynchronizer |
| 22 | +// that facilitates communication between distributed controllers. It periodically: |
| 23 | +// - Reports its status and connected switches (ReportIn) |
| 24 | +// - Requests synchronization with other controllers (SyncRequest) |
| 25 | +// - Checks if other controllers are alive (CheckAlive) |
| 26 | +// |
| 27 | +// 3. Event Distribution: When state changes occur in one controller (e.g., a new ARP entry), |
| 28 | +// the HyperFlowAgent: |
| 29 | +// - Packages the change as a DataChannelEntry |
| 30 | +// - Sends it to the HyperFlowSynchronizer |
| 31 | +// - The change is then distributed to all other controllers |
| 32 | +// |
| 33 | +// 4. Event Notification: The HyperFlowAgent emits HyperFlowReFire signals to notify other |
| 34 | +// controller applications (like HF_ARPResponder, HF_LLDPAgent) about state changes from |
| 35 | +// other controllers, allowing them to update their local state. |
| 36 | +// |
| 37 | +// 5. Fault Tolerance: The HyperFlowAgent detects controller failures and recoveries, enabling |
| 38 | +// the system to continue operating even if some controllers fail. |
| 39 | +// |
6 | 40 | simple HyperFlowAgent extends openflow.controllerApps.AbstractTCPControllerApp |
7 | 41 | { |
8 | 42 | parameters: |
9 | 43 | @class(openflow::HyperFlowAgent); |
10 | 44 | @class(HyperFlowAgent); |
11 | 45 | @signal[HyperFlowReFire]; |
12 | 46 | @display("i=block/app"); |
| 47 | + |
| 48 | + // Hard timeout for flow entries (0 means no hard timeout) |
13 | 49 | int flowModHardTimeOut = default(0); |
| 50 | + |
| 51 | + // Idle timeout for flow entries (how long a flow entry remains if not used) |
14 | 52 | int flowModIdleTimeOut = default(1); |
| 53 | + |
| 54 | + // Local port for the TCP socket (use -1 for automatic port assignment) |
15 | 55 | int localPort = default(-1); |
| 56 | + |
| 57 | + // Local address for the TCP socket (use "" for any address) |
16 | 58 | string localAddress = default(""); |
| 59 | + |
| 60 | + // Address of the HyperFlowSynchronizer to connect to |
17 | 61 | string connectAddressHyperFlowSynchronizer = default("HyperFlowSynchronizer"); |
| 62 | + |
| 63 | + // Port of the HyperFlowSynchronizer to connect to |
18 | 64 | int connectPortHyperFlowSynchronizer = default(1003); |
19 | 65 |
|
| 66 | + // When to initiate the connection to the HyperFlowSynchronizer |
20 | 67 | double connectAt @unit("s") = default(1s); |
21 | 68 |
|
22 | | - //should be 1/3 of the checkAliveEvery |
| 69 | + // How often to send ReportIn messages (should be 1/3 of the checkAliveEvery) |
| 70 | + // ReportIn messages inform the synchronizer about this controller and its switches |
23 | 71 | double reportInEvery @unit("s") = default(1s); |
| 72 | + |
| 73 | + // How often to send SyncRequest messages to get updates from other controllers |
24 | 74 | double checkSyncEvery @unit("s") = default(1s); |
25 | 75 |
|
26 | | - //should be the same as aliveintervall of the synchronizer module |
| 76 | + // How often to check if other controllers are alive |
| 77 | + // Should be the same as aliveInterval of the synchronizer module |
27 | 78 | double checkAliveEvery @unit("s") = default(3s); |
28 | | - |
29 | | - |
30 | | - |
31 | 79 | } |
0 commit comments