Bridge.put() / Bridge.get() alternative

One of the serious limitations of the Bridge keystore is that there is no notification of written values - when your sketch reads from it, you have to check for changed values, as you are doing now. But the problem is that if two values are written before the sketch has a chance to read the first one, the first one is lost. And there is a potential race condition with your scheme to clear out a written value: if a new value is written after you read the previous value and before you clear the value, that latest value will be lost. While the window of opportunity for a problem is short, it is not zero.

In your first post, you are concerned about using strings. Is that because you don't want to use the String class, or because you want to store binary data? If the latter, that doesn't really make sense as the value would be converted to a string when it gets sent in the data get web request - it needs to be made a string at some point.

The Bridge keystore is easy use, but it has some disadvantages. These include the issues mentioned above, as well as speed and other issues. I used it at first, but now avoid it. Unfortunately, while there are some alternatives that are higher performance and more powerful, they involve programming on the Linux side. In my Yun projects, I try to make the Sketch as simple as possible, and do as much processing on the Linux side as well. But there is a definite learning curve involved.