November 30, 2004
Zeroconf

I'm making some progress on a portable Lisp Rendezvous/Zeroconf interface.

After I eventually got my Cocoa-based code to work in OpenMCL (with help from Gary Byers and the benefit of looking at some of Brendan Burns' code) , I did another version using the Core Foundation API. In the interest of portability I then wrote a UFFI wrapper around the free Howl library.

Here's an Araneida-based Zeroconf browser running on my linux machine, using SBCL:

zeroconf in lisp

To prove that there's something working behind the scenes, we publish a new service.

CL-USER> (sd:publish (make-instance 'sd:service
				    :name "Local CLiki"
				    :type "_http._tcp."
				    :port 8001))
#<SD:SERVICE name: "Local CLiki" type: "_http._tcp." domain: NIL
             host: NIL port: 8001 addresses: NIL {9C0CBD1}>

After then refreshing the page, we see our new Zeroconf-enabled CLiki:

zeroconf in lisp

Howl is not a bad library, but it does have some issues. It's not threadsafe, and its current event handling actually precludes using it from multiple threads on OS X (though it's not clear why one would use Howl in OS X since you have access to the native libraries).

Other options I've considered are switching to the cross-platform code that Apple makes available, or going the pyzeroconf route of implementing multicast DNS in Lisp (maybe Dave Roberts' resolver library would help there). They all seem to have their pros and cons (though I tend to think that doing raw multicast DNS is kind of silly).

Posted by jjwiseman at November 30, 2004 12:16 PM
Comments
Post a comment
Name:


Email Address:


URL:




Unless you answer this question, your comment will be classified as spam and will not be posted.
(I'll give you a hint: the answer is “lisp”.)

Comments:


Remember info?