Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Minimal implementation

Hi Marco,

it certainly is possible to do a very light-weight MQTT client with
all of the features in there.

There is also my Arduino MQTT client
(http://knolleary.net/arduino-client-for-mqtt/ - which, depending
which one you're looking at, is what the Nanode client is based on).

The main reason I haven't added QoS 1 or 2 yet is I haven't decided
how to provide proper persistence within the client; whether to use
EEPROM (which is slow and has a limited read/write cycle), or perhaps
to make use of an SD card shield if one is present.

All of the clients implementations, on whatever platform, that offer
QoS1/2 but without proper persistence only protect against network
failure - they don't protect against device failure or client crashes.
I wouldn't want to add QoS1/2 to the arduino client and fool people
into thinking it could then offer fully assured delivery of messages.

There is also an additional memory overhead in storing the in-flight
messages; they must be kept locally until the QoS flow completes.
Currently the client uses a single 256 byte buffer for all outbound
and inbound traffic - as soon as the packet is written to the network,
the buffer can be reused for the next thing. Keeping the messages
locally would obviously increase this memory footprint depending how
many in-flight messages were permitted.

Cheers,
Nick

On 26 February 2013 07:31, Marco Jansen <jansen.marco90@xxxxxxxxx> wrote:
> Hey Paho Devs!
>
> I'm doing some research on a minimal MQTT-client implementation, thinking
> about lower end MCU's. This will probably lead to a bare metal design, which
> I know is no part of the Paho-implementation at this moment.
>
> I was wondering though, what you would consider a good guideline for the
> minimal amount of memory needed by a client. This question rose since I read
> about the Nanode MQTT-client (32kB) and the recommendation in the MQTT
> webinar (256kB)
> (http://wiki.eclipse.org/images/7/7c/MQTTIntroEclipseWebinarv1.pdf)
> Now I know the Nanode client is no Full spec client (eg only QOS 0), but I
> can't hardly imagine the MQTT-options like QOS taking up >200kB.
>
> What are your thoughts?
>
> Thanks in advance!
>
> Regards,
> Marco Jansen
> Electronic engineering student
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/paho-dev
>


Back to the top