A separate Erlang chat server stores all PIDs
in a mnesia
table and groups them under a Room ID so when a user sends a message, A gen_server
sends the message to all processes under that Room ID.
so far everything works great but the problem is:
When the user subscribes to the server, The server sends a message to all pids
to notify subscribers about a new subscriber, however I cannot think of/know a practical way to do reverse of it.
I need to let people know that a subscriber has unsubscribed and remove the pid from the table. How can I implement such supervsor
in yaws?