S
S
switlle2012-02-07 01:00:26
linux
switlle, 2012-02-07 01:00:26

Interserver semaphores?

The task is to organize a queue, but there is no desire to radically alter the existing system, which uses semaphores as synchronization.
Can anyone tell me how to implement semaphores or any similar locks. The server uses Debian, Ubuntu, php code. Consider options independent of the language.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
egorinsk, 2012-02-07
@egorinsk

Locking by creating a key in Memcache is the easiest option.

K
Konstantin, 2012-02-07
@Norraxx

To be honest, I didn't understand. But purely theoretical:
en.wikipedia.org/wiki/Parallel_Virtual_Machine
en.wikipedia.org/wiki/Message_Passing_Interface

V
Vitaly Peretyatko, 2012-02-07
@viperet

By the way, queues are well organized through Redis, with its help you can also make a semaphore by creating a key ...

N
niko83, 2012-02-07
@niko83

To work with queues, they use rabbitmq, read in more detail what they write about it, maybe this is your option.

A
Alexey Sundukov, 2012-02-07
@alekciy

IPC apparently? It is local by definition, so you can't do without modifying the current code and rolling out new software. In addition, the presence of a lock for the queue is completely optional. Depends on the task. And depending on the task, it will be more correct to use Memcache / Redis or rabbitmq. The latter is written in erlang, which will pull the installation of the VM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question