Closed JayThomason closed 10 years ago
This is what I suggested here, not sure I communicated it well though:
https://github.com/JayThomason/Tutti/issues/163
As I pointed out there, it could place some extra strain on the master phone networking, which is already a bottleneck. We should also keep in mind that the master phone is likely to be the driver's phone and thus also likely to be turned off most often. This power manager thing sounds like a real bitch.
Yeah I remember you suggesting it. I had just implemented the other solution because I had just done it with the server right before.
Based on what I've seen so far, there is essentially a gap right after the phone's screen turns off where it sleeps too long. If this is the case then this new architecture should work well. However if we can't count on our threads being run reliably when the phone's screen is off then we might need to use the power manager.
Right now the clients periodically send a keep alive message to the master and the master periodically checks if it has received a keep alive message from each client. If the master has not received a keep alive message from a client since the last check then it removes that client from the jam.
I want to try out a different architecture. In this new solution, the master periodically pings each client asynchronously. If this ping ever fails, then the client is removed from the jam. This should solve the problem seen here: https://github.com/JayThomason/Tutti/issues/201