-
Notifications
You must be signed in to change notification settings - Fork 6
Warp OpenFlow Driver vs. OpenFlowJ
#Warp OpenFlow Driver vs. OpenFlowJ
The main difference Warp OpenFlow Driver from OpenFlowJ is how OpenFlow messages are built and serialized. OpenFlowJ represents OpenFlow messages using POJOs. Serialization/deserialization is performing using writeTo()/readFrom() methods. So if you need to change or update a protocol like bugs fixing, new version introduction and so on, you should change these methods, modifying size of fields, structures, order of serialization them inside a message, and recompile the code getting new binaries.
In Warp OpenFlow driver all information about messages and structures (size, order) is concentrated in Avro JSON file (*.avpr by default). It gives some advantages. First of all, in JSON is more clear to see the whole protocol: size, orders etc. Then, in fact you don’t need to recompile the code to make changes in the protocol. What you need is:
provider.init();
and the you can use Provider instance to serialize/deserialize OpenFlow messages according to new version of the OF protocol.
One minor thing what prevents to be this feature fully operable is implementing a Configuration in a separate configuration file. So currently Avro file is stored in a single Jar with binaries, and we need to recompile. When I finish this, developers can fully use this feature.
Fragment of Avro protocol file describing OFP Hello message:
Test