Skip to content

Add mDNS support for Robustness. #48

@notthetup

Description

@notthetup

During the last NodeBoats workshops at JSConf.Asia, I realised that backhaul from the router to the SparkCloud was super critical and if SparkCore couldn't connect to the SparkCloud, for whatever reasons (flaky connection, too many simultaneous requests, etc), there was no way to connect to the SparkCore.

This was ironic since the SparkCore is actually connected to the same router as the controller, and we just need the SparkCloud to know the IP address of the SparkCore. Asking some friends, I realised that mDNS solves this exact issue using multicast.

So I spent today prototyping to see if this would work. As long as the multiple SparkCores on the same network broadcast a unique hostname, it seems to work quite robustly. I used this node mdns implementation which is really straightforward.

Would such a mechanism help to reduce reliance on backhaul and SparkCloud? If it makes sense, I can clean up my prototype implementation and raise a PR. Also I would love to know if there are other ways to get around this solution which we can explore.

P.S. This will also need a corresponding change in voodoospark to be able to optionally get the IP Address from mDNS instead of SparkCloud. There exists a library which does mDNS on the SparkCore, we will need to integrate it into the voodoospark firmware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions