On the ctrlX Data Layer it is also possible to create persistent variables. The storage type would be sharedretain. You can simply adapt the realtime example of our SDK.
See also the documentation of the Data Layer:
ctrlX CORE Runtime, Application Manual
chapter "ctrlX Data Layer -> Exchanging data RT -> Types of memory ranges"
... View more