Uploaded image for project: 'genius'
  1. genius
  2. GENIUS-76

Utilities for working more easily with asynchronous DataBroker transactions

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • None
    • (unspecified)
    • General
    • None
    • Operating System: All
      Platform: All

      I have a feeling that most people don't really understand that the DataBroker is ideally supposed to be used asynchronously ... or if they do, it's non-trivial to see how-to in practice.

      At least in genius & netvirt (I don't know about other projects), everywhere I've ever looked at it's typically always the following usual pattern, where the get() at the end turns an API which was intended to be async into a sync usage one (not to speak about the fact that at, least in the code I've come across, single new transaction per operation instead of a share transaction is the norm):

      dataBroker.newReadOnlyTransaction().read(store, path).get()

      whether this is done by using (my) org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker utility or (more often than not) just doing the equivalent directly in code...

      As far as I understand, this hinders performance and scalability in ODL.

      And we can do better relatively easily - we're just missing the right abstraction utility APIs which make it easier for people to naturally write code which does the right thing.

      I'll have a go at proposing something about this. I'll intentionally start by code locally in genius only. Whether or not that code, or something later inspired by it, makes it "upstream" (controller/mdsal) is NOT in scope of this issue.

            Unassigned Unassigned
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: