www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Vibe-d MQTT client library

reply "TC" <chalucha gmail.com> writes:
I wanted to announce the first tagged version[0] of native D MQTT 
client library for vibe-d.

It's just the first release so there are features missing, but 
hopefully with community help, they will be there soon.

It's tested against RabbitMQ[1] message broker.

I wanted it to be as lightweight as possible, so it has no other 
direct dependencies but vibe-d.

There are already mqttd broker implementation by Atila Nevens[2] 
and his cerealed serializer I know of. Actually they were both 
helpfull resources - so thanks for that.

Main differences are:
- messages are structs not classes - avoid GC as much as possible
- focus on the client side
- serialization is done simply, just to work with defined 
messages (not as a generic serialization) with range interfaces - 
speed is on par with msgpack-d[3]
- hopefully clean easily understandable code with a lot of 
comments in it to make it easier for contributors
- supports the latest MQTT protocol - 3.1.1

I still consider myself as a D rookie, so there are surely places 
which can be done better, more D idiomatic way. You are welcome 
to point me to them or even create pull requests.

[0] http://code.dlang.org/packages/vibe-mqtt
[1] https://www.rabbitmq.com/
[2] http://code.dlang.org/packages/mqtt
[3] https://github.com/msgpack/msgpack-d
Jul 25 2015
parent reply "Martin Nowak" <code dawg.eu> writes:
On Saturday, 25 July 2015 at 15:23:48 UTC, TC wrote:
 It's tested against RabbitMQ[1] message broker.
You also intend to work on a direct AMQP implementation?
Jul 25 2015
parent reply "TC" <chalucha gmail.com> writes:
On Saturday, 25 July 2015 at 17:46:23 UTC, Martin Nowak wrote:
 On Saturday, 25 July 2015 at 15:23:48 UTC, TC wrote:
 It's tested against RabbitMQ[1] message broker.
You also intend to work on a direct AMQP implementation?
It would be nice to have too, but according to specs[0], it seems to bee a lot of effort to make in comparison to MQTT. Maybe STOMP[1] protocol can be interesting too, but it's even simpler.. Btw what version of AMQP will be preferred? I guess 1.0, but it's totally different to 0.9.1 which RabbitMQ mainly uses. I can read through specs to at least see how hard it is, I can imagine doing the packets serializations/deserializations (it's not hard, but takes time to write packet structures and proper unit tests), but for now I'm just learning vibe-d and don't feel too confident in it to write protocol that complex - but with shared efforts it can be done ;-) [0] http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-complete-v1.0.pdf [1] https://stomp.github.io/stomp-specification-1.2.html
Jul 25 2015
parent "Martin Nowak" <code dawg.eu> writes:
On Saturday, 25 July 2015 at 18:51:14 UTC, TC wrote:
 but for now I'm just learning vibe-d and don't feel too 
 confident in it to write protocol that complex - but with 
 shared efforts it can be done ;-)
I need such a lib for a project of mine. My original plan was to first write an io lib, that would be compatible with synchronous usage and vibe.d. I'll get in contact with you when I start to work on this. Maybe someone already worked on this?
Jul 26 2015