Config Trees in legato

i just do not seem to understand the documentation about this. What is a ConfigTree in Legato? & what are their usage? it says it is a nonSQL database. Does that mean we can insert values into them like we do in normal databases? Then what are the whole stem/leaf setup. It sounds like a whole file system setup. Its just a bit confusing.


The configTree is a shared data store in Legato. Data is grouped by trees and reads/writes are handled by atomic transactions. A transaction is global to the tree that it is created on, and the tree is based on a multiple-reader / single writer model.

While the configTree does use paths to query the data, the items in the tree are not files. Each leaf just stores a single value. (The maximum size a value can be is 512 bytes.) A stem can hold a collection of stems and leaves.

The configTree acts a bit like a noSQL database in that it has no schema, so applications are free to come up what ever data structure they need. Each tree can act a bit like a json document.

The core system daemons use the configTree to store data critical for running the Legato run-time in a tree named system.

By default, each application gets read access to a tree of the same name as the application. Apps can also be granted write access to this tree through a setting in it’s adef. Also, trees can be used to store persistent data between applications. You just setup the read/write permissions in both apps. Also applications can register to be notified when data changes.

You use the configTree API to work with the configTree. You can use the on target tool, config to dynamically query and write to the tree from the command line.

I hope this helps,

1 Like