Answer the question
In order to leave comments, you need to log in
Properly adding/updating tables in databases?
If everything is basically clear with the selection, we pulled out the data and store it in the cache periodically dumping it on the file so as not to lose the heated cache, but what about the case of frequently changing data? Redis and the like are not suitable, this data must be stored permanently. For example, take a like in any social. networks, because with any like there is no automatic request to the database to add / update? The only thing I could think of was to write changes / new data to the cache and update them in the database in batches according to the scheduler.
Answer the question
In order to leave comments, you need to log in
You can aggregate likes in Memcached in batches of 10k plus a time limit of up to 5 seconds. and then update the aggregated values in the db. Directly or through a queue.
For starters, at least.
In addition, on the client, you can delay sending after the 1st click using the debounce technique . Also related https://levelup.gitconnected.com/debounce-in-javas...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question