Issues with storage of data in stack

Phil Davis revdev at pdslabs.net
Thu Mar 8 16:36:58 EST 2018


Hi Peter,

If your app could encrypt the arrayEncoded data before writing to disk, 
and then decrypt it when reading it, that would solve the 
unwanted-access problem. The amount of time used by encrypt/decrypt 
processes is negligible, even for large files.

I love arrays. They have become one of my favorite things about LC.

Phil Davis


On 3/8/18 11:22 AM, Peter Bogdanoff via use-livecode wrote:
> Mark,
>
> If the data is written to a file on disk, could someone else arrayDecode the file and gain access to it?
>
> Peter Bogdanoff
> ArtsInteractive
>
>> 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:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

-- 
Phil Davis





More information about the use-livecode mailing list