Children as Property Resource Wrapper API
Available since version 2.10.0/3.7.0
Serializes super-flat children into a single property as a JSON object. This tends to be more performant than “real” no structures especially when packaging them up or distributing them.
An example use case, happens in the Financial Service industry where day-based data must be stored/modeled.
/etc/products/product-class-x/jcr:content/performance-data ./2007-01-01@propertyA=xxx ./2007-01-01@propertyB=xxx ./2007-01-01@propertyC=xxx ... ./2017-01-01@propertyA=xxx ./2017-01-01@propertyB=xxx ./2017-01-01@propertyC=xxx
Even if the nodes are sharded to
2017/01/01/entry daily data for one data-set,
this uses ~ 365 * 17 (# of years), so in this example: ~ 3650 nodes. Multiple that by various product classes x products and the number of nodes can reach the 100k’s and even millions.
Review the ChildrenAsPropertyResource APIs
Unscientific metrics on operations using flat “real” nodes vs children as properties.
Add operation of 10,000 nodes
- Real nt:unstructured: 8,773ms ~> 8s
- Real oak:Unstructured: 6,374ms ~> 6s
- Unsorted property based: 632ms ~> 0.6s
- Sorted property based: 1,167ms ~> 1s
Add operation of 100,000 nodes
- Real nt:unstructured: 160,227ms ~> 160s
- Real oak:Unstructured: 87,324ms ~> 87s - Package built in 101,377ms
- Sorted property based: 6,646ms ~> 7s
- Property based: 5,240ms ~> 5s - Package built in 4,528ms