Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectivity Service #130

Open
rodvar opened this issue Dec 19, 2024 · 4 comments
Open

Connectivity Service #130

rodvar opened this issue Dec 19, 2024 · 4 comments
Assignees

Comments

@rodvar
Copy link
Collaborator

rodvar commented Dec 19, 2024

the goal is to have a ConnectivityService that that:

  • allows to verify trusted node connectivity (for xClients)
  • allows to verify P2P connectivity (for androidNode)
  • allows the rest of the app components to subscribe to get notified about connectivity events (e.g.: CONNECTED, SLOW, DISCONNECTED)

For the trusted node scenario some sort of ping/pong or ACK protocol might need to be implemented

@HenrikJannsen
Copy link
Contributor

For the node we have the NetworkService which provides the number of connections and if that would go to 0, its an indication that there is a network problem.

For the clients the webservice would act as connection check, if we get a disconnect there we know we have issues.

@rodvar
Copy link
Collaborator Author

rodvar commented Feb 8, 2025

For the node we have the NetworkService which provides the number of connections and if that would go to 0, its an indication that there is a network problem.

For the clients the webservice would act as connection check, if we get a disconnect there we know we have issues.

Thanks for the comment Henrik, yes this PR considers the webservice connection. I still have the implementation for node pending, your comment is helful to get that finish fast. Is there any way of knowing if the connection is "slow" ? In other words, can we consider the connection to be "slow" if the connection is a single one?

@HenrikJannsen
Copy link
Contributor

We can measure the round trip time when doing a request to give an idea about the connection speed.

@rodvar
Copy link
Collaborator Author

rodvar commented Feb 8, 2025

We can measure the round trip time when doing a request to give an idea about the connection speed.

yep excellent, is that already in or needs impl? Should I implement some sort of ping/pong same as the trusted node then?
the other option I can think of is to have an in-memory average trip time that gets updated on every comm on the mobile.

If we go that way we don't even need the ping/pong requests (though is a good practice to implement for WS in mobile given the OS might kill the connection after 30-60 secs of inactivity).

I would go for the ping/pong for the xClients and for the node we can use the measuring option if its complicated to add something like a ping/pong (at probably doesn't make sense either in p2p)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants