ID data format and SD/RDs config for MQTT communication [message #1798557] |
Tue, 20 November 2018 12:33 |
nan zhou Messages: 8 Registered: June 2018 |
Junior Member |
|
|
Hello,
I am developing an edge gateway framework for protocol translations based on forte's multi-layer communication architecture. With regards to the MQTT layer I found that the configuration of the ID data port of communication FB should be " raw[].mqtt[tcp://ip:port, cientID, topic]", while only one SD/RD port is allowed. In my opinion, such a limitation may result in too many FB instances in an application. So, I have some suggestions:
#1. Is that the specification format "mqtt[tcp://ip:port, cientID, QOS,{user name, pwd}]" will be more efficient? In this way, we can define RES1/FB1/SD1, RES1/FB1/SD2 ... RES1/FB1/SDx as a list of topics in one MQTT communication layer for publishing while RES1/FB1/RD1 ...... RES1/FB1/RDx for subscribing. The substring in the topic name, e.g., FBx/SDx and FBx/RDx can be determined by the connected FBs and data ports of the communication FB.
#2. Is it possible to integrate a JSON serialization/deserialization layer on top of MQTT layer?
I hope that this changes would not violate any principles of forte. In facts, not so much work is required for implementing the first suggestion and I'm working on it. I would like to share the code when it's done if anyone is interested.
BTW, is there anyone has experiences on implementing a COAP communication layer in FORTE? Thanks.
Regards,
Nan Zhou
|
|
|
Re: ID data format and SD/RDs config for MQTT communication [message #1798576 is a reply to message #1798557] |
Tue, 20 November 2018 15:31 |
Martin Melik Merkumians Messages: 117 Registered: March 2016 |
Senior Member |
|
|
Hi,
to your very first question, the RAW layer only supports one SD/RD, as it takes one string of information with no further processing. This has nothing to do with the MQTT layer, as it can perfectly deal with multiple SDs/RDs.
The thing is, there are two kinds of layers, encoding layers like raw or FBDK, and transport layers like IP, MQTT, etc.
If you just have to choose a proper encoding layer, like the FBDK layer, which pre-processes the data from multiple in/outs before pushing it to the next layer, you can send multiple items via MQTT.
Ad #1: I am not completly sure if I understand your question, but if you specify a list of MQTT topics via the ID, then you also would have to send messages to all receivers via the one available event fromt the CommFB interface. This would also mean you would have to trigger an outgoing event if on one of the topics a message is received, which would break the whole idea of event-based communication for receiving stuff.
Ad #2: Sure you can, just take a look at the FBDK layer as a role model how to implement an encoding layer.
To your last question, I don't have any experience with COAP, but perhaps someone else has.
Best regards,
Martin
|
|
|
Re: ID data format and SD/RDs config for MQTT communication [message #1798597 is a reply to message #1798576] |
Tue, 20 November 2018 20:46 |
|
Hello,
we decided to implement the raw layer very limited to make its implementation very easy and we could get first results. I agree that for bigger applications this leads to many FBs and therefore other layers with different encapsulations may be needed.
4diac FORTE however has a very flexible communication architecture and you can add here your own layers on top of MQTT which would provide different kind of data encapsulation. Please have a look in our documentation in the development section. There an overview of the communication architecture is given.
I know that there was some work on a Jason layer. You can find information about it in the forum. However I don't know the status of it.
BR,
Alois
|
|
|
|
Powered by
FUDForum. Page generated in 0.01848 seconds