The whole point of Azure Functions is to take away the worry about infrastructure and provisioning of servers. However, as we live in 2017 it's fundamentally important that we are able to talk to Azure Functions over websockets.
Azure IoT Hub is a broker that supports MQTT over WebSockets. Azure Functions on the other hand supports both IoT Hub triggers and outputs. This means we could run clients that talk to Azure Functions over WebSockets (using mqtt.js or pahojs for example) by relying on IoT Hub triggers and outputs.
Unfortunately, the above can not be accomplished not only because IoT Hub does not support CORS but also because CORS support seems to be a low priority for the IoT Hub team. This is surprising considering the fact that AWS IoT has supported CORS/WebSockets since January last year.
Most importantly, this prevents Azure Functions from fulfilling it's "serverless" promise because right now the only way to talk WebSockets to Azure Functions is by running a cluster of servers for the sole purpose of brokering websocket <> http/iot connections.
We need someone from the Azure Functions team to physically head over to the IoT Hub team and explain to them that there's a whole world outside Arduino that could use CORS support.
;-)
+1, this is key to running multi platform apps with a truly serverless backend. It would be great to have an option other than AWS for this.
@christopheranderson Just checking in to hear if there are any signs of hope on the horizon?
@lindydonna @christopheranderson @davidebbo @fabiocav Would it be possible for us to get some sort of feedback on this? please don't leave us hanging in thin air there are 8 other people / customers of yours that thumbed up this issue... thanks.
Seriously, this feature would really get several developers pumped on Azure Functions
I just wanted to add my enthusiasm for this particular feature. I'd love to see it.
Same for me, websocket azure functions would be really usefull.
Adding my voice to the choir. Azure Functions can do a brilliant lightweight static webserver, but I still need traditional App Service instance to be a realtime data layer... why??
is this on the roadmap?
Yes, this is critical...I actually have hit a hard stop because of this missing in fact...
There are two different things being discussed in this issue.
As originally stated, the request was for the IOT Hub team to implement CORS support. If they do this work there are some nice new scenarios where you can use WebSockets, IOT Hub and Functions together. We reached out to the IOT Hub to draw their attention to this feedback. For those of you that are +1'ing this idea please weigh in on the uservoice issue.
Some of the comments later into the issue seem to be about directly adding WebSocket support to Azure Functions. To make sure we don't mix these two things up, I've created a separate issue to track that here:
https://github.com/Azure/Azure-Functions/issues/738
I'm going to close this issue because there is nothing more that my team can do on the IOT Hub front and we have a new issue tracking WebSockets + Functions. Please direct your feedback as appropriate to the linked issues. Thanks!
@paulbatum Thank you for the feedback. There are two reasons I opened this issue here:
It's hopeless to reach out to the IoT Hub team, my issue on github was flat out rejected, and as you can see the uservoice issue has been open since 2016.
It's still related to Azure Functions, my impression it's also in your team's interest as well for the IoT Hub team to resolve this issue. You see the feedback from everyone.
This is very much an IoT Hub issue, enabling CORS support is all it takes and it's all we're asking for. It doesn't make sense (imho) to bake in WebSocket support to a stateless service, not to mention limiting, Azure Functions already plays well with IoT Hub as it is.
Anyway, my 50 cents.
Thanks again
@1N50MN14 of course, no problem. Your reasoning was sound and the upvotes on this issue helped us demonstrate to the IOT hub team that there are multiple people interested in this scenario.
Most helpful comment
@christopheranderson Just checking in to hear if there are any signs of hope on the horizon?