Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web service with Lisp

I'm curious about using Lisp to underpin a modern RESTful web service, but given the many variants and implementations, it's difficult to know where to begin.

I am certain that there are people out there using Lisp for web related applications (just trawling through the questions here on SO shows that) but what I would like to know is are there any Lisp implementations which are more suited to web services than others? (native unicode support for example, inbuilt web-related libraries, performance etc)

I'm not looking for unicode "hacks" or web frameworks. I'm mostly interested in what you get out of the box. I haven't aligned myself with any Lisp derivative or implementation, though I have some minor experience with Common Lisp on CLISP (a generic polynomial calculator as part of an undergraduate computer science course). It would be nice to know if there are particularly good choices for this problem, especially from those people who have actually used Lisp in this way.

like image 881
Matt Esch Avatar asked Apr 07 '12 17:04

Matt Esch


2 Answers

Racket's standard library contains a web server library. I've played with it, but felt it wasn't suited to my preferred interactive way of working with a Lisp. It does have some nice features, like continuation-based flow of control, so it's worth a look.

Speaking from personal experience, Common Lisp is a great choice for web development. It's what my blog is implemented in. Hunchentoot is simple and powerful and very Lispy. Interactive programming is supported as well as can be imagined, and there are plug-ins for things like Websockets (which I haven't needed yet, though).

That said, web programming in Clojure is just as pleasant. I've implemented a web-based community hub for my family using Clojure and Noir. Stylewise, Noir is very similar to a combination of Hunchentoot and cl-who. As a bonus, access to Java libraries can be extremely useful. (In my case, implementing OpenID login support, which would have been difficult with Common Lisp, was a breeze with Clojure.) Because of this, if your application needs to interact with third-party web services or data formats, I suggest taking a good and long look at Clojure.

REST interfaces are easy to do in Hunchentoot/Noir-style web frameworks, too. I can't judge Racket's web server in this regard, as I am not familiar enough with it.

like image 81
Matthias Benkard Avatar answered Nov 06 '22 04:11

Matthias Benkard


I know one maybe fits your need: Clack

Clack is a web application environment for Common Lisp inspired by Python's WSGI and Ruby's Rack.

Hope it helps.

like image 36
Juanito Fatas Avatar answered Nov 06 '22 03:11

Juanito Fatas