Hi there,
I am working on a distributed service detection project, written in C/C++
Platform is Linux. Each system under network has mysql database for general storage. If first node queries to second node and if request gets satisfied, First node will put these results in its local cache table. So whenever same query gets fired on first node, it would just return the results from its cache table.
The problem arises when second node changes his database table.
First node should get notified that its cache has got dirty.
This is the classical problem of "Dirty Cache Detection".
One solution would be, Each node will store the information of the system whom did he serve. And whenever local database changes, it'd send the message to the other system, notifying that you can clear your cache.
There will be thousands of nodes and above solution will increase the network traffic terribly.
Give me some algorithm or any existing library for this event notification(must be efficient).
NOTE:My English is weak. So let me know if you don't understand the problem.
Regards,
Ash