| 1 | = Architecture = |
| 2 | |
| 3 | Much of the architecture draws heavily from !FlowVisor, but does so in a way to fit back into Floodlight's modular model. Many components are named after the components that they are analogous to in !FlowVisor. |
| 4 | |
| 5 | == Goals == |
| 6 | |
| 7 | The main goals of this project's designs are the following: |
| 8 | |
| 9 | * Implement a slicing scheme that prevents unwanted interaction between modules |
| 10 | * Allow control of slice behavior through a configuration file |
| 11 | * Avoid modification of existing Floodlight source code |
| 12 | * Provide an easy way to switch between normal Floodlight and "!FlowVisor" modes of operation |
| 13 | |
| 14 | In addition, the following assumptions were made as a consideration of the amount of time provided by GSoC : |
| 15 | |
| 16 | * All modules to be run are loaded at startup, and remain subscribed to events as long as Floodlight is running |
| 17 | * Several modules such as link discovery and device manager need a global view of the network and so should not be restricted |
| 18 | * modules that depend on one another must be in the same slice |
| 19 | * The configurations are not persistent |
| 20 | |
| 21 | = Components = |
| 22 | |
| 23 | The main components are: |
| 24 | |
| 25 | * Containers for configurations: |
| 26 | * Slices |
| 27 | * The !FlowMap |
| 28 | * Configuration files - one for !FlowVisor policies and another for module configurations |
| 29 | |
| 30 | * A module providing the core event handler (FVProxyProvider) |
| 31 | |
| 32 | * The main event handler (the !FlowVisor service) |
| 33 | |
| 34 | * Message handler components: |
| 35 | * the FVClassifier, which handles messages to/from switches |
| 36 | * the FVSlicer, which handles messages to/from modules |
| 37 | |
| 38 | == Containers == |
| 39 | |
| 40 | The JSON-formatted configuration file used by this implementation is nearly identical to that used by !FlowVisor, save the "modules" field specifying which modules should be kept in what slice. While !FlowVisor would store the contents of the config file in a database, this project assumes that there is no persistent storage. Instead of a database, a few classes are used to keep this information available: |
| 41 | |
| 42 | * Slice : configurations of individual slices |
| 43 | * FVConfUtil : !FlowSpace contents, !FlowMap |
| 44 | |
| 45 | == FVProxyProvider == |
| 46 | |
| 47 | This module is analogous to the [http://www.openflowhub.org/display/floodlightcontroller/FloodlightProvider FloodlightProvider], and provides similar main functionalities of handling switch connections, turning messages into events that modules can subscribe to, and dealing with the details of dispatching messages to the modules. In addition to these functions, FVProxyProvider also reads in the !FlowVisor configurations from file, and initializes the container structures necessary for the message handlers to determine how messages should be processed. |
| 48 | |
| 49 | '''Implementation :''' net.floodlightcontroller.core.FVProxyProvider.java |
| 50 | |
| 51 | '''Dependencies''' |
| 52 | |
| 53 | * FVConfUtil : reading !FlowVisor configs, initialization/access of container structures |
| 54 | * !FlowVisor : connection and event handling/dispatch |
| 55 | * config.json : !FlowVisor slice policies, flow rules |
| 56 | |
| 57 | '''Initializes :''' The !FlowVisor service |
| 58 | |
| 59 | == !FlowVisor service == |
| 60 | |
| 61 | !FlowVisor is derived from Floodlight's Controller class, the main implementation of the service that handles connections and events. The !FlowVisor service initializes switch-side message handlers (FVClassifiers) for each switch connection, and dispatches messages as events to subscribing modules according to message type (as Controller does) and slice policy. |
| 62 | |
| 63 | '''Implementation :''' net.floodlightcontroller.core.internal.!FlowVisor.java |
| 64 | |
| 65 | '''Dependencies''' |
| 66 | |
| 67 | * Controller : base class |
| 68 | * FVSlicer : per-message slice policy information |
| 69 | |
| 70 | '''Initializes :''' FVClassifier |
| 71 | |
| 72 | Because of their same logical purpose the !FlowVisor/FVProxyProvider pair are interchangeable with the Controller/!FloodlightProvider pair, allowing this version of Floodlight to be easily switched between "!FlowVisor" and "normal" modes of operation through the module loading system's configuration file. |
| 73 | |
| 74 | == Message handlers == |
| 75 | |
| 76 | The message handlers prevent conflicting messages from being sent out to the switches by modifying !OpenFlow messages and controlling how the !FlowVisor service dispatches messages to the modules. The classes and logic responsible for processing the messages are taken from !FlowVisor and are found in org.flowvisor.message* . The !FlowMap interface used by the message processing class is a modified version of !FlowVisor's linear !FlowMap, and is located in net.floodlightcontroller.flowspace. |
| 77 | |
| 78 | ==== FVClassifier ==== |
| 79 | |
| 80 | FVClassifier is derived from Floodlight's OFSwitchImpl class. A FVClassifier instance is associated with one switch, and is responsible for initializing one FVSlicer per slice that the switch is part of, processing messages to/from the switch according to policies in the !FlowMap, and sending out messages for the modules and the !FlowVisor service. |
| 81 | |
| 82 | '''Implementation :''' org.flowvisor.classifier.FVClassifier.java |
| 83 | |
| 84 | '''Dependencies''' |
| 85 | |
| 86 | * OFSwitchImpl : base class |
| 87 | * org.flowvisor.message* : Extended versions of OFMessage classes with interfaces for message processing |
| 88 | * FVMessageConverter : translation of messages between OFMessage and !FlowVisor equivalents in org.flowvisor.message* |
| 89 | |
| 90 | '''Initializes :''' FVSlicer |
| 91 | |
| 92 | ==== FVSlicer ==== |
| 93 | |
| 94 | Each FVSlicer enforces slice policies for one slice onto messages to/from the modules. The two main functions of FVSlicer are the processing of outbound messages and providing the !FlowVisor service with the slice policy that is used to restrict the list of modules that a given message can be dispatched to. The current implementation supplies a list of 'blacklisted' modules that should be ignored during message dispatch. |
| 95 | |
| 96 | '''Implementation :''' org.flowvisor.slicer.FVSlicer.java |
| 97 | |
| 98 | '''Dependencies''' |
| 99 | * Slice : slice configuration information |
| 100 | * org.flowvisor.message* : Extended versions of OFMessage classes with interfaces for message processing |
| 101 | * FVMessageConverter : translation of messages between OFMessage and !FlowVisor equivalents in org.flowvisor.message* |
| 102 | |
| 103 | |