<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br>Took a while to get back to this. Happened so far:<br><br>I gave up on zeromq, since the sub client kept crashing every time.<br>Rabbitmq/stomp examples worked over a public server with a guest user, so I set up a server of my own. Once a basic pub-sub messaging in place, I created a simple message handler, that can recognize racket expressions<br>and evaluate them (or do what ever). I even got it to evaluate liitin<br>expressions.<br><br>I got really excited, since having thought about it a bit further, not<br>only is it suitable for device or other service control, but one could<br>even make it a generic way for messaging between liitin accounts. For example, since each liitin account has a protected namespace, this kind of messaging allows creating "pull-requests" to update liitin objects across namespaces. You can accept them either manually or automatically based on your message handler.<br><br>But I'm only starting to get familiar with rabbitmq and stomp, and to<br>achieve what I want, I need a full control of both client and server<br>sides. I planning to use racket also for creating the needed server-side<br>shell commands dynamically, and mix them with higher-level functionality.<br><br>Now I'm stuck. As mentioned earlier, everything works nicely with the<br>built-in "guest" user, but once trying to create a "messaging channel" for<br>a new liitin account (user/device/service) I'm obviously missing something.<br><br>I use the following shell commands on the server side:<br><br>rabbitmqctl add_vhost /device5<br>rabbitmqctl add_user user device5 password<br>rabbitmqctl set_permissions -p /device5 ".*" ".*" ".*"<br><br>And based on the racket/stomp pub example,<br><a href="http://planet.racket-lang.org/package-source/tonyg/stomp.plt/2/1/planet-docs/manual/index.html" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="0">http://planet.racket-lang.org/package-source/tonyg/stomp.plt/2/1/planet-docs/manual/index.html</a><br>chapter 2.2<br>... I send a message (no error).<br><br><br>But based on the sub example (chapter 2.3), when I try to receive it, a plain "error" is signaled highlighting<br>"stomp-next-message s "my-subscription"<br><br>I'm propably missing a level or two on top of the vhost, or the subscription definition on the client side is somehow invalid.<br><br>Any idea what I'm doing wrong?<br><br>Br, jukka<br><br><br><br></span><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">On 18.11.2013, at 20.42, Jukka Tuominen <<a href="mailto:jukka.tuominen@finndesign.fi" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="4">jukka.tuominen@finndesign.fi</a>></span></font></blockquote><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">wrote:<br></span><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Hi Tony,<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">On 18.11.2013, at 16.13, Tony Garnock-Jones <<a href="mailto:tonyg@ccs.neu.edu" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="6">tonyg@ccs.neu.edu</a>> wrote:<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Hi Jukka,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">On 2013-11-16 1:48 AM, Jukka Tuominen wrote:<br></span></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">I was happy to hear about the package Marketplace [...], and I wonder<br></span></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">if it could be used as a starting point?</span></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Marketplace is still in flux. It could be useful as a way of forcing<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">yourself to really *commit* to the idea of pub/sub-all-the-way-down ;-)<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">but it might not be the best choice to build a production system on top<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">just yet.</span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Ok, good to know. As far as I can see, an off-the-shelf pub-sub system</span></font></blockquote><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">is propably enough for this purpose, and I'm not really planning on<br>studying the pub-sub itself, but rather how to utilize it.<br></span><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">I'd very much like to choose a system that is robust and can scale up,</span></font></blockquote><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">eventhough at this phase and in my hands, a p-o-c is the level that I'm<br>targetting.<br></span><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Marketplace was inspired by, and can be seen as a generalization of,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">ordinary pub/sub and queueing middleware like STOMP servers and RabbitMQ.<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Another option is to choose some generic open-source pub-sub server,<br></span></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">and make the user and device ends speak racket.</span></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">I suggest looking into the STOMP protocol support for RabbitMQ. I wrote<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">a Racket STOMP client [1, 2] a while back that might do what you need.</span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">I'll look into those, thanks!<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">One of the things I've been meaning to do is write a simple *server* in<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Racket to go along with it, but for now using RabbitMQ or similar is<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">probably a good bet.</span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">I'm hoping to have the environment ready to use for a basic user, and</span></font></blockquote><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">familiar for a developer as if dealing with any software objects. I have<br>a clear picture in my mind...<br></span><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">(Regarding Arduino: RabbitMQ also has experimental UDP support [3] which<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">might be of interest in this connection.)</span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Sounds very good! So far, I try to restrain myself from moving to even</span></font></blockquote><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">more foreign terrain until I get the architecture easy enough for me and<br>others to use.<br></span><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Br, jukka<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Regards,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Tony<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">[1] <a href="http://planet.racket-lang.org/display.ss?package=stomp.plt&owner=tonyg" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="8">http://planet.racket-lang.org/display.ss?package=stomp.plt&owner=tonyg</a><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">[2]<a href="https://github.com/tonyg/racket-stomp" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="9">https://github.com/tonyg/racket-stomp</a><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">[3] <a href="https://github.com/tonyg/udp-exchange" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="10">https://github.com/tonyg/udp-exchange</a></span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">____________________<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">Racket Users list:<br></span></font></blockquote><blockquote type="cite"><a href="http://lists.racket-lang.org/users" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="11" style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font color="#000000">http://lists.racket-lang.org/users</font></a></blockquote><br></div></body></html>