Thread overview
Eclipse Paho D Library (finally) started
Aug 31, 2016
Frank Pagliughi
Aug 31, 2016
Chris Wright
Aug 31, 2016
Frank Pagliughi
Aug 31, 2016
Jacob Carlborg
Aug 31, 2016
Atila Neves
Aug 31, 2016
Frank Pagliughi
August 31, 2016
Hey All,

First, my apologies. Over a year ago I had promised to put up a D library for MQTT, but a number of factors conspired against me in the intervening time.

But this week, I finally got an initial version loaded. It will be a part of the Eclipse Paho libraries for MQTT, and an official 1.0 release should come about this fall.

The first release will be a wrapper around the Paho C library, and thus should be protocol compliant and fairly feature-complete at the offset. It also follows the Java and C++ API's pretty closely, so should make it easy for people to jump around between languages.

The repository is here:

https://github.com/eclipse/paho.mqtt.d

I'm still quite a D novice, so any help, hints, tips, or bug reports would be appreciated.

Thanks,
Frank Pagliughi
August 31, 2016
On Wed, 31 Aug 2016 14:14:36 +0000, Frank Pagliughi wrote:
> Over a year ago I had promised to put up a D
> library for MQTT, but a number of factors conspired against me in the
> intervening time.

This would be a perfect time to mention what MQTT is.
August 31, 2016
On 2016-08-31 16:14, Frank Pagliughi wrote:
> Hey All,
>
> First, my apologies. Over a year ago I had promised to put up a D
> library for MQTT, but a number of factors conspired against me in the
> intervening time.
>
> But this week, I finally got an initial version loaded. It will be a
> part of the Eclipse Paho libraries for MQTT, and an official 1.0 release
> should come about this fall.
>
> The first release will be a wrapper around the Paho C library, and thus
> should be protocol compliant and fairly feature-complete at the offset.
> It also follows the Java and C++ API's pretty closely, so should make it
> easy for people to jump around between languages.
>
> The repository is here:
>
> https://github.com/eclipse/paho.mqtt.d
>
> I'm still quite a D novice, so any help, hints, tips, or bug reports
> would be appreciated.

I would be nice to have something that is vibe.d compatible.

-- 
/Jacob Carlborg
August 31, 2016
On Wednesday, 31 August 2016 at 14:24:17 UTC, Chris Wright wrote:
> This would be a perfect time to mention what MQTT is.

Ha. Yes.

MQTT (Message Queue Telemetry Transport) is a broker-based publish/subscribe messaging system for IoT devices. It's a fairly light weight protocol that sits on top of TCP and makes provisions for systems that have unreliable connections.

So, basically, it's for small devices out in the real world that collect data and want to send that data back home to a cloud server.

It originated out of IBM more than a decade ago, and some of their code was donated to Eclipse and found a home under the "Paho" project. Since then Eclipse has started to gather a large number of IoT projects for both device-side data collection and for server-side analytics.
http://iot.eclipse.org/projects

An MQTT client could be a device that is gathering and publishing data, or it could be a server application that is subscribing to that data, aggregating, analyzing, or storing it. I figured that D would work pretty well on either side of that.
August 31, 2016
On Wednesday, 31 August 2016 at 14:14:36 UTC, Frank Pagliughi wrote:
> Hey All,
>
> First, my apologies. Over a year ago I had promised to put up a D library for MQTT, but a number of factors conspired against me in the intervening time.
>
> [...]

Are you aware of this?

https://github.com/atilaneves/mqtt

Atila
August 31, 2016
On Wednesday, 31 August 2016 at 18:06:07 UTC, Atila Neves wrote:
> Are you aware of this?
> https://github.com/atilaneves/mqtt

I had a vague idea of one or two similar projects underway. But 90% of the code I just posted was written in early 2015. The initial delay getting it published was with the Eclipse legal process which dragged on for a few months, and just as it was done, they decided to move their development to GitHub. By that time I wasn't doing anything with D or MQTT, and the inertia died.

The idea from the beginning was do a fairly quick/simple wrapper library around the Paho C library, which would get the D version feature-complete and fully compliant in short time. Then the idea was to move on to a full D implementation for version 2.0. If there were any interest.

So this version doesn't do any of its own I/O; that's left to the C layer. Thus it doesn't require - and I'm not sure how it could be made compatible with - vibe.d

And originally I believe the Eclipse folks had wanted to keep external libraries to a minimum, but now exceptions to the rule seem to be the norm. So using vibe.d would probably be fine, assuming no license issues.