Issues with storage of data in stack
bogdanoff at me.com
Thu Mar 8 14:22:48 EST 2018
If the data is written to a file on disk, could someone else arrayDecode the file and gain access to it?
> On Mar 8, 2018, at 10:38 AM, Mark Talluto via use-livecode <use-livecode at lists.runrev.com> wrote:
>> On Mar 8, 2018, at 9:03 AM, Lagi Pittas via use-livecode <use-livecode at lists.runrev.com> wrote:
>> In the first version of the system I save the arrays which held all
>> the Clerks orders/totals etc and items into an external stack every
>> time they added an item.
> I too use arrays as a data store. You could save the arrays to disk directly with arrayEncode(). To save time and not store the entire array to disk, you could store only the portions that have been updated on every update. This will keep the data store safe and fast. It will also remove the occasional issue of stack corruption…since you will not store the data inside of stacks any longer.
> All creates/reads/update/writes would be done to memory. Those calls that modify data will simply do a follow-up write to disk for that particular record. To defeat OS inode limitations, you could group your arrays logically into files. Thus, you would have anywhere from 1 to a 100 sub arrays grouped together. The loading and storing of arrays is very fast. Even with databases in the 100s of thousands to low millions of records counts.
> Performance is amazing. The best part is you are speaking to your database using LiveCode commands and functions. The only limitation is the amount of RAM on a given device. Should you outgrow that limitation then you could move the data to the cloud. Or you could load/unload data accordingly from disk. This would also be a nice indicator that your business is growing. Of course, it could just be that you are storing a lot of data. :)
> If you need any help or ideas, let me know.
> Best regards,
> Mark Talluto
> livecloud.io <http://livecloud.io/>
> nursenotes.net <http://nursenotes.net/>
> canelasoftware.com <http://www.canelasoftware.com/>
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode