Operational data with maapi

Hi Team,

I was clear that for cdb write either through data socket (operational data) or maapi socket (config data). Could you please explain why can’t we use maapi for operational data too.suppose if my application having both config and operational data ,should i have two sockets to write into cdb?

Regards,
Aarur

For configuration data, the only way that it can be written to CDB is via a transaction. The ConfD Core Engine is the transaction engine. Architecturally, to the Core Engine, CDB is a Data Provider just like anything you’d write and attach to the Data Provider API. MAAPI is an API to the Core Engine. At the Core Engine level, you can only ask the Core Engine to read operational data; operational data is not something which is writable from the outside world.

The CDB API is an API directly to CDB and does not go through the Core Engine. Since that API does not go through the Core Engine, it can only be used to read configuration data and not write it. Operational data storage in CDB is a CDB feature and does not require transactions to write. Thus, operational data in CDB is written and read via the CDB API.

More of the same thing jlawitzke wrote above,
If you are storing operational data in the ConfD CDB Operational Datastore, instead of or in combination with registering your data provider applications with ConfD, you should use the CDB API to set the data.

The ConfD MAAPI is for acting like a northbound client connecting to your devices / virtual instance over NETCONF, REST, CLI, JSON-RPC, etc. Here the client read out the operational data (statistics, monitor data, etc). And of course to set configuration.
MAAPI is sometimes used by the application for validation or transform implementations.

The ConfD CDB and DP APIs are the primary APIs for most use-cases where the application subscribe to configuration updates, read configuration, provide operational data or, like the use case we discuss here, push operational data into the CDB operational datastore (configuration use running, candidate and startup datastores).

So for reading config data from you application you will in the normal use-case read using the CDB API, for pushing operational data into CDB oper you would use the CDB API but with a different socket. And/or if you are registering and application data provider you would use the DP API. Hence, at least two sockets or more are needed.

Regarding pushing data into CDB oper see also:

Hi jlawitzke and cohult,

         Thank you so much .I understood

Regards,
Aarur