How opendaylight/mdsal works
Project type and purpose
• This is an open-source, multi-module Java framework (MD-SAL) for model-driven middleware.
• It provides two API “flavours”:
• Binding APIs (code-generated from YANG for compile-time safety)
• DOM APIs (YANG-based document model with runtime flexibility)
• It runs as OSGi bundles (Karaf features) and offers services like data storage (DataBroker), RPC, notifications, replication, entity ownership, singleton services, tracing and YANG-library support.
File structure
• Top-level modules map to core layers:
• binding/… (binding API + binding-to-DOM adapters)
• dom/… (DOM API + DOM broker + in-memory datastore + schema OSGi)
• common/… (shared common API types, three-phase commit, exceptions)
• replicate/, entityownership/, singleton-service/, trace/, yanglib/… (pluggable service extensions)
• model/… (YANG model modules)
• features/, karaf/… (Karaf feature descriptors for OSGi packaging)
• Each module has its own pom.xml (Maven reactor build), source, tests, and often module-info.java for Java 9+ modularity.
README for additional insights
• Emphasizes YANG as the modeling language and the two API flavours.
• Mentions extensibility, transport/adaptation, and connectors (e.g. RESTCONF).
• Framework is message-bus inspired, with services accessed via service registry.