How to implement global storage?

@iiiyx maybe you can consider some links in this topic