Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for MQTT instead of COAP in LWM2M 1.1 (as we don't have LWM2M 1.2) #1236

Open
Frendzel opened this issue Apr 14, 2022 · 7 comments
Open
Labels
question Any question about leshan

Comments

@Frendzel
Copy link

Hi guys, as we're considering approaches to use MQTT instead of COAP and we do not have support for LWM2M 1.2 we would like to ask about some potential places that could be extended in the code to replace some COAP connectors and add MQTT. What do you think guys? We were asking about mixing COAP with MQTT in the californium project: eclipse-californium/californium#1974
But we would like to consider replacing COAP with MQTT instead of mixing it.

@boaks
Copy link

boaks commented Apr 14, 2022 via email

@Frendzel
Copy link
Author

Hi yes @boaks,
but please be aware that this time I was asking about basically replacing COAP via MQTT instead of doing it on top of COAP. What do you think about it? Still changes in Californium would be the best?

@boaks
Copy link

boaks commented Apr 14, 2022

I was aware of that difference, to use MQTT direct without coap-mapping.

What "works best" is hard to foresee. I lost somehow a couple of years ago the track to LwM2M.
I would basically go the way, which is specified in LwM2M. Not sure, which one LwM2M specifies.
That doesn't mean, it will be a easy way. In some case the reality will bite back, and you will see, if it's good or bad.
It also doesn't mean, that an open source project is already prepared for that. Maybe, you need to contribute much more, than you expect.

@sbernard31
Copy link
Contributor

We don't plan to add support of MQTT in Leshan 2.0.0 because we target LWM2M 1.1 for this version (see #1235)

But I have plan about doing a massive refactoring to abstract the transport layer in Leshan (probably a not so easy task 🤯 ...) :

If I succeed,

At mid term, this should be the base to provide some kind of experimental new transport binding (maybe TCP or some NIDD transport) or new CoAP binding (some kind of POC not based on californium, but for now AFIAK californium seems to be the best choice for CoAP in java world) for Leshan 2.0.0.

At long term, this should also be as base for MQTT transport binding probably in some kind of Leshan 3.0.0 targeting LWM2M 1.2.

But you could eventually use this API to experiment this transport layer abstraction with MQTT sooner (I mean before we start to works on leshan 3.0.0), this will probably help to define a better abstraction and maybe if decide to contribute your work this could eventually be used as base for MQTT support in Leshan 3.0.0 ?

@sbernard31 sbernard31 added the question Any question about leshan label Apr 19, 2022
@sbernard31
Copy link
Contributor

@Frendzel do you test #1220 ? just to know if you managed to make something with it and so if the abstraction goes in the right direction ?

@sbernard31
Copy link
Contributor

@Frendzel I have a cleaner abstraction than #1220 for server side at #1318 , if you try to implement a LwM2mServerEndpointsProvider based on MQTT pretty much like described in LWM2M-v1.2@transport§8.0.8-MQTT Transport Binding, let me known. 🙏

@sbernard31
Copy link
Contributor

first version of transport layer abstraction is now in master, See #1025 (comment) for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Any question about leshan
Projects
None yet
Development

No branches or pull requests

3 participants