local helper application for remote database buffering

Josh josh at dvcreators.net
Mon Aug 20 12:22:48 EDT 2012


What I'm doing is, on closeField, an SQL command is created and added to a queue, which is stored in a custom property, as well as calling a handler that starts processing the queue.

Since this is fairly instant there is no lag in tabbing through fields or any user interface operation.

The queue processing handler sends the earliest SQL command to a server side PHP script which communicates with a MySQL database and only when a success message is received is the command removed from the queue. This way, if there's a temporary glitch in connection, that command just keeps trying until it gets done.

Of course, this is for UPDATE, INSERT and DELETE, not SELECT, which has to wait for the returned data usually.

Works great!

Cheers,

Josh


> On Sat, Aug 18, 2012 at 10:54 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
> 
>> Aside from the "minor" issues of database creation and the web buffer
>> layer, I have my application talking to a remote server.
>> 
>> The lag, though, is quite noticeable, when tabbing from one field that
>> updates to another.
>> 
>> Would it make sense to stash the fields used on a card into a local
>> sqlite database, save to that, and have a second standalone monitoring
>> the buffer and doing the updates?  I know that I can simulate
>> multi-threading with a delayed message, but that's still going to
>> freeze up the interface when it happens, won't it?
>> 
>> --
>> The Hawkins Law Firm
>> Richard E. Hawkins, Esq.
>> (702) 508-8462
>> HawkinsLawFirm at gmail.com
>> 3025 S. Maryland Parkway
>> Suite A
>> Las Vegas, NV  89109
>> 
>> _______________________________________________
>> 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
>> 
> 
> 
> 
> -- 
> http://www.bluewatermaritime.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




More information about the use-livecode mailing list