Page 1 of 1

using a filesharing site / SQL-Database

Posted: Wed Jul 05, 2017 7:19 pm
by Zood
Hello,

I came across a problem earlier this week when moving my files (databases) online to enable future use of tablets etc with the same database.
My programm has a few small (<500kb) .csv files on which to rely but when accessing it via dropbox/windows cloud it takes about 1-2 seconds to load the data, which is too long.
is there any way to speed this process up?
Whenever I store the files internally (desktop), there is almost no rendering-time and the data is shown immediately.
Any solution would greatly be apreciated!

Thanks in advance,
Zood

Re: using a filesharing site / SQL-Database

Posted: Wed Jul 05, 2017 7:37 pm
by shaosean
That's the cost of moving it to the internet.. If the data in those CSV files isn't changing, or not changing often, just cache it on the client side for local use.. You can always do a check to see if the server holds newer data..

Re: using a filesharing site / SQL-Database

Posted: Thu Jul 06, 2017 3:23 pm
by jiml
You might also try compressing prior to upload and decompressing after download.

Re: using a filesharing site / SQL-Database

Posted: Thu Jul 06, 2017 10:09 pm
by Zood
jiml wrote:You might also try compressing prior to upload and decompressing after download.
great suggestion! thanks, had not thought of that before.
When using just a simple file-upload to dropbox i use:
[code[ put url ("File:" & specialfolderpath("Desktop") & "/fileX.csv") into url ("http://dl.dropbox.com/s/ywdblh201pkv7qn/fileX.csv") [/code]
I have uploaded fileX.csv manually to dropbox in order to get the link, i then replaced the "www" with "dl" and replaced "Https" with "Http".
The downloading part works like a charm but when I start uploading it does not change the initial file.
Any suggestions?

Thanks!
Zood

Re: using a filesharing site / SQL-Database

Posted: Fri Jul 07, 2017 3:13 am
by Mikey
Zood, look at the LC dropbox library for your dropbox activities.

Things you can do:
1) query dropbox for last modified date/time on the file(s) you are interested in, or name them with the seconds when they were updated or with a sequence number.
2) If you're using LC indy/commercial/etc., and the dropbox library, then make your calls asynchronously to get multiple things happening at once, which will remove some of the waits.
3) Have a master file and change files so that your clients can just download changes. If you name your change files with a sequence number, then the clients just have to keep track of the last sequence they saw, and download the ones following (although the overhead with this can be larger than you might like, so you may want to have intermediate change files, too (files that have, say, an hour worth of updates in them).
4) Have a separate machine sitting at home base that is monitoring your service (e.g. dropbox), then when there are changes uses push notifications to silently push changes to the clients. Please remember that push notifications are not guaranteed to reach the intended recipients, so while this can improve your app performance, it also may fail, so a backup plan is important.

Re: using a filesharing site / SQL-Database

Posted: Fri Jul 07, 2017 1:22 pm
by MaxV
Free dropbox lib will be included in livecode 9-dp7.
See https://github.com/macMikey/phxDropboxLib

Re: using a filesharing site / SQL-Database

Posted: Sat Jul 29, 2017 3:04 pm
by Zood
MaxV wrote:Free dropbox lib will be included in livecode 9-dp7.
See https://github.com/macMikey/phxDropboxLib
Hey Max,

I saw they had indeed put a dropbox support with the update, i just cant seem to get it up and running
Is there anyone with a sample stack to learn from?
Greatly apreciated!