www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Looking for MQTT client library

reply "o3o" <orfeo.davia gmail.com> writes:
I'm looking a MQTT [0] client library written in D, if it exists.
Anyone know of any?

I found the great Atila Neves MQTT broker (server) [1], and some 
C/C++ libraries [2], so, possible solutions are:

a. Write a native D library from scratch
b. Adapt/copy some parts of [1] to convert from server to client
c. Create a binding from [2]

Anyone has other idea that I could use to create this
myself?

Thanks

[0]http://mqtt.org/
[1]https://github.com/atilaneves/mqtt
[2]http://www.eclipse.org/paho/clients/c/
Mar 12 2015
next sibling parent "Dicebot" <public dicebot.lv> writes:
If it isn't on http://code.dlang.org it is unlikely to exist in 
easy to use form.
Starting with C bindings is probably the easiest approach - you 
may want to check out https://github.com/jacob-carlborg/dstep if 
you haven't already.
Mar 12 2015
prev sibling parent reply "Atila Neves" <atila.neves gmail.com> writes:
Those are basically your options. You could wrap Mosquitto (a C 
implementation), but I'd just use the existing MQTT broker code. 
Then again, I would say that. :)

Atila

On Thursday, 12 March 2015 at 07:59:55 UTC, o3o wrote:
 I'm looking a MQTT [0] client library written in D, if it 
 exists.
 Anyone know of any?

 I found the great Atila Neves MQTT broker (server) [1], and 
 some C/C++ libraries [2], so, possible solutions are:

 a. Write a native D library from scratch
 b. Adapt/copy some parts of [1] to convert from server to client
 c. Create a binding from [2]

 Anyone has other idea that I could use to create this
 myself?

 Thanks

 [0]http://mqtt.org/
 [1]https://github.com/atilaneves/mqtt
 [2]http://www.eclipse.org/paho/clients/c/
Mar 12 2015
parent reply "Orfeo" <orfeo.davia gmail.com> writes:
My preferred option is b. that is convert your MQTT broker to 
MQTT client.

I'm not a MQTT expert, so, in your opinion what parts of your 
code should I change?
(i.e. message module should be the same, peraphs module stream...)

Thanks for your support

(and also for your unit-threaded project!)


On Thursday, 12 March 2015 at 15:03:13 UTC, Atila Neves wrote:
 Those are basically your options. You could wrap Mosquitto (a C 
 implementation), but I'd just use the existing MQTT broker 
 code. Then again, I would say that. :)

 Atila
Mar 12 2015
parent reply "Frank Pagliughi" <fpagliughi mindspring.com> writes:
I am writing a D wrapper for the Eclipse Paho C library. I know 
MQTT, but don't know D very well - this was an attempt for me to 
learn D a little better for a non-trivial example. It's a little 
tricky since the underlying library is multi-threaded and making 
callbacks from different threads.

I have the basics all working on Linux, but need to nail down a 
few issues of message (data) immutability. And I need to start 
testing on Windows.

Oh, and I haven't the slightest idea how to package a D library 
for distribution. Where do I learn how to do that?
Apr 10 2015
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2015-04-10 15:54, Frank Pagliughi wrote:

 Oh, and I haven't the slightest idea how to package a D library for
 distribution. Where do I learn how to do that?
I recommend using Dub [1][2]. Here is the description of the package format [3]. [1] http://code.dlang.org/download [2] https://github.com/D-Programming-Language/dub [3] http://code.dlang.org/package-format -- /Jacob Carlborg
Apr 10 2015
prev sibling parent reply "Frank Pagliughi" <fpagliughi mindspring.com> writes:
I got the OK to submit the D library to Eclipse Paho. So, 
hopefully within the next few weeks there will be a Paho 
incubator project for the D language client.
Apr 23 2015
parent reply "Orfeo" <orfeo.davia gmail.com> writes:
On Thursday, 23 April 2015 at 14:40:01 UTC, Frank Pagliughi wrote:
 I got the OK to submit the D library to Eclipse Paho. So, 
 hopefully within the next few weeks there will be a Paho 
 incubator project for the D language client.
Hi Frank, any news about your MQTT client project? Thank you
May 07 2015
parent "TC" <chalucha gmail.com> writes:
On Thursday, 7 May 2015 at 20:28:27 UTC, Orfeo wrote:
 On Thursday, 23 April 2015 at 14:40:01 UTC, Frank Pagliughi 
 wrote:
 I got the OK to submit the D library to Eclipse Paho. So, 
 hopefully within the next few weeks there will be a Paho 
 incubator project for the D language client.
Hi Frank, any news about your MQTT client project? Thank you
I needed it too so - http://forum.dlang.org/thread/isznbdlzfyvprkenakng forum.dlang.org Hope it helps and gets better with shared efforts
Jul 25 2015