Hello Hashin,
On Mon, Jan 16, 2017 at 12:35 PM, Hashin Jithu <
hash...@gmail.com> wrote:
> First of all, thank you so much for the detailed reply. I am sure this is
> exactly the information I was looking for!
>
> I was playing around VerneMQ for a while and is impressed by their
> credentials (I am yet to empirically verify their claims). We actually did
> set up a system with lelylan with VerneMQ and it is working fine. It is at
> this time I stumbled upon mainflux and I am totally hooked up with the
> platform (thank you once again!). I was sceptical about a NodeJS based MQTT
> against an Erlang based one.
We did a lot of research on brokers as we felt the same... EMQ looked
promising, but turned out to be very unstable and not suitable for
production.
VerneMQ looks sharper, but I've spotted serious probelm with it that
is a deal-breaker for our set-up:
https://github.com/erlio/vernemq/issues/197
It is my opinion that this will not scale well, and we need a broker
to which we have an access and hooks to leak out messages to some
external queue (Kafka or similar) before they are published from that
particular host to other MQTT brokers to which this host is bridged
to.
VerneMQ does not allow this for the moment (neither is RabbitMQ), but
Aedes does.
>
> Also, during initial phases, we did setup a lelylan system with Mosca and I
> do know that they don't support MQTT QoS 2. And I am anticipating that we
> will need QoS 2 at some point of time. So was not sure if mainflux-mqtt will
> support QoS 2. I am afraid I posted this question before checking it out.
> For me, the gut feeling for Erlang was a bit strong and I was enquiring
> about the chances of using VerneMQ with mainflux. Hope you are clear with my
> position.
Aedes supports QoS2:
https://github.com/mcollina/aedes#clientpublishmessage-callback
I am not against supporting VerneMQ in Mainflux - they have Lua
inteface for plugins, and all one has to do is to write a small plugin
for auth forwarding, similar to what we currently did with Aedes
(there is just a few lines of code).
But I must say that I am not convinced that this is a good choice (yet) because:
- I expect NodeJS optimized Aedes to be much faster (Erlang shines in
concurrent connections due to BEAM light processes, not speed)
- Erlang deployments are more difficult tahn NodeJS
- It will be hadred for people to handle Erlang module, as NodeJS is
more current in the community
- Issue with VerneMQ scaling I was mentioning
Keep in mind that all Mainflux microservices - MQTT broker included -
are behind the NGINX reverse proxy, which will do the load balancing.
This in combination with Kubernetes should give you HA, no mather
which MQTT broker you run behind. So - Erlang clustering does not make
much sense neither - as we already have Redis in the system anyway,
and we have NGINX for HA, and so on... If there was ONLY MQTT broker
in the system - then I understand, you use Erlang to do all this jobs
(distributed mem via Mnesia, clustering, fault tolerance via OTP,
...). But since we have all these component in the system
independently of MQTT broker (Redis for distributed mem and
clustering, NGINX and Kubernetes for fault-tolerance/monitoring/HA,
...) then it does not makes to much sense to go through Erlang
deployment pains and probably obtain lower performance.
What is really missing in my opinion is good and robust Golang MQTT
broker. InfluxData stopped work on SurgeMQ
(
https://github.com/influxdata/surgemq), although it was very
promising... I guess one day Mainflux team will have to do it :).
BR,
Drasko