Demon locks with API for PHP (or any simple API)?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
Recommend, please, some simple popular daemon support lock that waits for connections from clients on TCP and handles the requests for exclusive locks.


I need to synchronize concurrent PHP processes on MULTIPLE machines. For example, the first machine can say "I block the ID of 'abcd' starting from the current moment until my death/disconnect". And if the second car then say "lock 'abcd'", the query "most intriguing moment" as long as the first machine releases the ID 'abcd'. It is important that the identifier should also automatically released if the process dies unexpectedly and doesn't have the ability to tell the daemon lock, which it releases the identifier (it may work, for example, through the tracking of disconnection on the side of the demon — because when the client dies, the connection with the demon breaks).


I looked in the direction of the memcached add(), but it doesn't quite fit because a) can't handle sudden disconnects (the connection with the server though and keeps, but from the point of view of the semantics of lock means nothing) and b) I do not fit the schema lock to be released just in time out of inactivity of the process because the process can be random time.


Need is a demon who knows how to work with persistent connections and handles them in the gap as a signal for releasing the lock.
by | 4 views

1 Answer

0 like 0 dislike
Raise redis, and to implement long operations do's auto-update timeout
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
25,187 users