Hi Marc,
first of all thanks for starting the discussion even drawing those useful pictures for showing the scenarios :-)
I think that we are more or less on the same page in terms of patterns and in terms of problems we have to address (ordering, scalability and so on).
Few other thoughts ... but nothing new for now.
I think that finally we have different use cases :
1. a command
that can be sent only if the device is online otherwise the application should not be able to do that. The "direct messaging" fits well here but then a couple of sub-cases
can happen:
- the command doesn't have a "real" result but it's enough for the device just accepting it and giving the feedback to the business application about that. Using "direct messaging" at AMQP level it could mean that just an ACCEPTED disposition could be enough
- the command has a result that the device could provide immediately or later (it depends if the command needs a long or short running). In this case an ACCEPTED disposition isn't enough and a reply path is needed for the application to get the result (as
Dejan mentioned)
2. a command that can be sent even if the device is offline. The "store and forward" fits well in this case where the message is put into a queue but with a TTL. Even in this case I can see the above sub-cases but with a difference : if the command doesn't
have a result, the ACCEPTED disposition isn't enough (because it will be something for the broker and not for the final application), so in any case a reply address/queue is needed (as the above 2nd sub-cases).
We should try to factor out a common/shared way for addressing both scenarios (i.e. maybe just having always a reply address/queue and not relying on the simple ACCEPTD disposition even
if it's enough in 1.1.
Regarding Jens suggestion, it sounds to me like the "retain" / "last well known" message provided by the MQTT protocol out of box. In my mind it doesn't fall into the "command & control" pattern but more in the "notification" one : the service can push notifications
to devices but it's not sending a command for having them doing "something". Having the last notification for a new client can be useful. In this case the service doesn't want really a reply/result but maybe or maybe not just an ack on delivery.
Thanks,
Paolo.
From: hono-dev-bounces@xxxxxxxxxxx <hono-dev-bounces@xxxxxxxxxxx> on behalf of Jens Reimann <jreimann@xxxxxxxxxx>
Sent: Thursday, February 15, 2018 9:47 AM
To: hono developer discussions
Subject: Re: [hono-dev] Command and control
I wouldn't see this as a shadow or twin. Of course this can be used to implement shadows/twins. And I agree, this can be a fine line between both sides.
But I would see this more like a communication pattern supported by Hono in a native way. More like a setpoint.
Hono provides support for MQTT and HTTP. And I think this pattern would have an impact on both. Simple with MQTT, not so simple with HTTP. Unless maybe using HTTP/2 or websockets.
|