non-blocking http ... will tsnet end up in community?
andrew at midwestcoastmedia.com
andrew at midwestcoastmedia.com
Wed Dec 20 09:43:21 EST 2017
> DDoS tools aside <g>, what APIs need more than one call at a time?
>
I can think of a use in my (relatively) simple Indiana On Tap mobile
app. Currently I fetch some mySQL data and download some images from a
HostM account through their SSL API. The data is a couple of arrays
with a 30-300 entries each and the images are between 5KB-200KB.
Sometimes these fire off super fast back-to-back-to-back finishing in
3 or 4 seconds, but other times there is a network lag (I've scripted
some tests and determined it isn't the app or the server process) and
the entire process takes up 25 seconds.
Just recently while testing some REST stuff I discovered how to do the
async tsNet calls (I second whomever suggested crowd funding Charles
to write some tutorial stacks!). I think by calling these commands
async will allow me to speed up the app initialization process: no
waiting for server reply between each request so I can move onto the
1st non-splash card of the app.
The speed increase and ability to make multiple concurrent
non-blocking calls is also the key to allowing "Enable Background
Execution" of this app. This unexpected bonus benefit is YUGE as that
has been a complaint about the app.
--Andrew Bell
More information about the use-livecode
mailing list