How to make an application get know that some other application is offline (RPC)?

39 Views Asked by At

I am creating an application with RPC. There are two servers and some “handler” connecting to this server, the client only connects to the handler and then the handler decides what server is going to answer the request.

There's a function kill() on Handler, evertytime i want to turn off a server I call it remotely (RPC) on server before close the application, therefore I can know which server is available. In other words, i only use this function to tell the handler that the application is not available anymore. Let's suppose I turn off the machine or if I just press ctrl + z on terminal, how can I make the handler get aware of who is online ?

Link to my project: https://github.com/vitor96k/BlogRPC-3

0

There are 0 best solutions below