Closed arlin closed 8 years ago
I implemented time-out for iOS Application when app made request to Open Tree.
BTW, I figured it out the problem for 34 species names that you cannot see the Tree result. It is not issue of Open Tree, Open Tree returned a Tree. The problem is that, because the result tree of Open Tree is huge and jsphylosvg cannot render the Tree visualization (Because in app right now, I used jsphylogsvg library to render the Tree visualization)
I attach here the request to Open Tree. I guess that this problem can be solved when Abu makes change to use induced_subtree instead of subtree function
You can easily test this request with your browser, and you can see the huge tree
Moreover, in future, if we want to display a huge tree, I think we should determine another Tree Visualization instead of jsphylosvg. May be the library that Van used in portal.
Efficiency is exactly the reason why I had to look for d3 for visualization instead of just being plug-and-play as in case of phylojs.
FYI, the tree has over 8000 tips. So, I would call that a "huge" tree for purposes of visualization. We should be able to support effective viewing of trees with dozens of species in the mobile app, and we should be able to support viewing trees with hundreds of species in the web portal.
Yes, @thanhnh-infinity, the problem is that phylo.cs.nmsu.edu is not making the correct query to OpenTree for the induced subtree, i.e., the problem is phylotastic/phylo_webservices#12 . @abusalehmdtayeen, could you make it a priority to fix that? We can't distribute the mobile app until we fix this problem.
@arlin: yes, I would fix that today.
Hi @abusalehmdtayeen @arlin : I think iOS app works well right now. We can see the tree
We need to find a test case for this. Maybe some dinosaur names?
I can't find a case that makes OpenTree time-out. I tried dinosaurs but what happens in this case is that OpenTree immediately returns the result that there is no information.
Maybe you should use very slow network
I tried to test this feature by this way:
Good idea, @thanhnh-infinity. I verified that this works, but it happens very quickly. I was getting the "try again" error after about 7 seconds. What waiting time are you using?
Hi @arlin , because in the newest version, app can automatically detect no network and display warning message immediately when network is not connected. It means when you turn off Wifi or 4G, app will warn you.
OK, good. I'm closing this.
If OpenTree does not return a result within X seconds, exit and alert the user: "Sorry! We did not get a response in X seconds. Please wait and try again later."
The value of X should be chosen as a balance between (1) giving OpenTree enough time to respond and (2) not annoying the user with a long wait. I would suggest X = 15 s.