Skip to content

Carlos Rodrigues Posts

MQTT – The defacto IoT protocol – MQTT series #1

Welcome to the first of a series of MQTT-related articles. In this series, we’ll cover different aspects of the MQTT protocol, from its low-level protocol specification to the deployment of an MQTT broker, from simple to more advanced scenarios.

If you’re starting with MQTT or want to learn more about this protocol, you have come to the right place.

In this first article, we’ll cover the protocol basics and why it is so relevant for IoT communication.

SEQUELIZE AND TYPESCRIPT

As many .NET developers transitioning to the world of Node, I started looking for an ORM. After some research, I found sequelize which seems widely adopted by the community.

I’m using typescript, and I quickly found the way to define the model with sequelize a bit too verbose, and especially a duplication of the typescript class.

That’s when I discovered sequelize-typescript, which provides this bridge, and leverages typescript’s typings, so mapping can be transparent if so we wish. All it takes is to extend a base Model class, and some annotations.