Conversation
This commit refact the DB to save the game's data (rather than in files). The DB schema have been heavilly modify to integrate the relations between all the data.
to update status or hashed password of the breeders.
Mark controls individuals for final evaluation
Instead of using DATA_DB as default for the db function, now it uses an R option. This was preventing the DB to be initialised when the setup script was launched from the game.
Note: Evaluation report have not been updated
A "worker" is started at the app initialisation. This worker constantly read the DB for unprocessed requests and process them.
I've saw some problems where the DB is sometime locked because either the app, or the worker is using it. Those settings should allow better concurrent usage of the db.
If the worker die durring the processing of a request, this request would be marked as "processing" undefinitly. This commit make the request processor check for unfinished request and mark them as failed if their "processing time" is unexpectedly long.
fix bug when the input reset only worked 1 time (other reset didn't actually reset the input)
Before, the individuals submission requests was saved in the DB with a progress of 0, which made the worker try to execute those requests and locked it. This have been fixed by: - Marking the individual submission related request's progress to 1 - Explicitly listing the type of request the worker fetch for processing
Also refact to test in separated files.
Should not be needed anymore with the request processor
Owner
|
Looks great Julien! I will notify Cédric Goby from Institut Agro Montpellier who has been deploying it recently on INRAE's SK8 service, so that he can test it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, @timflutre (cc. @chabrault ) I've made some big updates to the game:
Now the app fully use the power of the data-base rather than storing information in
files. The genetic values calculation have been optimized too. Rather than calculating
those before each phenotyping, it is calculated after the individuals creation and stored
in the DB. This doesn't affect much the plant material creation (the genotypes of the new
individuals is already in memory, and only 3 values are stored per individuals in the DB)
but it make the phenotyping request much faster as it can grab the genetic values directly
rather than loading the genotypes (rather slow) and calculating it.
Additional UI improvements have been made:
graphic plots (currently for tester and admin only, but I planned to implement a better system to select which player can have access to this).
phenotypic values, and selection status
A background worker process (
./src/request_worker.R) now execute the pheno/geno/pltmatrequests asynchronously. So the app is not frozen for all the users when one someone make a request.
When a player send a request, the Shiny app only store the requests information in the database
(which is fast). The worker (which automatically start with the application) regularly fetch the database
for unprocessed requests execute them one by one. The players can see the progress of their request with progress bar in the app.
To monitor the worker, the admin page have a new tab with:
processed requests)
To test, I have deployed the docker image with this changes with the
developmenttag eg.:docker run -d --rm --name plantbreedgame -p 80:3838 \ -v /host/path/to/plantBreedGameData:/var/lib/plantBreedGame \ juliendiot/plantbreedgame:development