in reply to Re^3: Constant SQL Querys to send "signals"
in thread Constant SQL Querys to send "signals"
You could convert either mechanism into an event driven system by using a named system semaphore,
Your super agent would create the named semaphore and then wait on it.
Your other code puts the information required by the super agent into a "known place"; whether that is a db table or the file system; and then signals (posts) the semaphore to tell the super agent it has work.
A perhaps simpler mechanism would be to have the super agent listen on a port. The other code delegates work to it by writing the details of the task to that port; and the tcp stack does the queuing.
The downside is that work items aren't persistent across system failures. The upside is work items aren't persistent across system failures.
|
|---|