Which external AMQP-client-library for IoT Hub integration? - azure

I want to connect to the Microsoft Azure IoT Hub with Java to implement a device-gateway with some kind of identity translation. As I don't want to use the proprietary Azure SDK, I'm looking for a suitable AMQP-client-library.
I made first steps with the very high-level Vert.X AMQP client and was able to connect to the IoT Hub with SASL and exchange messages. But as a per-device-authentication is required, I came to the libraries limits fast, as sessions and links are not supported.
There are other AMQP-client-libraries like the parent-library of the Vert.X AMQP Client, Vert.X Proton, and of course the most detailed AMQP-client-implementations Apache Qpid Proton-J and Qpid JMS.
The question which arises now is which library too choose for my usecase? Currently I can't answer it myself satisfactorily, as the available online-resources (documentation and examples) to these libaries itself and the external AMQP-integration to the IoT Hub with other libraries then the Azure SDK are very rare. Apache Qpid seems to be the most powerful but also the most complex one. Vert.X Proton as an easier to use wrapper also supports sessions and links, but probably still doesn't support all required AMQP-features to connect to a IoT hub? It's hard to get an overview on the requirements.

The Azure IoT SDKs are fully open source under MIT license, so not proprietary per se. The Java SDK depends on Apache qpid Proton J and adds a light convinience layer to abstract the protocol itself. Allowing you to take full advantage of all the Azure IoT Hub features. I'm genuinely curious why you would prefer not to use an open source SDK that is supposed to make your life easier. Also curious to why you prefer AMQP rather than MQTT. Once again these are purely genuine questions as I am trying to understand better our developers needs and wants.
Also in case you have not found it there is a doc that explains how IoT Hub uses AMQP here: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-amqp-support

Related

Kafka vs SignalR

I am a little bit confused on the roles played by Kafka and SignalR with regards to real time communication. Can somebody help me by providing insights whether Kafka can be used as a like to like replacement for SignalR or are they complementary?
Thanks and Regards,
Nagarajan B P
SignalR is a library that simplifies the process of adding real-time web functionality to applications using WebSockets.
Kafka is an open source software which provides a framework for storing, reading and analysing streaming data.
You can use both if you want, using kafka as the entry point for events, and SignalR to notify web/mobile apps in real time.
Kafka aims to provide streaming data between many different programs. SignalR aims to provide real time communication between a client and server. So if you have a web app, thanks to cross scripting prevention, that page can only talk to its own server. But if you have many of your own custom services that don't all need to go through one point, Kafka would be more appropriate.

Azure ServiceBus vs ServiceRemoting, HTTP and WCF

The documentation of Service Fabric recommends service remoting, ICommunicationClient or WcfCommunicationClient to realize the communication between the micro services.
The ServiceBus, which I always used for inter-service communication, is not even mentioned. Why?
I think you misinterpreted the docs. It does not recommend any protocol or service (the word is not even present on the page). What it does do is list the built-in communication options and appropriate situations of when to use them.
There is nothing that prevent you from using service bus for inter service communications. In fact, if you google around you will find some projects like this one
The ability to plug in any desired service or protocol is one of the great things about SF, but they leave the implementation to you.
There are many approaches to do service to service communication, if they had to document all of then, they would spend more time writing the possible approaches than doing the actual communication.
They probably decided for the one with closest relation to the platform, but they could write about any possible, it is just a matter o preference.
I could name a few from many just to have an idea:
Http
Remoting
WCF
Service Bus
Event Hub
AMQP
MQTT
gRPC + protobuf
TCP
UDP
Pipes
And many more, Imagine if they had to document all of then.
The communication is flexible enough to let you implement using any communication mechanism.
Regarding the ones you mentioned,
I always opt for HTTP for being platform agnostic and widely implemented on most platforms, does not matter if is .Net, Java, NodeJs, Windows or Linux, they all talk the same language, the others are very tight to the .Net and Windows platform and force every other solution to be also tighten or adapted to then. And also there is the fact of some being synchronous and other asynchronous like Service bus.
Then, when performance is an issue, I evaluate the other options.

What is the best way to consume aws-iot services through MQTT protocol on Xamarin.Android and Xamarin.iOS?

I googled around this topic and found I need to use M2MQTT(https://m2mqtt.wordpress.com/m2mqtt-and-amazon-aws-iot/) from this thread https://forums.aws.amazon.com/thread.jspa?messageID=759987
From this blog https://m2mqtt.wordpress.com/m2mqtt-and-amazon-aws-iot/ I understand that M2MQTT is not capable updating the AWS Shadows(http://docs.aws.amazon.com/iot/latest/developerguide/iot-thing-shadows.html), which is heart of my iot application, So this is not suitable for us. Is there any alternative to integrate AWS IOT through MQTT in Xamarin.Android and Xamarin.iOS?
M2MQTT does support updating the shadows - this is simply done with standard MQTT messages so doesn't need particular client support. See https://docs.aws.amazon.com/iot/latest/developerguide/using-device-shadows.html for details.
(The link you give just says this wasn't included in the linked sample app, not that it wasn't supported).

Netflix tools in NodeJS for micro services

Is there service discovery (eureka), circuit breaker pattern (Hystrix), client side load-balancing (ribbon) and api gateway (Zuul) implementation available on NodeJS? I see nice integration of these components in Spring framework for Java but is anything such that available in NodeJS?
Netflix has provided an alternative way for non JVM languages through Prana (https://github.com/Netflix/Prana) but it is not actively supported. Is there any alternative suite of production ready components available for NodeJS? Ideally one of the benefit of micro services is each service can be developed in different language. Are there any good option available or should I implement myself?

Spring Integration: inbound and outbound adapters to MQTT

I'm trying to build MQTT support into my Spring application. For this I'm looking at the references provided by Spring, which can be found here here.
They provide sample code for inbound and outbound channel adapters, but this concept of adapters is unclear to me. I couldn't find a lot of information about it on the web.
What exactly are these adapters and why are they needed?
Where do I need to define these adapters and how do I access them?
I'm using eclipse as my IDE and maven as my buildtool.
The adapters are a concept from Spring Integration which is yet another Spring project that provides an implementation of the Enterprise Integration Patterns and provides an abstraction layer that standardizes the way you integrate with external system, whether they are based on JMS, FTP or as in your case MQTT.
As with so many other Spring projects, the driver behind it is a loose coupling and standardization that will enable you to swap your channel provider (e.g. if its a JMS provider swap RabbitMQ with ActiveMQ or vice-versa) with a minimal impact to the rest of you code.
Its comparable to Apache Camel, in case your more familiar with it, and this comparison is quite an interesting read

Resources