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

About IOT projects architecture #579

Closed
YassineElyk opened this issue Oct 1, 2018 · 5 comments
Closed

About IOT projects architecture #579

YassineElyk opened this issue Oct 1, 2018 · 5 comments
Labels
question Any question about leshan

Comments

@YassineElyk
Copy link

Hello everyone,

I'm currently exploring the use of eclipse Kura and Leshan in IOT projects and I'm somewhat confused about the exact roles of each one of them.
Why is it that I encounter the use of both Kura and Leshan combined. Why use data transmission both with MQTT through Kura and with CoAP with Leshan. Can someone please shed some light on this?
Thank you.

@sbernard31 sbernard31 added the question Any question about leshan label Oct 2, 2018
@sbernard31
Copy link
Contributor

I don't know exactly what is kura but it seems to be a framework for Iot : https://www.eclipse.org/kura/

Leshan is a java implementation of the LWM2M 1.0 protocol.
Like Apache HttpComponents is a java implementation of HTTP protocol.

If kura framework uses LWM2M protocol, it makes sense to reuse an open source java implementation instead of rewrite it.

@YassineElyk
Copy link
Author

I realize that my question comes down to knowing how to choose between MQTT and LWM2M for a certain task because I've found many projects that use both of them. Not sure if it's an appropriate question here but if you can help me that'll be great.

@sbernard31
Copy link
Contributor

It's very hard to answer to this kind of question, but so I will rather expose some differences.

  1. LWM2M and MQTT are not really at same level. This would be more relevant to compare CoAP and MQTT. MQTT is just a communication protocol and does not define data meaning. LWM2M talk about device, location, firmware update, bootstrap devices ... This makes probably MQTT more flexible but less interoperable than LWM2M. Some time ago there was discussion about doing LWM2M over MQTT. (like there is LWM2M over CoAP+tcp in LWM2M v1.1)

  2. LWM2M is mainly designed for device management but you could use it for application management. MQTT is just a publish/subscribe protocol.

  3. In LWM2M 1.0, only CoAP is supported. This means LWM2M run over UDP(DTLS) and MQTT over TCP(TLS).

  4. Theorically using CoAP over UDP should make LWM2M more adapted to constraint environment. In real world, IF you begin to use all the available features (CoAP observe/CoAP blockwise transfer/ DTLS role exchange ...), this is maybe not so true.

  5. In LWM2M 1.0, requests are mainly sent by the server. Server send READ, WRITE. If you need to send data from device to server, this is no so adapted. You can eventually fiddle with OBSERVE but this is not so good. LWM2M 1.1 fix this "issue" by adding the SEND request (from device to server).

Talking about LWM2M 1.1.

HTH

@sbernard31
Copy link
Contributor

Could we close this issue ?

@YassineElyk
Copy link
Author

Yeah sure.

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

2 participants