-
Notifications
You must be signed in to change notification settings - Fork 10
Backup data in case of a snapshot
One of the problems if you want to store data constant on the tangle are snapshots. A snapshot removes all zero value transactions or data-only transactions from the tangle. One way to solve this is to set up a Permanode. A Permanode stores the entire tangle data in it permanently. Since this requires a lot of resources and you probably only want to store a specific part of the tangle, I have been looking for other ways to backup Chiota’s encrypted messages:
Currently Chiota stores all messages by a user local on the user’s device inside an SQLite Database. If a user doesn’t delete his app he will have access to all his old messages and contacts even after a snapshot. This also improves the overall performance, since Chiota doesn’t need to reload all messages from the tangle.
Furthermore, the messages can be backed up in an Azure table storage. At the moment, this feature isn’t activated in Chiota, since for chatting it’s probably not required to have forever access to his own messages. However, the code is completely integrated into Chiota and is working, see
https://github.com/Noc2/Chiota/blob/master/Chiota/Chiota/Services/TableStorage.cs
To activate it you simply need to enter your own table storage connection string and uncomment everything related to table storage in the TangleMessenger class. However, it leads to a central point of control for old messages, which isn't the best solution, even though the messages are encrypted.
If you want to set up a table storage for your own application you can find more about it here.