Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] MQTT Objective-C Client

Hi Jeff

Thanks for the thoughtful email.

The Objective-C client in Paho is based on a contribution from 2lemetry (I've cc'd Kyle on this thread in case he isn't directly subscribed to our list yet). You can find the original code at https://github.com/m2mIO/mqttIO-objC but due to some legal restrictions we have not yet been able to bring in the necessary pieces for Xcode etc - something the Foundation is working through with Apple etc. 2lemetry themselves are long-standing members of the MQTT community and run m2m.io and other ventures so I know those guys are pretty strong on the protocol in general.

I'm aware of your client too but I confess I haven't used either yours or the new Paho one. 

In terms of roadmap, our immediate concern is getting the Java, C, _javascript_ and Python clients ready for Luna / a 1.0 release. The other clients are unlikely to get quite as much attention immediately so if you're looking to publish this year then you might want to go with what you have. You have an example... we don't (yet!).

If you're interested in contributing patches to the newly-contributed ObjC client at Paho, we'd welcome the support.

Andy



On Fri, Feb 14, 2014 at 5:59 PM, Jeff Mesnil <jmesnil@xxxxxxxxx> wrote:
Hi,

I'm interested by the Objective-C client[1] that andy committed recently.

I've browsed this mailing list archive before subscribing but I did
not find a lot of information on it.

At first glance, this looks to be a whole implementation of a MQTT
client. Is there any reason why it could not leverage the mqtt.c[2]
code instead?

Given the easy bridge between C and Objective-C, I was wondering if
you thought about wrapping the low-level C in a Objective-C library
wrapper? (I did not look in details to the mqtt.c code but I assume
it's in good shape).

Looking at it, it runs on a NSRunLoop and a delegate.
Is it planned to "modernize" the API and leverage GCD and Blocks instead?
I tend to prefer API using blocks instead of delegates especially for
event-driven code that is likely to be written to handle MQTT messages
(as an example, I also wrote a ObjC library for STOMP using GCD and
blocks[4])

One reason I could think of rewriting the whole client in Objective-C
would be persist the message for QoS 1 and 2 but I have not found such
code in the current objc client. Is it something planned?

To give some context, I am writing a book on messaging protocols for
mobile devices and Web browsers and I have several chapters on MQTT.

When I started writing the chapter about MQTT on iOS, I could not find
a good Objective-C client, so I wrote one[5] :) It's wrapping the
libmosquitto C library and is far from complete (I'm not a MQTT
expert) but it's working for simple applications[6].

The book is scheduled for this summer. Andy, do you know if there is a
roadmap for the objc client?
If there is a good Objective-C client in Paho, I would have no problem
to rewrite the iOS chapter with it as long as the lib fits in my book
schedule.

If I have a lot more remarks on the current objc code but I just
wanted some more context information on the direction of this library
in order to provide some feedback and code contribution.

cheers,
jeff

[1] http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.objc.git/
[2] http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.c.git/
[3] http://mobile-web-messaging.net
[4] https://github.com/mobile-web-messaging/StompKit/blob/master/README.md
[5] https://github.com/jmesnil/MQTTKit
[6] https://github.com/jmesnil/MQTTExample

--
Jeff Mesnil
jmesnil@xxxxxxxxx
http://jmesnil.net/weblog/
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
Andy Piper | Kingston upon Thames, London (UK)
blog: http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper

Back to the top