Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is work in progress to address this behavior using a custom algorithm using JDBC. The use of a graph database would implicitly fix such issues.

Updating data nodes

Batch updating a collection using updateDataNodesAndDescendants (plural)

In this scenario, 1,000 Open ROADM device nodes are already defined. A number of these existing data nodes will be updated using CpsDataService::updateDataNodeAndDescendantsupdateDataNodesAndDescendants (plural).

Updated device nodes11002003004005006007008009001,000
Fragments updated868,60017,20025,80034,40043,00051,60060,20068,80077,40086,000

Time (seconds)

0.2212.7928.3844.2351.55

69.46

85.6795.02109.16117.00131.15
Fragments391672606583667619602634630662656

...

There are a number of issues possibly affecting performance here. For example, after DataNodes are converted to FragmentEntity objects, they are being persisted using the Hibernate persist method, which will always write the changes, regardless of whether the data changes. There is an alternative method called merge which compares existing data to updated data. Even if this were implemented, there are additional issues, such as JSON encoding giving inconsistent ordering. For example, data leaves could be encoded as "{'x':'1', 'y':'2'}" or "{'y':'2','x':'1'}", depending on exact object type for storing leaves (HashMap, LinkedHashMap, ImmutableMap, etc.). There is an option for JsonObjectMapper to order the keys alphabetically during encoding.

WIP Comparison of updating using different approaches

There are multiple was of updating data nodes, each with different performance.

In these scenario, 1,000 Open ROADM device nodes are already defined. A number of these existing data nodes will be updated using CpsDataService::updateDataNodeAndDescendants (singular).

ScenarioTime (seconds)Parent XpathSample JsonRemarks
Update 1 device node under top-level container0.6/openroadm-devices{ "openroadm-device": [ ... ] }
Update a list of 100 device nodes under top-level container3/openroadm-devices{ "openroadm-device": [ ... ] }
Update top-level container having a list of 100 device nodes22/{ "openroadm-devices": { "openroadm-device": [ ... ] } }

To Do: this section is be completed pending further analysis

Updating data leaves

In this scenario, 1,000 Open ROADM device nodes are already defined. The data leaves of a number of these existing data nodes will be updated using CpsDataService::updateNodeLeaves.

...