hidaris / thingtalk

WebThings framework.
Mozilla Public License 2.0
21 stars 4 forks source link

Thing registration #2

Closed hidaris closed 3 years ago

hidaris commented 3 years ago

An external (same LAN, but different hosts, different processes on the same machine) thing should be able to register itself to the environment (network), but the environment itself does not need to know how the thing was born (started).

hspaay commented 3 years ago

Hello @hidaris. I'm struggling with the same issue in the WoST project. Asked for guidance on stackoverflow sofar only resulted in a down vote so I'm not hopeful for a resolution from that side. What standard do you intent to follow?

I'm also curious as to your thoughts on running a server on Things. I started the WoSTZone out of concern for the internet being flooded with hackable Things if they all run servers (based on the idea that writing a secure server and keeping it secure is hard so it won't happen in many cases).

I'm open to some collaboration to ensure interoperability with your work if you are interested. Cheers, Henk

hidaris commented 3 years ago

@hspaay Hi, Henk, at this stage my idea is more like building a system on top of mqtt, the LAN self-discovery follows mdns, I agree with your concerns about web server security, the reason for keeping it for now is more for ease of use (on edge devices), for now my implementation uses the webthings protocol, but I'm also considering allowing users to choose whether to use w3c wot or webthings, I'm interested in what you're doing, my project is also in the exploration stage, welcome to discuss!

hspaay commented 3 years ago

Sounds good @hidaris, I'll let you know when the WoST gateway is fully functional with discovery and directory. The plan is to be WoT compliant as far as it doesn't compromise the 'Things are not servers' objective.

I've used MQTT as a discovery mechanism in my iotdomain project. In that case all discovery information was published with the retained flag set to allow new client to instantly get up to date on available devices. That approach worked well for home scale use but ultimately doesn't scale. To improve on that it supports domains (zoning), which makes it possible to create IoT domains for pretty much any use-case. An alternative is to perform a query over mqtt and let matching services respond. That is still on the consideration list for WoST.

Currently for my WoT/WoST project I'd like to be able to use the gateway as a cloud based intermediary. No firewall ports need to be opened while it remains possible to access devices via the intermediary from the internet. The only device exposed to the internet would be the gateway. That would remove the need for Things to run a server.

I've enabled discussions on the WoST gateway repo so if you want to bounce off ideas feel free to post.

hidaris commented 3 years ago

Hi, @hspaay WoST sounds like the right direction, I find what I'm thinking of doing so far in 1.0 is very similar to what you're currently working on, I'm curious if you have plans to develop some sort of specification for topic at this level of mqtt, if so I can try to align with you from now on and eventually achieve interoperability between the two projects. I started a discussion in your repo, but you probably didn't notice it, so I'll try to reply here.

hspaay commented 3 years ago

Doh, my bad @hidaris . I indeed did not see it. I've posted a reply in the discussion and will keep an eye on it. In short I'll draft up a map between HTTP/WebSocket/MQTT to make swapping transports easy. Talk soon.

Update: The WoST gateway is renamed to Hub to remain consistent with the WoT Architecture terminology in their upcoming draft. The link to the discussion forum changed to: https://github.com/wostzone/hub/discussions