How to create a continuous web app??

Hi All,

Firstly, I am not sure if I am using the right terminology, What I have created is a Blockchain based website and much of which is run in the backend files and interacted with on the client side, all seems to work well, but if I close out of it all the data within the blockchain is lost and I have to restart again, I am trying to figure out how to maintain the data and the blockchain, I am guessing the answer will be to utilise the data collections and datasets, however this will be working on a peer to peer basis how would this be achieved. I understand that Blockchain would usually utilise a distributed ledger however if no one used the web app for sometime or closed their computers down then there is a risk of the chain being lost.

If someone could provide some guidance or suggestions on how to achieve what I am looking for that would be great, the only other prospective way I see being able to achieve this is to utilise an external server and fetch the commands from the wix site? however any suggestions will be greatly welcomed.

Best wishes,

Si

Hi Si,

I’m not sure if this is what you are looking for but if you want to save information/values on the site for a user you can use the wix-storage API.

If this doesn’t help please let us know exactly what it is you are trying to save and provide screenshots if you can.

Thanks!

Dara | Corvid Tram

Hi Dara,

Thank you for this,

I’ve utilised the Storage API previously and I’m not sure that I can utilise it for what I’m currently looking to achieve.

I have at present a blockchain that I have split down and re built so I can utilise the majority of it and the JavaScript code on a wix platform.

what I am struggling with comprehending is that with a tech such as blockchain it has to be forever running so that old information can be referenced and new added whenever there may be a need Blocks/transactions verified and added etc. But from my understanding, if an individual logs in to the site it is just likely going to create a new instance? and then start the chain again and data added before closing the web page will be lost? Or alternatively may cause data to be lost, to Get around this I would think the data collections should be the way forward but I don’t know how much information is allowed in to each item and column and if this is restricted in any way?

I’m unsure if this is the same way a Webb app works, so for example I understand the data collections and use of datasets to store data from client entries and events. However I don’t believe it would be able to let them hold a copy of a blockchain on their computer or device as there is a restriction I am sure of how much data can be stored? So the option is then to store it in a dataset which is added and extracted as JSON data/items now a block in the chain may hold 1000’s of transactions in its data so adding a block as an item to a dataset I am not sure if again this would be possible if it is it may resolve the issue? If not then I will have to look at another way.

I believe my difficulty is understanding how an app on a device stores data and references it compared to how a web app does and then figuring out how to do this in the Web app And if WiX can do what I am looking to achieve.

I am happy to share code and screen shots if needed.

Best regards

Si