Khaled, I’d like to start by saying that this work has the potential to be very valuable to the ecosystem, especially for those that want to use existing MQTT services like AWS IoT, thanks for the contribution! I look forward to discussing what details need to be added to make the MQTT broker totally transparent to the OCF client and ensure compatibility with managed MQTT brokers from the “big 3” western public clouds.
· There should probably be more specs for device onboarding and cloud-side handling of messages: o How does the device provisioning process differ from the current cloud spec? § Are we assuming that all local network communication still uses iotivity/coap? o How does the device determine whether it’s being setup with a coap cloud or mqtt cloud? (hopefully that could be determined from the URI) § If there are subtle differences between how to interface with MQTT brokers from different public clouds, how do you communicate that to the device? o How does the MQTT broker know to delete the topic when the user deletes the device? § I guess this is more me ensuring this is planned to be implemented rather than asking how to go about doing it o How did you want to handle bi-directional communication? § The device not only needs to know where to publish, but also where to subscribe and how to interpret the payloads · I’m not 100% clear what work needs to be done to translate MQTT messages for a OCF client o How is the device supposed to publish/expose/advertise its resources/metadata such that the resource directory can correctly respond to discovery/introspection requests? o How are you retaining the POST/GET semantics? o Will there be any modifications to the payload? If so, does this introduce any complications? I forget if iotivity uses CWT/COSE (RFC 8392/8152) · I’m interested to hear your thoughts on MQTT topic/OCF resource syntax o Ex: maybe devices should subscribe to the topics like {userID}/{deviceID}/client/{resourceName} and publish to {userID}/{deviceID}/server/{resourceName} § It seems like breaking up your topics by resource is a best practice https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices § not sure how you store the relevant metadata about the resource though (ex: what resource type is {resourceName}? How am I supposed to know that “bathroomLight” is oic.r.switch.binary instead of oic.r.light.brightness?) PS: have you evaluated aedes? Mainflux uses that as their MQTT broker and it’s my understanding it was built to replace mosca. From: iotivity-dev@lists.iotivity.org [mailto:iotivity-dev@lists.iotivity.org] On Behalf Of Khaled Elsayed Sent: Wednesday, October 17, 2018 3:54 AM To: Gregg Reynolds <d...@mobileink.com> Cc: iotivity-dev <iotivity-dev@lists.iotivity.org> Subject: Re: [dev] MQTT G/W Hi Greg and all, I attach the current design. Would appreciate your review. I have developed a node.js gateway module based on the node.js mosca MQTT broker library and iotivity-node. The flows in the simplest forms are provided in the attached PDF for handling both MQTT publisher publishing a new topic and MQTT subscriber subscribing to a new topic. It is also possible to create an MQTT topic for any OCF resource that an OCF resource owner wishes to expose to prospective MQTT subscribers. I have not done that yet. On Mon, Aug 20, 2018 at 8:45 PM, Gregg Reynolds <d...@mobileink.com<mailto:d...@mobileink.com>> wrote: On Mon, Aug 20, 2018, 1:36 PM Gregg Reynolds <d...@mobileink.com<mailto:d...@mobileink.com>> wrote: On Mon, Aug 20, 2018, 6:28 AM Khaled Elsayed <khaledi...@gmail.com<mailto:khaledi...@gmail.com>> wrote: Hi, Has anyone developed a MQTT gateway that would host a MQTT broker receiving the MQTT publish requests and creates OCF resources corresponding to the MQTT topics and handles the update of the resources data. It should not be that difficult so I am asking it is already there to avoid doing it again. If it does not exist, would it be interesting for the IoTivity community to have OCF/iotivity and MQTT inter-operability? Speaking in my delusional capacity as voice of OCF community: yes. Just one thing: if you're gonna do this please post your design ideas before you start coding in anger. Lots of ways to do it, you'll wanna get feedback as early as possible. G Gregg -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9952): https://lists.iotivity.org/g/iotivity-dev/message/9952 Mute This Topic: https://lists.iotivity.org/mt/24817907/21656 Group Owner: iotivity-dev+ow...@lists.iotivity.org Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-