Testing Bandwidth with new TSNet Functions

Sannyasin Brahmanathaswami brahma at hindu.org
Wed Nov 15 12:51:33 EST 2017


Someone suggested we could test bandwidth by getting the milliseconds before calling a ping.txt file on our server (contains one word "true") and then check the milliseconds after getting the result and we might use this to determine if the bandwidth was sufficient for streaming content from the web server.

Some very, very big "million dollar" apps are surprisingly "brutal" about this… Spotify, for example, even if I am on 3G and able to get a web page on Safari in my iPhone 7… will simply throw up It's broken connection icon (pretty ugly, whole screen display) and not even bother to "say anything" to the user.

FlipBoard, the "super access to all the publications in some large universe" simply fails on startup if you are offline when you boot, they don't even give the user the courtesy of a notification that they are off line.  OK well I take that back.. not at least they tell you to turn off airplane mode… but if on super low 3G  the app just becomes non-functional stopping cold on the splash screen, again, not even bothering to tell the user anything.

Our SivaSiva app has a mix of content resident in the app and content we call dynamically, so I need a more robust/gracefulway to deal with users walking from 4 bars strong LTE at the coffee shop to 1 blip 3G connection as they walk down the street to the bus, and then back up with 5bars Wi-Fi at home or office.

Currently my ping-the-server method is to see if I can get the ping file, but fetching a ping.txt with only 4 chars data, tends to work, even in low bandwidth situations, this "fools" the app into thinking it has a connection, but if they try to then look at a video in the browser widget from YouTube, or load an image heavy page (our blog) or call some painting/artwork into an image object… the browser widget  just "goes white"  -- (a bug IMHO), because I can/do put up a loading gif on the card, but the browser widget takes over and "hangs on blank" waiting for the GET connection go pull enough data to start rendering and I have no way to tell the user their bandwidth is too low. So this just make the app look like it failed or is "super slow."

That's the back story: I know TS Net has some functions along these lines, before I dive in from ground zero and flail around this issue, can anyone share what they are using/doing to deal with variable bandwidth? What is working for you and a few snippets would be greatly appreciated.

Brahmanathaswami
www.himalayanacademy.com<http://www.himalayanacademy.com> Get the SivaSiva App today (for iPhone and iPad)
https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
(Android Pending HQ's Solution to some Engineering Issues)




More information about the use-livecode mailing list