halomod / TheHaloMod-SPA

Single-page app for TheHaloMod
https://www.thehalomod.app/
MIT License
4 stars 0 forks source link

Initial Model #139

Closed steven-murray closed 3 years ago

steven-murray commented 3 years ago

Currently when starting up, there is no model displayed. I think it's great to just have a pre-computed default model displaying when you go to the page. It also makes the next computation slightly faster, since a bunch of stuff is already computed.

aneuhold commented 3 years ago

Just for future consideration, this would involve changing how the client-side store works in that it needs to send over what the client thinks it has and compare that with what the server has to reconcile the differences in the models. This should be done anyway, because if the server has something different than the client right now, it just doesn't show a plot but shows that there are models there. It should reinstantiate those models with the server if they don't exist yet on the server.

This previous step is required because the server will need to know if the client has any models yet to provide a default one. It wouldn't be good for the server to assume that because it doesn't have any models stored for that session ID, that it should provide a new one because it could overwrite the user's model or confuse the user because an extra model is sent back to add on top of their list.

aneuhold commented 3 years ago

Decision is to have one model on the server pre-computed and just clone that. It can be a high-resolution model.