I will describe the essence of the system:
a user visits the site (no registration) and spends time on it, leaving TEMPORARY records for 10 minutes, which other users can view and edit (or more precisely supplement the content of the post).
Problem one: where to save posts and additions to them?
It seems to me that it is not necessary to use the base here because of the speed (active recording / deletion / deletion of records after a short time), but will be limited to using the cache (memcached).Problem two comes up from the previous one: how to identify user records? (Temporary posts grouped by users are displayed on the main page (of course, not quite on the main page, because many posts are a big page)).
We will not go deep into various methods of identification, and we will take simple ip. IP also save to cache? I am not familiar with memcached, but I will study it as I write, so I will ask in advance:
How to create an array in memcached, where each record stores in it a different amount of time?
I will schematically describe the structure of such an array in "C ++":
struct el { ip, //идентификатор пользователя, заодно и связка с постами. time // время хранения } list<el> users; //сохраняет всех пользователей, которые на сайте list.push_back( aпи и время ); //когда появляется новый пользователь, то добавим в базу в кеше. После истечения time, запись с users автоматически удалится. Random entries associated with identifiers that are randomly obtained from this array will be displayed on the main page. How to get them randomly from an array in a cache?
Thanks for answers.