Azure-sdk-for-go: Please add an azure-iot-sdk-go client iothub SDK

Created on 18 Apr 2020  路  8Comments  路  Source: Azure/azure-sdk-for-go

Why is there no azure-iot-sdk for go? There are ones for C, Python, Node.js, Java, and .NET, but no go. On the management side there is this project (azure-sdk-for-go), but it doesn't do any of the client side things you'd want on a edge device talking to IoT Hub. Sure, I can cgo the azure-iot-sdk-c SDK, but that introduces a whole host of headaches for the average go developer, especially the part where go's cross compiling from any platform to any platform is disabled when you use cgo to bring in C libraries.

There are a handful of projects that have started to implement IoT Hub support, the most complete being https://github.com/amenzhinsky/iothub ... which is mostly complete (D2C, C2D, twin state, and direct messages), but only over MQTT with private keys or X.509, and just recently added MQTT over WebSockets. No AMQP, no HTTP, and no retry logic.

The one that I'm really wishing for at the moment is a DPS client SDK for go, but it looks like I'll end up writing one.

Client Track2 customer-reported feature-request

Most helpful comment

I'm following up on this however I can't commit to anything at present.

All 8 comments

Hi @shaunco thanks for this issue.
This repo only contains those SDK that are generated from their corresponding swaggers (you can find the swaggers here)
Currently we do have a package of iothub here and here

As for the SDK you mentioned to have other languages but not golang, could you provide a link to one of the SDKs? While I think they should be data-plane SDKs without a swagger. This kind of SDK is manually written by the corresponding service team, not auto-generated as the SDKs in this repo.

The two iothub packages you pointed to are for iothub management, not iothub edge devices (MQTT/AMQP, D2C, C2D, twin state, direct messages, etc). Same as azure-iot-sdk-c, but for go.

I originally asked this question in the azure-iot-sdk-c project, as azure-iot-sdks points to the c, python, node.js, java, and .net projects, and the azure-iot-sdk-c folks directed me here.

Well, but this repo will only receive the auto-generated go SDK from the corresponding swaggers, therefore you cannot find those data-plane SDKs here...

Usually these kind of SDKs are manually written from a specific SDK team of that service, therefore could you please confirm this with them (whether the SDK is hand-written or not, and whether there will be golang support)? This question is out of this repo's scope now.

As I stated previously, I originally asked this question in the azure-iot-sdk-c project (which is the SDK of the team of that service). They directed me here, see: azure-iot-sdk-c issue #1512

Perhaps @ericwol-msft and @ArcturusZhang can work out, inside of MSFT, who should make an Azure IoT Hub golang SDK?

Hi @jhendrixMSFT is the iot-hub SDK in the plan of track 2? Since it should be a data-plane SDK

I'm following up on this however I can't commit to anything at present.

It is quite strange that Go lang support for IoT device client SDK is not higher priority. Given that it easily compiles to any architecture it should be near the top. Until .Net does actual AOT Go makes a lot of sense, lot more than .Net for IoT which does not support as many CPU architectures.

This lack of support is causing us to implement less Azure services than we would. We are rolling our own server side solutions and connecting with Go, as it is faster than integrating with client side SDKs that are available.

Please vote for this feature here: "Offer Go as a language for Azure IoT SDK" https://feedback.azure.com/forums/321918-azure-iot-hub-dps-sdks/suggestions/32822650-go-sdk-for-azure-iot

Was this page helpful?
0 / 5 - 0 ratings