27ca2e40fe378f11f231ae24e188201a0a6cdcf4
[docs.git] / manuals / developer-guide / src / main / asciidoc / topoprocessing / odl-topoprocessing-framework-dev.adoc
1 == Topology Processing Framework Developer Guide
2
3 === Overview
4 TopoProcessingProvider is entry point for Topology Processing Framework. It requires DataBroker instance. DataBroker is needed for listener registrations. There is TopologyRequestListener which listens on aggregated topology requests (placed into configuration datastore) and UnderlayTopologyListeners which listen on underlay topology data changes (made in operational datastore). TopologyRequestHandler saves toporequest data and provides method for translating path to the specified leaf. When a change in topology occurs, registered UnderlayTopologyListener processes this information for further aggregation and/or filtration. Finally, after overlay topology is created, it is passed to TopologyWriter, which writes this topology into operational datastore.
5
6 === Topology Processing Framework Architecture
7 Contains of topoprocessing-api, topoprocessing-spi and topoprocessing-impl 
8 bundles.
9
10 * topoprocessing-api - contains correlation definitions
11 * topoprocessing-spi - entry point for topoprocessing service (start and close)
12 * topoprocessing-impl - contains implemented handlers, listeners and aggregators
13
14 *Typical usecase*
15
16 . TopoProcessingProvider instance is created, DataBroker dependency is set
17 . TopoProcessingProvider registers TopologyRequestListener (into configuration datastore)
18     - TopologyRequestListener listens on any topology creation or deletion and checks if it contains CorrelationAugment augmentation
19 . TopologyRequestListener creates TopologyRequestHandler on new topology request
20     - TopologyRequestHandler translates paths from correlation into InstanceIdentifiers
21 . TopologyRequestHandler creates TopologyFiltrator and/or TopologyAggregator (depending on correlation)
22 . This step shows, that we can create filtered views on aggregated topologies
23 . TopologyRequestHandler registers needed UnderlayTopologyListener(s) (into operational datastore)
24 . Data change events are passed for aggregation and/or filtering
25 . Overlay topology is passed to TopologyWriter
26 . TopologyWriter writes the overlay topology into operational datastore
27
28 .architecture schema
29 image::topoprocessing/architecture.png["architecture", width=500]
30
31 === Key APIs and Interfaces
32 Basic Provider class is TopoProcessingProvider which provides startup and shutdown
33 methods. Otherwise the framework communicates via requests and outputs stored 
34 in DataStores.
35
36 //=== API Reference Documentation
37 //Provide links to JavaDoc, REST API documentation, etc. [TBD]