Basically, instead of using your own separators such as space and _ etc use / to subdivide your topic name
i.e. if you call you database name cloud - then call the topic name username/cloud and then if someone creates a variable call speed - refer to that as username/cloud/speed and publish and subscribe to that to write/read its value
That's why I'm suggesting starting again and just let the user choose their own cloud variable names rather than imposing a fixed structure
Just have a few blocks - one to create a cloud var name and then a set block to publish its value to the broker and a read block that subscribes to the same topic to read it's value back again
So I'm suggesting that you publish its value to username/cloud/speed
So there is a one-one matchup between what is stored on the broker with the cloud var name
No scanning is needed - you can directly publish/subscribe to it
oh ok
but i dont know if your getting this right
all the variables are stored in the database table and then the table gets sent to the others that are connected to the database
i do not think mqtt is the best way to do this. it is very easy for a malicious user to screw things up and keep it that way. all you have to do to mess up an online game made with mqtt is publish to a topic and stick a forever loop on it. i still think programming a real cloud backend with some security measures (such as only allowing cloud variables to be set in the project page) is the best way to do this. at least with an http cloud backend, you can implement security features you wouldn't be able to with mqtt.
also, i'm not saying these things because I hate the project. i think it's great that you, @codegang, are thinking of ways to impliment cloud storage. i'm saying this because of past experiences i've had with malicious programmers.