DESIGN QUESTION: I have a SPA Angular 7 app, and have a fair amount of data that needs processing on every input from a user to turn into a graph. for example: if a user turns on the month of January the graph shows the data for just Janruary...then if a user turns on January AND February the graph updates again. There are also other filters a user can turn off and on. What is the best way to implement this feature?
1) Pull down all the necessary data onto the client and store in memory locally with the different months and properties the client turns off and on
2) Many smaller requests to the API and a loading spinner on the graph, processing done in the API to come back to the client relatively formatted
3) Something like Redis or memcache for storing the initial load of data on the component init
I'm slightly leaning towards the smaller calls to the API because I'd rather process with a strongly typed language (C# in this case)
Aucun commentaire:
Enregistrer un commentaire