TheGreenHacker / IPC

13 stars 32 forks source link

Additional Feature if you are interested - Selective Updates #3

Open sachinites opened 5 years ago

sachinites commented 5 years ago

Currently, All clients are updated for any modification done in routing table on RTM server. What if clients needs to be notified only for selective entries.

When client starts, client must send "SUBSCRIBE_ALL" msg to server which tells server client is interested for all updates.

Later client can also send "SUBSCRIBE_ONE_ENTRY " to server, which tells server that it has to send updates only for this particular entry to this client.

When Client sends SUBSCRIBE_ONE_ENTRY to server, client must flush its entire routing table and maintain only those entries for which it has been selectively subscribed for.

When Client sends UNSUBSCRIBE_ONE_ENTRY to server, client must delete this particular entry from its routing table while others continue to exists. Server must not send any update for this entry to this client anymore.

When Client Sends Again "SUBSCRIBE_ALL" msg to server, again previous behavior for all updates should be restored.

When Client Sends "UNSUBSCRIBE_ALL" msg to server, client must flush its entire routing table and must not receive any update from server.

Server must maintain state of the client and print which client has subscribed for which service. Lot of work ??

TheGreenHacker commented 5 years ago

Haha sounds like a challenge I'm up for it (but might take me a while)!