technology from back to front

Archive for October, 2010

JNA wrapper for ZMQ

Zed Shaw’s Mongrel2 uses zeromq as the communication protocol between the web server and any custom handlers that you wish to write in the language of your choosing, including Clojure via a ring adapter. So off my fingers trotted installing all the dependencies for mongrel2, including zeromq, testing my mongrel2 by walking through the examples in the excellent manual. Now for the Clojure part and disaster! I built the Java JNI code for zeromq using make, I tried to use the Clojure ZMQ libraries but they were all written against an earlier version of the Java JNI code, so I stopped in frustration. It was quite easy to proceed by writing Clojure code directly against the Java JNI code I had compiled, but the control freak in me was thinking what happens if the JNI API changes again. At this point I started investigating JNA, which is meant to be an improvement over JNI – it looked like an improvement to me since it looked like I wouldn’t need to code any C or C++ or use make.
Read more…

30/10/10 API bindings in Erlang

About 6 months ago, I started to teach myself Erlang. I’ve always found it difficult to learn a new language without a decent test project to try out things with, and so I decided to add scrobbling support to our jukebox. I got pretty far, but then I got buried in other projects, and didn’t have time to work on it. However, I’ve now finally managed to get around to finishing it off and it’s now running happily, so now’s a good time to write about the things I found along the way.
Read more…

Tom Parker



You are currently browsing the LShift Ltd. blog archives for October, 2010.



2000-14 LShift Ltd, 1st Floor, Hoxton Point, 6 Rufus Street, London, N1 6PE, UK+44 (0)20 7729 7060   Contact us