[squeak-dev] MQTT for Squeak?

David T. Lewis lewis at mail.msen.com
Tue Oct 25 00:59:16 UTC 2016


On Mon, Oct 24, 2016 at 10:12:42AM -0700, tim Rowledge wrote:
> Thanks Ben,
> 
> > On 23-10-2016, at 6:01 PM, Ben Coman <btc at openinworld.com> wrote:
> > [snip]
> 
> > Sven did a RabbitMQ client for Pharo, and maybe such non-gui stuff is
> > close enough to Squeak to adapt...
> > https://github.com/svenvc/docs/blob/master/neo/stamp.md
> > 
> > RabbitMQ has a MQTT adaptor...
> > https://www.rabbitmq.com/mqtt.html
> 
> More than half of what I read there went so far over my head I couldn???t even see contrails. STOMP? Multiple plugins for a system that claims to be really simple and small? Argh! Maybe if I look into the code it might make some sense.
> 
> > 
> > but this article notes some detractions depending on your use case...
> > https://scargill.wordpress.com/2015/01/02/a-world-of-mqtt-on-esp8266/
> 
> Happily my use case is about as simple as I could imagine; several devices - probably one Pi and a bunch of ESP8266 nodes - publishing some small amounts of data every 15 minutes or so, and one recipient wanting to get that data to make pretty graphs and stuff. AIUI that means having a broker in the middle.
>

If I can believe what I a reading here:

  http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Introduction

then the actual protocol is straightforward, and could be implemented in Smalltalk
directly. I have done a number of projects like that, mainly in Java but inspired
by a design that was originally done in Smalltalk. If you put it together with classes
to represent the messages that you want to read and write on the network, along with
a bunch of unit tests to convince yourself that you did it right, then the result is
simple and reliable and much better than anything you could implement with a VM plugin
or FFI to a library that somebody else wrote.

I am assuming that that the "broker" is something that you downloaded from the internet
and run on your Raspberry Pi, so that all you really need is a way for Squeak to read
and write the messages that interact with the broker.

Dave
 


More information about the Squeak-dev mailing list