How to know if a table is NOT loaded - Printable Version +- LiveCloud Forums (https://forums.livecloud.io) +-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1) +--- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=3) +--- Thread: How to know if a table is NOT loaded (/showthread.php?tid=124) |
How to know if a table is NOT loaded - simon.schvartzman - 09-11-2019 Hi team, here i go again... I understand that if I get an answer from calling cdb_ping("tablename") then "tablename" is properly loaded and I can work with it. Question is what happens if: 1 - there is no internet connection when I call cdb_ping("tablename"). 2 - there is internet connection but for some reason "tablename" has not been loaded. I've tried the following code [b]put cdb_ping("tablename") into aux answer cdb_result("response") [/b] and in both cases the program seems to get stuck on the cdb_ping function and never reaches cdb_result As a corollary is there any way to find out if a table isn't loaded? Many thanks RE: How to know if a table is NOT loaded - mark_talluto - 09-11-2019 (09-11-2019, 12:42 AM)simon.schvartzman Wrote: Hi team, here i go again... Hi Simon, Calling cdb_ping(tableName) resolves your tableName validity using underlying methods. Thus, you can not rely on this to verify that you have loaded a table or not.
We are trying to see what your hard communication time to the region is. Please report back what you get. RE: How to know if a table is NOT loaded - simon.schvartzman - 09-12-2019 (09-11-2019, 11:28 PM)mark_talluto Wrote:Hi Mark, please see below my code and the results I got(09-11-2019, 12:42 AM)simon.schvartzman Wrote: Hi team, here i go again... on mouseUp put "" initializeCanelaDB put cdb_auth("xxx@xxx.com","xxxx","xxxxx") into aux cdb_loadTable ("Notifications") put the milliseconds into aux repeat 5 put msg & crlf & "cdb_pingNode(): " & cdb_pingNode("Notifications") put msg & crlf & "cdb_ping(Notifications): "& cdb_ping("Notifications") put msg & crlf & "---------" end repeat put msg & crlf & "Total elapsed time: " & the milliseconds - aux end mouseUp Quote:cdb_ping(Notifications): 974.174023 and now replacing cdb_pingNode() by cdb_pingNode("Notifications") Quote:cdb_pingNode(Notifications): false I'm having a hard time to understand: 1 - why cdb_pingNode() returns nothing 2 - why cdb_pingNode("Notifications") returns false 3 - the response time variations of cdb_ping("Notifications") from a min of 830.114841 to a max of 1668.47682 ( 2x the min) Am I doing something wrong? RE: How to know if a table is NOT loaded - mark_talluto - 09-12-2019 Hi Simon, I modified the firewall to allow ping to work on your region. Please give cdb_pingNode() another try. The variability in transaction time when doing a cdb_ping() call could be due to the activity level of a given instance. cdbPing() is useful to gauge how available the portion of the region your data is stored. cdb_pingNode() is useful to guage how fast you can get a response from your portion of the region under the best conditions. RE: How to know if a table is NOT loaded - simon.schvartzman - 09-13-2019 (09-12-2019, 10:41 PM)mark_talluto Wrote: Hi Simon, Thanks Mark, New results with cdb_pingNode () Quote:cdb_pingNode(): 132.501 and with cdb_pingNode ("Notifications") Quote:cdb_pingNode(Notifications): false Still getting "false" with cdb_pingNode("Notifications"), and huge variations on cdb_ping("Notifications") Bottom line: what would you suggest about how to check for data availability before shooting a transaction against such data or sending an error message to the user asking to try again later. RE: How to know if a table is NOT loaded - mark_talluto - 09-18-2019 I have not forgotten about this thread. Still working on an answer. RE: How to know if a table is NOT loaded - mark_talluto - 09-25-2019 (09-18-2019, 12:44 AM)mark_talluto Wrote: I have not forgotten about this thread. Still working on an answer. I fixed the cdb_node() bug. The longer answer to improving performance when you are not geographically near a region is a challenging problem. We have some ideas on how we can bring data closer to you and your customers. For now, lets call this 'Region Extenders'. We are in the early phase of working on this. We are not sure this will work. We can not say for sure if we will release this. But, I think there is a need to work on making data as accessible as possible. RE: How to know if a table is NOT loaded - simon.schvartzman - 09-25-2019 Hi Mark, any timeframe to expect a decision? Needless to say I'm here to help with the testings... Regards RE: How to know if a table is NOT loaded - mark_talluto - 09-26-2019 (09-25-2019, 05:56 PM)simon.schvartzman Wrote: Hi Mark, any timeframe to expect a decision? Needless to say I'm here to help with the testings... I dare not say. You know how those things can go. We are very optimistic about this being helpful. Thanks for the offer to try it. If we get it to the stage where it looks good, I will definitely request for people to give a try. |