Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2m-iwg] MQTT <-> REST+websocket mapping

Matteo,

That sounds very cool, thanks for the update. Are you using any of the Java standards (JSRs) for REST, JSON or WebSockets, or other alternate Open Source Projects?

Regards,
Werner

On Fri, Mar 15, 2013 at 5:00 PM, <m2m-iwg-request@xxxxxxxxxxx> wrote:
Send m2m-iwg mailing list submissions to
        m2m-iwg@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://dev.eclipse.org/mailman/listinfo/m2m-iwg
or, via email, send a message with subject or body 'help' to
        m2m-iwg-request@xxxxxxxxxxx

You can reach the person managing the list at
        m2m-iwg-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of m2m-iwg digest..."


Today's Topics:

   1. MQTT <-> REST+websocket mapping (Matteo Collina)


----------------------------------------------------------------------

Message: 1
Date: Fri, 15 Mar 2013 14:53:01 +0000
From: Matteo Collina <matteo.collina@xxxxxxxxx>
To: m2m Industry Working Group <m2m-iwg@xxxxxxxxxxx>
Subject: [m2m-iwg] MQTT <-> REST+websocket mapping
Message-ID:
        <CAANuz547Wh7QUqfGqm+NLaugi9qkTHx=o3rr+uhZ20h+47FLiw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Hi Everyone,

I am working on a web adapter for MQTT, and in general to the whole
Internet of Things and M2M worlds. My preliminary work is available at:
http://qest.me/.
It seems everyone is working on this problem, however there is not a shared
effort on it, and it is time to reignite the discussion.

I am identifying the requirements for a general solution to this problem:
1) Web-tunnelling of MQTT to achieve compatibility with web apps..
2) REST interface that must enable to read and write the last message from
a topic.
3) REST interface to read the history of the messages on a topic/query.
4) No modification to MQTT and pluggable to any MQTT server.
5) Security & Access Control Systems.
6) Support for webhooks, to ease the integration in other server-side
systems.

In order to clarify more, I will expand some points.

1) The websocket tunneling issue is longstanding in this community. Some
previous attempt has been done, and there was even a proposal for routing
binary MQTT inside a websocket tunnel.
I believe that the best approach to make this work is to map MQTT to JSON
in a standard way, and then route it inside websocket & polyfills (es.
socket.io or sock.js and the like)
This will simplify implementations and diffusion.

2) While creating an interface for publishing messages is easy, the core
issue is on reading them.
For example, ActiveMQ uses a DELETE to read a message, which can timeout if
no message is published in a given period of time. This approach is not
really web-compatible, so QEST adopt a standard GET approach, exposing to
the web every published message (here you can find is my home temperature:
http://qest.me/topics/temp). Every message is stored on a Redis database.
However, exposing the last message on the web is extremely similar to the
retained message behavior. In QEST, I did assimilate the two concepts
stating that every message is retained, even on MQTT.
At the moment, I am revising this decision to be MQTT-compliant. Still, the
web behavior needs to be clear. One possible solution is to expose on the
web only retained messages, or ignore the 'retained' flag at the web level
and expose everything.

3) An History interface has to be provided. The best work done in that area
is Cosm.
However, a standard representation of message meta-data has to be defined.

5) There is much discussion on how to expose M2M and IoT to end users.
Exposing it to the web is a key point, and doing it a safe way for both
users and devices is extremely important.
In particular, both the provisioning of devices and the pairing between
users and devices must be addressed.
This will necessarily lead to a paring protocol on top of both MQTT and
HTTP, and might include an OAuth step.

Have you got some suggestions on these topics?

Cheers,

Matteo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.eclipse.org/mailman/private/m2m-iwg/attachments/20130315/f73a31eb/attachment.html>

------------------------------

_______________________________________________
m2m-iwg mailing list
m2m-iwg@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/m2m-iwg


End of m2m-iwg Digest, Vol 17, Issue 20
***************************************

Back to the top