-
Notifications
You must be signed in to change notification settings - Fork 181
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
feat: add locally_discovered_nodes
API
#2601
Comments
I'd consider returning a
The entry in the list should at least have the information necessary to connect to it ( |
What is the usecase for this? Mostly I'm wondering why mDNS nodes are different here than other nodes and whether this is trying to expose a very specialised sub-view of the NodeState we have. And thus whether this might be better as a more generic view into the NodeState. The property of mDNS discovered nodes in NodeState terms is probably:
I don't think we have this 2nd bit of information in the You can already approximate it by guessing based on the network, but we can both be on We already have |
From discord:
AFAIU |
Ah, thanks. I did browse discord quickly but did not find this. Anyway, good to include it in the issue.
I'm going to update the docs to make this clearer. But maybe also: should we improve the function name itself? I'm tempted to say that we should. |
Yes, that's my text.
My app is for remote connection to raspberry pi, connected to Hardware via
GPIO.
This all works already, but you have to get the nodeId from the pi and
either copy and paste somehow, or retype, into the GUI app on
Mac/Linux/windows.
I start the Pi app as a system service, so nodeId output is hidden in logs.
But I have implemented functionality to ease finding the nodeId *on the pi*.
Due to the nature and cost of RPi and IoT, it's normal to have many,
scattered around the place. For many of these it will be desirable or
difficult to have a display and keyboard on it - making nodeId retrieval
difficult, or a special task requiring moving them, connecting display and
keyboard. Not all will have VNC, and IP address of each Pi may not be
known, or may change with Pi or Router reboots
So, I desire for the UI (running on a mac/linux/windows host) to be able to see all the nodes we can connect to
in the UI, allowing the user to choose one and connect to it (hopefully without the need for additional data entry).
The provision of some meta data supplied by the client app that can then be displayed in the host UI would help selection of the correct device.
I hope that helps, if I can provide more details just mention me here.
|
Maybe we should add nodes that we discover via |
Apologies if this is rude at all, somehow github crashed on me TWICE while writing this (and I should have learned my lesson the first time) so I'm very annoyed, lol. But thank you all for the feedback.
here is the PR I referenced above: #2612 |
As per your comment re: method naming. If the notion of "session" exists, then I would use that in the method name to clarify how (since when) the list has been constructed. I thought about "online" (as in "now") but you never know do you (a node could have gone offline since discovery)? Depending on how strict you are you might not want to use that in a name "recent" maybe better. |
Hi again folks! Update: The new plan is to add a Then, you can fetch your I was also incorrect about something I mentioned before: I thought we persisted the ENTIRE node state when we persist peers between sessions. This is false, we only persist the actual addresses (right now). So any |
Ok.
What distinguishes "locally discovered nodes" from others, that we will use
to filter on?
Depending on the discovery service(s) added to endpoint, they may all be
local, right?
|
You can go through the At least I think that's how it could work. LMK if that does anything. |
there will be a source indicating which service discovered it, that you then can use |
An addr can be discovered by multiple sources, so this needs to be a set. |
Hello! With v0.26.0, you can now view the |
Add a method on the
Endpoint
that gives you a list of the nodes that have been discovered using mdns/swarm-discovery so far. If local discovery is not configured for thatEndpoint
it returns an empty list.The text was updated successfully, but these errors were encountered: