skycoin / skywire-services

0 stars 4 forks source link

[WIP] Re-Implement Monitors #64

Open mrpalide opened 6 months ago

mrpalide commented 6 months ago

Fixes: #63

Changes:

How to test:

0pcom commented 5 months ago

Can you describe briefly the mechanism by which this is supposed to work?

it looks to me as though the uptime tracker is used in some way to remove dead entries for dmsg discovery.

I believe in the previous implementation, you were attempting to make transports to each of those keys in dmsg discovery with the dmsg monitor.

Both of those methods are incorrect for dmsg-discovery. The only option for dmsg may be to implement a heartbeat for dmsg discovery. In that way, the client re-registers itself and any keys may just be expired once a certain time has passed without re-registration.

One can run a dmsg client for any purpose - separately from the visor ; or even for no purpose. In that instance, there is no endpoint that can be checked externally to ensure that it is actually online, and our only concern is to have a feedback mechanism which will prevent the database of entries from expanding endlessly.

This is also the case for any long-lived dmsghttp client such as dmsgweb. There is nothing that you can check on an http client externally to see if it's online because it's supposed to interact with a server.

Unless my analysis is flawed, I suggest we drop the dmsg monitor altogether at this point.