There are some domains where web3 application are promising. I already explored storj solution to store data and as a user point of view, it has convinced me. Now, I’m exploring the capabilities proposed by Streamr Network. This project has started in 2017 and still improving its development roadmap. It proposed publish & subscribe solution for standard protocols like MQTT, HTTP, Websockets. By design the solution is scalable and reliable. It currently has more than 4000 online nodes. The project will also propose a marketplace where to purchase data by subscribing to flows.
This blog post will detail my experience with this project and will be updated all along my usage of it, as miner and also as user.
Since a long to time I did not post about MQTT … The main reason was I uses MQTT as a protocol to publish data directly from a device but in a centralized environment like SigFox / LoraWan you can’t use it directly on the device. Actually I have some devices communicating with a backend and the question about how to provide these information to the customers of my service are raising. To match this pattern I have to ways : providing and API where the information are pulled by the customer and MQTT where the information are pushed to the customer.
One choice is not against the other one, I had the two kind of customers. For this reason I will describe how we can implement a MQTT server (mosquitto) to push Sigfox data device as json content.
My last post was about a demonstration of what you can do in 5 minutes with MQTT. This video was part of a global MQTT presentation I’ve done for Clermont’ech APIHours.
Here is a full version of this talk in English. For French reader, the video of the talk in French will come soon as soon as Clermont’ech team will finalize it.
Slide are here : http://slides.com/disk91/mqtt#/
To prepare a presentation of MQTT for tomorrow, I just finished a MQTT / Mosquitto demonstration in a 4 minutes video. Enjoy !
I start using mosquitto in a C++ program and I think documentation could be a little bit improved by some examples. To use mosquitto, there is a mosquittopp class acting as a wrapper on top of the mosquitto lib. Basically to create your own program you have to herit from that one and it is easy then.
Mosquitto lib can be managed as a thread or directly by calling the different sub function. In my point of view the thread approach is the better as otherwize you have to manage connection / disconnection manually. Mosquitto lib is then event managed, so you can subscribe to the callback event by surcharging the existing function.
Here is an exemple for a program just needing to publish messages to a broker.
I’m interested by MQTT for two reason, the first one is related to its services and QoS management, the second by its network efficiency because I’d like to use it over a 3G communication system with a small and low cost plan.
MQTT promise is to be network efficient but, i’d like to see it with my eyes, so I’ll try to give you some measures I’ve done to confirm it. My fear is that keep alive communication for subscriber costs could be high and request some software adaptations.
See full article to get details and eventually reproduce
MQTT (MQ Telemetry Transport) is a Message Queuing system for machine to machine communications. It allows communication of mobile systems over high latency, low bandwidth and poor quality networks. It manage communications over TCP (not over Http) to optimize the size of messages and it manages different quality of services. Depending of it, messages can be dropped, received multiple times of you can have the insurance to receive the message one and only one time.
It makes this protocol really interesting for the communication between a raspberry PI and a server when this communication is event driven and the communication link looks like a Edge/3G channel.
Mosquitto is an open source implementation for MQTT.
Here are some tips on how I implemented it, for a demonstration purpose