G
G
grabbee2017-05-09 23:13:50
PHP
grabbee, 2017-05-09 23:13:50

Is delayed writing in Mysql like debounce or memcache possible?

For example, memcache allows you to do a kind of delayed reading from the database - is it possible to somehow make a delayed write like debounce from underscore.js so that the database entry occurs only 30 seconds after the last data update in Memcache? For example, there are requests every second to update the data that is now in Memcache - and these requests do not reach the database. And only after the requests have stopped pouring in, write the actual data from Memcache to the database. Memkesh as an example, I don't know what to use and how.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2017-05-09
@MaxDukov

And you will not read from base at all?
If you need to write down very quickly, and at the same time half the possibility of losing this data, but you still need to read - make a table in memory. Fortunately, the same muscle can do this. And already separate process throw off the data in normal tables.

R
reallord, 2017-05-10
@reallord

Naively, there is no such thing in MySQL, but...
If the amount of data is small, then what prevents you from writing data to a mySQL table with the memory type, as suggested above, adding a column, row update date and running a separate cron that reads rows from the memory table with a query and writes to the database a normal table with type myisam/innodb all rows older than 30 seconds and deletes them from the memory table?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question