Replies: 6 comments 19 replies
-
Very cool! |
Beta Was this translation helpful? Give feedback.
-
I don't think moving the computing tasks from the client side to the server side is a good idea at this point, I think we're better off letting client CPUs do their part. But that's always an option of course, which would lead to much more light client. Tell me what you think about it. The other option is to have both the server and the client perform the same operations, on the same data. If we want to move forward in that direction, we need to figure out the best way to share code and data between both client and server applications. NPM module is an option, sharing things manually in the same monorepo is another one. What do you think ? |
Beta Was this translation helpful? Give feedback.
-
Hi, API change : you can now query results in both TSV and binary format :
I've updated the API address in my initial post. I've simply used msgpack ( https://msgpack.org/index.html ) to serialise the whole UserResult To decode the binary result back to a UserResult object, simply do something like : I'll quickly make a demo that uses this in the client. |
Beta Was this translation helpful? Give feedback.
-
Yes, many changes indeed. I'll update the API. |
Beta Was this translation helpful? Give feedback.
-
Hi, I've updated the API. Now works with the query copied from www.covid19-scenarios.org (don't forget the ?v=1 !) Results are consistent with TSV export from the website. Have fun ! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the work that you've done on this so far - it's been interesting to read back and follow the development. We're looking to run mutiple scenarios for multiple regions and an API would be really make a difference to be able to do this. Currently, I'm looking at using selemium to automate this process however, its obviously not the most reliable or robust solution. Is it possible to/are there plans for allowing changing the age-specific assumptions? |
Beta Was this translation helpful? Give feedback.
-
Hi,
Several issues ( for instance, #117 ) are discussing the possibility of having a backend API.
Indeed, there would be many interesting things to do with such API (saving / caching results, sharing data, doing quantile projections (<-- yes, I've just copied pasted this one), etc) that we could discuss here.
Based on what has already been done on the serializeURL/deserializeURL part, I quickly made a simple server in NodeJS, which serves, for now, a single route. This route accepts the same query search parameter as the front, so it can be copied directly from the URL, and outputs a TSV.
What I've done, basically, is :
covid19_scenarios
along with a couple of other utilsThe code is here : https://github.com/brunorzn/covid19_scenarios_api
And it can be tested at this address : http://165.22.205.29/api/run?q=YOUR_QUERYAnd it can be tested at this address : http://covid19.velours.io/api/run/tsv?q=YOUR_QUERYAnd it can be tested at this address : http://covid19.velours.io/api/run/tsv?v=1&q=YOUR_QUERY
I hope you'll find it interesting and useful, and that we can discuss here how, and where, such API should be properly implemented.
Beta Was this translation helpful? Give feedback.
All reactions