Blockstack
Hi,
I have an app idea but I have some conceptual problem with Blockstack given I come from a relatively centralized background and I have no past experience with the platform.
My first problem is a classical consumer/producer CS problem. Indeed my app may have multiple producer client and many (but more likely one) consumer client.
The producer client will only produce data. And the consumer client will only read data.
I have looked into the gaia storage system and I have noticed there is only two method regarding file management : get and put. Thus the consumer producer problem : I cannot guarantee two clients won’t write at the same time and loose data.
An obvious solutions would be to write to a different file each time but then another problem is created.
Indeed, my client might write a lot of little data thus creating a lot of files. The consumer client will need to process this data in a timely manner which seems really hard if there’s a ton of files to load and process. Thus it would be great to create some kind of precomputed file each day or such processing all data created between the last pre computer file and current time. Then calculations would be way easier on the consumer client.
However I can’t see any way to create this cron like behavior in blockstack.
My second problem is that the producer client is not a browser : thus I need a way to generate a token and give it to to the producer client. I saw in the docs blockstack uses JWT token so I guess I can use those by some low level api to generate one with no expiration and give it to the server client a bit like an api key ?. Would it also be possible to restrict permissions of the producer client (can only create a new file…) ?