OpenTreeOfLife / opentree

Opentree browsing and curation web site. For overarching or cross-repo concerns, please see the 'germinator' repo.
http://tree.opentreeoflife.org/
BSD 2-Clause "Simplified" License
109 stars 26 forks source link

move API calls to client in top page of webapp #658

Open mtholder opened 9 years ago

mtholder commented 9 years ago

In https://github.com/OpenTreeOfLife/opentree/blob/master/webapp/controllers/default.py#L63-L66 there are comments noting that the basic info could/should be cached. I agree with that.

But in the meantime, it would be nice if we could have a response page with the api server is down.

Right now api.opentreeoflife.org treemachine services are hanging, and so I don't get a response from tree.opentreeoflife.org for 2 minutes. I think that the server-side calls highlighted in the code above have to time out before we get a response.

If the page did that with AJAX (and had some fancy timer to tell the user that we're running into problems with the API server) then the system would be friendlier when we have these outages.

update JSON->AJAX fixed.

jimallman commented 9 years ago

I think that the server-side calls highlighted in the code above have to time out before we get a response.

Yes, the synth-tree viewer tries to load key tree ids from treemachine and will hang around waiting for the response. As you suggest, I can move that request to the client.