Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-4013

Reduce unneeded fixed flow controller sync contention

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0SDK
    • Fix Version/s: 2.7.0SDK
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      The Fixed Flow Controller is designed to allow one instance to be used by multiple copies of a UIMA pipeline, initialized from the same context. In this case, only one initialize call is done; the others are no-ops. The instance contains one update-able ArrayList - the list of delegates. This array is normally only "read", but there are two defined interfaces to allow dynamically altering it (addAnalysisEngines, and removeAnalysisEngines). The current impl of this is a synchronized list. For the 99.99% of cases (reading), this sync is not necessary, and causes some observable sync contention.

      Change this to a non-sync'ed "CopyOnWrite" implementation, to avoid this contention. The downside is that current Flow objects in use while after this call occurs will not see the update, but new ones will. This is probably a good thing, because it seems that incorrect flows might occur if this was changed while flows were in-progress. The documentation currently says these methods are not currently called because UIMA doesn't support dynamically adding or removing analysis engines to/from an aggregate.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            schor Marshall Schor
            Reporter:
            schor Marshall Schor
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development