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

Websocket Support for Context Broker #1181

Open
IAIS4EP opened this issue Aug 19, 2015 · 11 comments
Open

Websocket Support for Context Broker #1181

IAIS4EP opened this issue Aug 19, 2015 · 11 comments
Labels

Comments

@IAIS4EP
Copy link

IAIS4EP commented Aug 19, 2015

Websocket Support for Context Broker:

In order to make the device and backend communication efficient it is desired by the Orion Context broker to support Websocket transport protocol.

@kzangeli kzangeli changed the title Websocket Support for Context Broker: In order to make the device and backend communication efficient it is desired by the Orion Context broker to support Websocket transport protocol. Websocket Support for Context Broker Aug 19, 2015
@fgalan fgalan added the backlog label Sep 1, 2015
@jmrobles
Copy link
Contributor

+1 (and congrats, Orion is becoming a really important piece of IoT infrastructure)

@fgalan fgalan added this to the 0.26.0 milestone Oct 29, 2015
@fgalan
Copy link
Member

fgalan commented Oct 29, 2015

CC: @fortizc

We are going to start this work in November 2015 sprint. Let's see how it goes... :)

@jmrobles
Copy link
Contributor

Olé!! 👍
Just in time! We need that feature in this moment.
Thanks!

@fortizc fortizc self-assigned this Nov 2, 2015
@fgalan
Copy link
Member

fgalan commented Nov 3, 2015

A first proof of concept will be done, based on the following encoding:

{
   "verb": "POST",
   "url": "/v2/entities",
   "headers": {
      "Fiware-Service": "myServ",
      "Fiware-ServicePath": "/test2",
      "X-Auth-Token": <...>
   },
   "payload": {
      "type": "Room",
      "id": "Bcn-Welt",
      "temperature": 21.7,
      "humidity": 60,
      "location": {
         "value": "41.3763726, 2.1864475",
         "type": "geo:point",
         "crs": "WGS84"
      }
    }
}

(Responses will be encoded in a similar way)

That way, it could be relatively easy to "link" the fields in the above JSON envelop with the current CB logic (ConnectionInfo mainly).

I would like to stress that this would be a first proof of concept. Once we achieve this step, evolutions and optimization of it would be done (anybody is welcome to suggest! please use the comments to this issue).

@fortizc
Copy link
Contributor

fortizc commented Nov 25, 2015

Add a little example of libwebsockets a server and the client

@fgalan fgalan modified the milestones: 0.26.0, 0.27.0 Nov 26, 2015
@jbheren
Copy link

jbheren commented Dec 9, 2015

+1 This is woulde me a must, actually Orion's subscription needs an external url to receive messages

It would be a must Orion had a subscribe mechanism in the way Faye makes it : a client that has internet access subscribes to a channel on the server & stays connected using a socket.

Wish you the Best

@nkittsteiner
Copy link

+1 This could be very interesting in the context of working with actuators, for instance, operating a motorized robot remotely

@fgalan
Copy link
Member

fgalan commented Jan 14, 2016

@cdupont
Copy link

cdupont commented May 16, 2017

Hello,
this looks like a very interesting/important feature. Can I ask what is the status? Thanks

@fgalan
Copy link
Member

fgalan commented May 18, 2017

Current status involves two branches:

  • feature/1181_websockets: a proof-of-concept to support websocket based subscriptions, developed time ago (around April 2016). It is not a full implementation, four sub-issues are still peding (see above list).
  • task/1181_libwebsocket_build_doc: a branch of the former with documentation bits, pending to be merged (see FIX add libwebsocket installation instructions #1823, specially the "What is pending" preamble).

Taking into account the implementation is pretty old and that CB has evolved a lot during last year, probably it doesn't make much sense to complete the sub-issues for feature/1181_websocket to merge it into master. However, it can be very useful to guide a new implementaiton in a fresh branch. That's the point with proof-of-concepts: they allow to test and learn before the definitive implementation :)

Unfortunatelly, websockets are not currently a priority for us so we are not puting effort into this at the present moment.

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

No branches or pull requests

7 participants