Multiprocessor Record

I have a database that is shared between various different Ruby on Rails processes. To maintain consistency, I would like the record I was working on to be updated.

I hope to solve this problem: process A reads the record, process B reads the same record, the process updates the record (now the record instance in process B is out of date). Since there are several processes, I obviously cannot use any mutexes, etc.

Is there a good way to do this?

+3
source share

Source: https://habr.com/ru/post/1753949/


All Articles