-mdsal-dev list Ranga,
Storying the flow in datastore gives you some benefits *.* You flow is persisted across the controller restart. *.* Statistics are collected and augmented under the same flow id in operational data, so that's convinient for user to access the operational information of the flow. *.* In clustered environment these data is shared across the cluster, so if you standby application become active, it can use this data to reconcile *.* Application don't have to write the flow again and again everytime switch disconnect. If the flow is already in config data store,openflowplugin will write those flows to the switch whenever controller restart. *.* You can do proactive programming by writing the flow to the data store and whenever switch will connect, openflowplugin will push those flows for applicaiton. *.* Also it takes care of the order dependency between flow & groups and group & group for error free programming. If you don't use datastore *.* Application need to take care of all the above stuff by itself (except the statistics will be collected and stored under the Alien-Id, so application will have to match it) Thanks Anil On Fri, Aug 24, 2018 at 6:01 AM Michael Vorburger <[email protected]> wrote: > Hello Ranga, > > assing openflowplugin-dev and genius-dev, as this question is more > relevant to those projects than mdsal-dev : > > On Wed, Aug 22, 2018 at 7:25 PM M. Ranganathan <[email protected]> wrote: > >> Hello, >> >> In my application I am writing some flows when a switch connects. There >> are two ways of getting the flows to the switch: >> >> 1. Write to MD-SAL (use a transaction and DataBroker). >> 2. Write to switch using SalFlowService. >> >> The latter is more efficient (it does not write to persistent store) but >> since I am generating my flow each time a switch connects, it does not >> matter anyway. When would one pick one approach vs. the other (other than >> performance)? >> >> Just looking for a use case to understand the intended design. >> >> Thanks for your insights. >> > > I'm no expert in this matter, but my understanding it that you can write > the YANG model for flows by the openflowplugin directly, and it (the > openflowplugin) > will write out those flows to the switch. On top of this, some projects > simply have built some helpers and abstractions. I'm not sure what the > SalFlowService > is (from which project). The genius project has the IMdsalApiManager > service, see > https://javadocs.opendaylight.org/org.opendaylight.genius/fluorine/org/opendaylight/genius/mdsalutil/interfaces/IMdsalApiManager.html, > which is another such helper. If you look into its implementation, it > ultimately still just write the YANG model to MD-SAL using a transaction > and DataBroker. HTH? > > Tx, > M. > -- > Michael Vorburger, Red Hat > [email protected] | IRC: vorburger @freenode | ~ = http://vorburger.ch > > _______________________________________________ > openflowplugin-dev mailing list > [email protected] > https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev > -- Thanks Anil
_______________________________________________ openflowplugin-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
