Re: Speed on Android
On 3/22/2015 10:37 AM, Ralph DiMola wrote: It was bugging me. I wasn't going to let it go. For which I am grateful. Thank you for being stubborn. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/22/2015 8:45 AM, Pierre Sahores wrote: GET and POST are perfectly supported on both iOS and Android. If you send them to an LC server script (connected to the DB in localhost mode), you will no more have to compose with any latency anymore. Thanks Pierre. I'm actually doing that with another project and it works great. For this project I wanted to keep everything in the app if possible. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
Glad it worked out for you! It was bugging me. I wasn't going to let it go. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Saturday, March 21, 2015 9:22 PM To: How to use LiveCode Subject: Re: Speed on Android On 3/21/2015 7:34 PM, Ralph DiMola wrote: > Brain storm. > How about the "true" I put in the revOpenDatabase after the > password, Could this be it? Oh man. That was it. I think I love you. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
Jacque, GET and POST are perfectly supported on both iOS and Android. If you send them to an LC server script (connected to the DB in localhost mode), you will no more have to compose with any latency anymore. working example : on the iOS/Android mobile client app side : set the socketTimeoutInterval to 6 set httpHeaders to "Content-type: application/x-www-form-urlencoded" & return post URLEncode(gAppVars["MobileAppID"] & "=" & hexDigest("publicmclt") & "&" & prevSession & "&stock_decrement=-1") to URL MIAS put it into tResponse on the server side, each DB opened connexion (PostgreSQL 8.4 on Pancake in my case) need to be closed before the request is returned to the mobile app. This kind of procedure respond in just some ticks (+ network latency itself witch is < 100-300 ms from pancake witch is, in my case, hosted at less than 600 miles from my office) Pierre > Le 21 mars 2015 à 20:01, Richard Gaskin a écrit : > > Ralph DiMola wrote: > > > Richard Gaskin wrote: > > > >>How does LC connect to the database socket on platforms where it > >> provides no socket support? > > > > Magic. > > I'm intrigued. Does this magic work on Android as well? > > I wonder if we can leverage this for other socket comms... > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > > ambassa...@fourthworld.comhttp://www.FourthWorld.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On Mar 21, 2015, at 2:57 PM, Ralph DiMola wrote: > Richard Gaskin wrote: > >> How does LC connect to the database socket on platforms where it provides > no socket support? > > Magic. "Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clark -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 7:34 PM, Ralph DiMola wrote: Brain storm. How about the "true" I put in the revOpenDatabase after the password, Could this be it? Oh man. That was it. I think I love you. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 7:39 PM, Ralph DiMola wrote: Another thing. Could it be your router/firewall? Did you try over the cellular network? If it were my router I think it would fail on my Mac and it works fine there. I can try on a different network though. How about the "true" I put in the revOpenDatabase after the password, Could this be it? I wondered about that. I'll see. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
Another thing. Could it be your router/firewall? Did you try over the cellular network? I also open the DB once and let the socket close when the app exits I never issue an explicit close. ==>Image of Ralph grasping at straws. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Saturday, March 21, 2015 6:41 PM To: How to use LiveCode Subject: Re: Speed on Android On 3/21/2015 5:24 PM, Ralph DiMola wrote: > I just open the remote database like this==> put > revOpenDatabase("mysql", "YourDomain.on-rev.com", "DatabaseName" > ,"Username" ,"Password" true) into DBID > > Note there is no"http://"; Yes, I misspoke. There's no "http" in the database path, it's like yours: put "accountname.on-rev.com" into tDatabaseAddress put "xxx" into tDatabaseName put "" into tDatabaseUser put "passwdxx" into tDatabasePassword put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tID I get an ID back. When I issue commands, I also get database data back. Then I have to wait 10-15 seconds until the app unfreezes. Every database call in the scripts is surrounded by a command to open the database, get data, close the database. It used to not always close the connection, but I added all the closures to see if it would help. Neither way makes any difference. I shouldn't have said "http", I should have said "sockets". I think what's happening is a socket timeout. Even though LC says there is no socket support on mobile, there must be something under the hood if it is communicating with a server. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
This is perplexing. I just put in a front script for preopencard and log the current card name to the remote MySQL db(diesel). I just tested it on my Galaxy S4 and still have sub-second card changes. Highlighting of the buttons work. The app is still snappy. I checked the db and the log entries are there. There has to be something we're overlooking here. Brain storm. How about the "true" I put in the revOpenDatabase after the password, Could this be it? Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Saturday, March 21, 2015 6:41 PM To: How to use LiveCode Subject: Re: Speed on Android On 3/21/2015 5:24 PM, Ralph DiMola wrote: > I just open the remote database like this==> put > revOpenDatabase("mysql", "YourDomain.on-rev.com", "DatabaseName" > ,"Username" ,"Password" true) into DBID > > Note there is no"http://"; Yes, I misspoke. There's no "http" in the database path, it's like yours: put "accountname.on-rev.com" into tDatabaseAddress put "xxx" into tDatabaseName put "" into tDatabaseUser put "passwdxx" into tDatabasePassword put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tID I get an ID back. When I issue commands, I also get database data back. Then I have to wait 10-15 seconds until the app unfreezes. Every database call in the scripts is surrounded by a command to open the database, get data, close the database. It used to not always close the connection, but I added all the closures to see if it would help. Neither way makes any difference. I shouldn't have said "http", I should have said "sockets". I think what's happening is a socket timeout. Even though LC says there is no socket support on mobile, there must be something under the hood if it is communicating with a server. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 5:24 PM, Ralph DiMola wrote: I just open the remote database like this==> put revOpenDatabase("mysql", "YourDomain.on-rev.com", "DatabaseName" ,"Username" ,"Password" true) into DBID Note there is no"http://"; Yes, I misspoke. There's no "http" in the database path, it's like yours: put "accountname.on-rev.com" into tDatabaseAddress put "xxx" into tDatabaseName put "" into tDatabaseUser put "passwdxx" into tDatabasePassword put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tID I get an ID back. When I issue commands, I also get database data back. Then I have to wait 10-15 seconds until the app unfreezes. Every database call in the scripts is surrounded by a command to open the database, get data, close the database. It used to not always close the connection, but I added all the closures to see if it would help. Neither way makes any difference. I shouldn't have said "http", I should have said "sockets". I think what's happening is a socket timeout. Even though LC says there is no socket support on mobile, there must be something under the hood if it is communicating with a server. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
Oh. DOH, never mind, you aren't using an intermediate layer, so yeah. what ralph said. On Sat, Mar 21, 2015 at 4:24 PM, Ralph DiMola wrote: > I just open the remote database like this==> put revOpenDatabase("mysql", > "YourDomain.on-rev.com", "DatabaseName" ,"Username" ,"Password" true) > into DBID > > Note there is no "http://"; > > Ralph DiMola > IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On > Behalf > Of J. Landman Gay > Sent: Saturday, March 21, 2015 6:04 PM > To: How to use LiveCode > Subject: Re: Speed on Android > > On 3/21/2015 1:51 PM, Ralph DiMola wrote: > > I see what libURL is all about but I don't see what it has to do with > > opening a MySQL db from an app. > > The database is on a remote server, so it uses an http URL rather than a > file path and requires some method of internet communication. That's > usually > handled by libURL on the desktop, but it isn't available on mobile. > > Are you connecting to a database on a server remotely? > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > ___ > use-livecode mailing list > use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
Hmm. I thought you could still get URL "blah blah" on mobile and it would work. In fact, though the functionality differs slightly, you can use the load command on mobile too. Perhaps this would be useful? If you're using http urls, the only real difference in load between desktop and mobile, is that desktop caches. On mobile, you use the "with message" form and the contents of the load are sent as a parameter to the handling message. I don't think you need to worry about "unload" on mobile either. The nice thing about load is that, even if it takes a while for the load to complete, you don't lose functionality in your app while its waiting. Load is non-blocking. When it completes, the designated message fires, and you can deal with it. It has been a while since I've used load on mobile though, so it might now cache, so, ymmv. Yep, just checked the dictionary for load, and it says this: The iOS and Android engines do not support 'libUrl' but allows you to use load in the background. So my guess is that load still does not cache, but even so, it may work well for your needs. On Sat, Mar 21, 2015 at 4:05 PM, J. Landman Gay wrote: > On 3/21/2015 2:07 PM, Ralph DiMola wrote: > >> Ralph DiMola wrote: >>> >> >> Richard Gaskin wrote: >> >> >> >>>How does LC connect to the database socket on platforms where it >> >> provides no socket support? >> >> >> >> Magic. >> >> Richard Gaskin wrote: >>> I'm intrigued. Does this magic work on Android as well? >>> >> >> I wonder if we can leverage this for other socket comms... >>> >> >> This magic works transparently on both iOS and Android. Use it every day. >> > > Well, it isn't working here and I wish I knew why. > > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > ___ > use-livecode mailing list > use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
I just open the remote database like this==> put revOpenDatabase("mysql", "YourDomain.on-rev.com", "DatabaseName" ,"Username" ,"Password" true) into DBID Note there is no "http://"; Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Saturday, March 21, 2015 6:04 PM To: How to use LiveCode Subject: Re: Speed on Android On 3/21/2015 1:51 PM, Ralph DiMola wrote: > I see what libURL is all about but I don't see what it has to do with > opening a MySQL db from an app. The database is on a remote server, so it uses an http URL rather than a file path and requires some method of internet communication. That's usually handled by libURL on the desktop, but it isn't available on mobile. Are you connecting to a database on a server remotely? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 1:44 PM, Richard Gaskin wrote: J. Landman Gay wrote: > Richard Gaskin wrote: >> Que a post from Mark Wieder about the benefits of web APIs >> for DB connectivity in three...two...one... ... > ...the conclusion is: remote database connections are not supported. But GET and PUT are. :) Snappy, and more secure than exposing the DB to the Internet. LC Server will perform well under reasonable loads. If high traffic is anticipated you'll want a FastCGI option, such as PHP can provide. I'm changing over out of necessity but none of this should be necessary. The database is not particularly sensitive, security is not an issue, the database isn't visible to the public but if someone hacks it there's no harm done, and the load is going to be so light as to be almost non-existent. Meanwhile this is taking longer and is more trouble than it should have been. I had a nice, compact all-in-one solution bundled up into a single app file. Now I need server scripts and dispatcher code and files in multiple locations. Not to mention maintenance for a non-techie client. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 2:07 PM, Ralph DiMola wrote: Ralph DiMola wrote: >> Richard Gaskin wrote: >> >>>How does LC connect to the database socket on platforms where it >> provides no socket support? >> >> Magic. Richard Gaskin wrote: I'm intrigued. Does this magic work on Android as well? I wonder if we can leverage this for other socket comms... This magic works transparently on both iOS and Android. Use it every day. Well, it isn't working here and I wish I knew why. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 1:51 PM, Ralph DiMola wrote: I see what libURL is all about but I don't see what it has to do with opening a MySQL db from an app. The database is on a remote server, so it uses an http URL rather than a file path and requires some method of internet communication. That's usually handled by libURL on the desktop, but it isn't available on mobile. Are you connecting to a database on a server remotely? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
>>Ralph DiMola wrote: >> Richard Gaskin wrote: >> >>>How does LC connect to the database socket on platforms where it >> provides no socket support? >> >> Magic. >Richard Gaskin wrote: >I'm intrigued. Does this magic work on Android as well? >I wonder if we can leverage this for other socket comms... This magic works transparently on both iOS and Android. Use it every day. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
Ralph DiMola wrote: > Richard Gaskin wrote: > >>How does LC connect to the database socket on platforms where it >> provides no socket support? > > Magic. I'm intrigued. Does this magic work on Android as well? I wonder if we can leverage this for other socket comms... -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
Richard Gaskin wrote: >How does LC connect to the database socket on platforms where it provides no socket support? Magic. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
Ralph DiMola wrote: > I see what libURL is all about but I don't see what it has to do with > opening a MySQL db from an app. All I do is open the dB with a: > > put revOpenDatabase("mysql", tDatabasePath, DBName ,"username" ,"Password" > true) into DBID > > The DB remains open during app execution. I don't see any reconnecting > hangs. DB access performance is only limited by the speed of the > internet connection. Has been working well for me since LC 4 thru 7 > for mobile. How does LC connect to the database socket on platforms where it provides no socket support? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
>> Que a post from Mark Wieder about the benefits of web APIs >> for DB connectivity in three...two...one... I agree. I am actively changing all my mobile DB access to a web service. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Richard Gaskin Sent: Saturday, March 21, 2015 2:44 PM To: use-livecode@lists.runrev.com Subject: Re: Speed on Android J. Landman Gay wrote: > Richard Gaskin wrote: >> Que a post from Mark Wieder about the benefits of web APIs >> for DB connectivity in three...two...one... ... > ...the conclusion is: remote database connections are not supported. But GET and PUT are. :) Snappy, and more secure than exposing the DB to the Internet. LC Server will perform well under reasonable loads. If high traffic is anticipated you'll want a FastCGI option, such as PHP can provide. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
Jacqueline Landman Gay wrote: >Here's my new theory. Mobile doesn't support libURL, which is what handles the connections on desktop. When I ask for a remote connection to a database, >something takes over that seems to repeatedly try to connect and times out (10+ secs or so.) In between timeouts I have a window where touches are >processed, then I have to wait for the next timeout. In the meantime, the app is in a continual state of sending and waiting for a response from the >server. Closing the database connection isn't enough to stop the process. > >This is my completely unknowlegeable theory based only on observation. >But the conclusion is: remote database connections are not supported. I see what libURL is all about but I don't see what it has to do with opening a MySQL db from an app. All I do is open the dB with a: put revOpenDatabase("mysql", tDatabasePath, DBName ,"username" ,"Password" true) into DBID The DB remains open during app execution. I don't see any reconnecting hangs. DB access performance is only limited by the speed of the internet connection. Has been working well for me since LC 4 thru 7 for mobile. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
J. Landman Gay wrote: > Richard Gaskin wrote: >> Que a post from Mark Wieder about the benefits of web APIs >> for DB connectivity in three...two...one... ... > ...the conclusion is: remote database connections are not supported. But GET and PUT are. :) Snappy, and more secure than exposing the DB to the Internet. LC Server will perform well under reasonable loads. If high traffic is anticipated you'll want a FastCGI option, such as PHP can provide. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/21/2015 12:58 AM, Ralph DiMola wrote: I access a remote MySQL db(diesel) when the app starts up. It takes a couple of seconds to do a few reads and writes. I will put a db write inbetween cards and see how long it takes. Here's my new theory. Mobile doesn't support libURL, which is what handles the connections on desktop. When I ask for a remote connection to a database, something takes over that seems to repeatedly try to connect and times out (10+ secs or so.) In between timeouts I have a window where touches are processed, then I have to wait for the next timeout. In the meantime, the app is in a continual state of sending and waiting for a response from the server. Closing the database connection isn't enough to stop the process. This is my completely unknowlegeable theory based only on observation. But the conclusion is: remote database connections are not supported. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
I access a remote MySQL db(diesel) when the app starts up. It takes a couple of seconds to do a few reads and writes. I will put a db write inbetween cards and see how long it takes. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net Original message From: "J. Landman Gay" Date:03/21/2015 01:40 (GMT-05:00) To: How to use LiveCode Subject: Re: Speed on Android On 3/20/2015 11:07 PM, Ralph DiMola wrote: > I use both SQLite and MySQL in Android apps. > There are background images, resizing going on and local SQLite DB access to > build scrolling lists of hundreds of lines in sub-second card changes after > touching a button. Even orientation changes with resizing are sub-second. > Must be something in your dev environment. I think that's the difference -- I'm trying to access a remote server. I expected some small transmission delay but nothing like this. It isn't timing out I don't think; at least, I do eventually get data back. Maybe the connection is hanging? I tried closing the database connection after every retrieval but it didn't help. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/20/2015 11:07 PM, Ralph DiMola wrote: I use both SQLite and MySQL in Android apps. There are background images, resizing going on and local SQLite DB access to build scrolling lists of hundreds of lines in sub-second card changes after touching a button. Even orientation changes with resizing are sub-second. Must be something in your dev environment. I think that's the difference -- I'm trying to access a remote server. I expected some small transmission delay but nothing like this. It isn't timing out I don't think; at least, I do eventually get data back. Maybe the connection is hanging? I tried closing the database connection after every retrieval but it didn't help. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
J, Geez... I was talking about a much more subtle slowdown. From sub .5 second to sub-second performance. I use both SQLite and MySQL in Android apps. There are background images, resizing going on and local SQLite DB access to build scrolling lists of hundreds of lines in sub-second card changes after touching a button. Even orientation changes with resizing are sub-second. Must be something in your dev environment. I just build one today using this Dev Environment: Testing on a Galaxy S4 Win XP SP3 LC 6.7.3 JDK 1.6.0_31 Android: SDK Tools 23.0.5 Platform-tools 21 Build-tools 22.1.1 Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Friday, March 20, 2015 8:40 PM To: How to use LiveCode Subject: Re: Speed on Android On 3/20/2015 4:52 PM, Colin Holgate wrote: > Is there a very simple test stack you can make that shows the delay? > Does it make a difference if you use touch events instead of mouse > events? Okay, I've narrowed it down to the database drivers or libraries. If I create an apk without any database inclusions, everything is snappy and runs great. I get some database connection errors in my scripts which is to be expected, but reaction to touch events is instant and card changes are fast. Then I recompile with the database driver (mySQL) and database library and bam. By the clock, 14 seconds from a mouseDown to script execution. What has me puzzled is that this happens on every button, every touch, every card, regardless of whether or not it uses database calls. For example, a button with only a single line of script "go card xxx" has the same delay. On a card with nothing but a list field, a tapped line takes 15 seconds to recognize the tap and hilite. So something about the database is blocking everything else. I haven't worked with it before so I don't know what. Are there some techniques I should be using, like closing connections at a certain time or something else? The stack works fine on desktop, btw. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/20/2015 8:08 PM, Richard Gaskin wrote: Que a post from Mark Wieder about the benefits of web APIs for DB connectivity in three...two...one... Before I consider this approach, how is the performance of LC Server with a MySQL database? Will it have the same problems my stack does? Is it fast enough? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
J. Landman Gay wrote: > Okay, I've narrowed it down to the database drivers or libraries. ... > Then I recompile with the database driver (mySQL) Que a post from Mark Wieder about the benefits of web APIs for DB connectivity in three...two...one... -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/20/2015 4:52 PM, Colin Holgate wrote: Is there a very simple test stack you can make that shows the delay? Does it make a difference if you use touch events instead of mouse events? Okay, I've narrowed it down to the database drivers or libraries. If I create an apk without any database inclusions, everything is snappy and runs great. I get some database connection errors in my scripts which is to be expected, but reaction to touch events is instant and card changes are fast. Then I recompile with the database driver (mySQL) and database library and bam. By the clock, 14 seconds from a mouseDown to script execution. What has me puzzled is that this happens on every button, every touch, every card, regardless of whether or not it uses database calls. For example, a button with only a single line of script "go card xxx" has the same delay. On a card with nothing but a list field, a tapped line takes 15 seconds to recognize the tap and hilite. So something about the database is blocking everything else. I haven't worked with it before so I don't know what. Are there some techniques I should be using, like closing connections at a certain time or something else? The stack works fine on desktop, btw. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
On 3/20/2015 4:20 PM, J. Landman Gay wrote: Any speedup tricks? An addition: the main problem seems to be that it is taking 5-8 seconds to respond to a touch event. After that, scripts run at only slightly slower speeds than desktop. I'm using mouseUp rather than touchEnd. Would that matter? In the past they were equivalent. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Speed on Android
Is there a very simple test stack you can make that shows the delay? Does it make a difference if you use touch events instead of mouse events? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Speed on Android
> J. Landman Gay wrote: >Buttons and list fields are not autohiliting because it takes too long for the app to realize you're touching it. I've noticed mobile getting slower and slower since v6. 5.5.4 was much faster in both in the IDE and Mobile. Did you try Casey's Solitaire in 6.7.3? Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Friday, March 20, 2015 5:20 PM To: LiveCode Mailing List Subject: Speed on Android I'm trying to build an Android app. It is taking about 5 seconds to respond to touches, card changes, etc. I started with 7.0.3, then tried in 6.6.7 thinking it might be faster but it's the same. Buttons and list fields are not autohiliting because it takes too long for the app to realize you're touching it. Sometimes updating a card takes long enough for Android to put up its "not responding" warning. There are no real moving parts in the app so there is nothing that particularly applies to the layermode. It reads fields and database records. There is one card where it creates a number of groups dynamically and I'm quite sure that's one cause of the problem. Any speedup tricks? Would the database inclusions cause a slowdown? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Speed on Android
I'm trying to build an Android app. It is taking about 5 seconds to respond to touches, card changes, etc. I started with 7.0.3, then tried in 6.6.7 thinking it might be faster but it's the same. Buttons and list fields are not autohiliting because it takes too long for the app to realize you're touching it. Sometimes updating a card takes long enough for Android to put up its "not responding" warning. There are no real moving parts in the app so there is nothing that particularly applies to the layermode. It reads fields and database records. There is one card where it creates a number of groups dynamically and I'm quite sure that's one cause of the problem. Any speedup tricks? Would the database inclusions cause a slowdown? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode