Live data from Hacker News

Running Lisp in Production

tech.grammarly.com

81–90 of 119 posts

Re: Running Lisp in Production

#81
post #68
post #45

Earlier quoted context omitted.

I vote that it's worthwhile as well. We've been using Clojure full-time at ReadyForZero for over 3 years now (for web-dev as well as other tasks), and are very happy with our choice.

Is it better than plain Java? I mean, if you have the entire Java ecosystem, is it worth it to go upstream just to work in a Lisp-like language?

Writing Java with Clojure is actually kinda fun, and macros let you abstract it away when the ceremony gets thick.

Re: Running Lisp in Production

#82
post #49

One of the things I would have liked to see on the article is how do they handle the deployment itself. Do they build an executable with build app? To they used sb-daemon? An home-grown solution using sb-posix:fork?

I don't know how they do it, but I have run several Lisp production systems. I use CCL, which has a really fast compiler. So I just load the code from source. The deployment process then becomes: git pull, quit and restart Lisp. (The ccl-init file loads the code.)

Oh cool! so from the server you stop the image that's running on the server, then restart the CCL image, and then load in the source (like starting a repl on the server and doing a "load ./start-file.lisp")? (ps sorry for the rookie questions am quite new to this and very interested).

Re: Running Lisp in Production

#83
post #82
post #49

Earlier quoted context omitted.

I don't know how they do it, but I have run several Lisp production systems. I use CCL, which has a really fast compiler. So I just load the code from source. The deployment process then becomes: git pull, quit and restart Lisp. (The ccl-init file loads the code.)

Oh cool! so from the server you stop the image that's running on the server, then restart the CCL image, and then load in the source (like starting a repl on the server and doing a "load ./start-file.lisp")? (ps sorry for the rookie questions am quite new to this and very interested).

Yes, exactly. (And no worries about rookie questions. That's how people become non-rookies.)

In my case, I run the REPL using screen so I can go back to it for debugging if I need to. But you can also run "headless", without a REPL at all if you want.

Re: Running Lisp in Production

#84

One of the things I would have liked to see on the article is how do they handle the deployment itself. Do they build an executable with build app? To they used sb-daemon? An home-grown solution using sb-posix:fork?

There's a reference to upstart in the article. We have played with demonizing SBCL (there are a couple of projects out there), but then Grammarly as a whole moved to upstart-based deployments. They are really easy to manage: basically, you just give it a normal (Lisp) script.

Something I need to get around to doing is playing with Docker and SBCL - it gives you daemonization out of the box. Have you tried that?

Re: Running Lisp in Production

#86

Apparently they use "JVM languages", JavaScript, Python, Go, Lisp and Erlang in production. I may be in the minority, but that would drive me mad. I assume they're not routinely jumping between those stacks multiple times a day, but even so is there really that much benefit that it's worth keeping track of how to do things in that many different environments?

To me: Javascript, Python, and Go aren't all that different.

You must know Javascript in this day and age given it's de facto presence on the web.

Python is my go to language, especially for mathematical analysis. I can do everything in Python that I used to need Matlab for. From my point of view, pick your favorite modern scripting language and run, the differences really are the libraries, not the languages.

I have used Go, but Go just doesn't do it for me. It doesn't offer me anything I can't get, better, in another language especially if I can choose among Python (smaller headspace), Erlang (way better concurrency) or Lisp (way better abtraction power).

Erlang is my go to language for concurrency. Once I architect it in Erlang, I probably understand the problem.

Lisp is useful when my problem requires powerful abstraction. Otherwise, it gets in the way because people can't resist using that power. Clojure has changed my opinion on this quite a bit, but I don't yet have a big project that fits in it's space quite yet.

Re: Running Lisp in Production

#88
post #64

Earlier quoted context omitted.

And in that case how do you handle the monitoring of the system?

I don't understand the question. Once it's running, it's like any other server, and you monitor it like you would any other server written in any other language.

Speculation here, but based on the context, I think the question is: Some daemon-izer solutions will monitor the daemon and e.g. restart it if it's unresponsive. How do you handle this slash how is this handled in the Common Lisp world?

Re: Running Lisp in Production

#89
post #83
post #82

Earlier quoted context omitted.

Oh cool! so from the server you stop the image that's running on the server, then restart the CCL image, and then load in the source (like starting a repl on the server and doing a "load ./start-file.lisp")? (ps sorry for the rookie questions am quite new to this and very interested).

Yes, exactly. (And no worries about rookie questions. That's how people become non-rookies.) In my case, I run the REPL using screen so I can go back to it for debugging if I need to. But you can also run "headless", without a REPL at all if you want.

How do you deal with existing connections to the Lisp service when you want to deploy?

e.g. remove from load balancer, wait up to n minutes for connections to drain?, git pull, quit, restart Lisp, re-add to load balancer. ?

Re: Running Lisp in Production

#90
Slightly off-topic, but does anybody know of a kind of "LISP Challange" set? I recently started the Matasano challenges[0] and I found them really well-suited to my style of learning (learning by doing and expanding by reading relevant material, enabled by my own internal motivation). Is there anything like that that has a relatively small set of condensed yet rich challenges that demonstrate key elements from LISPy functional programming? I read some of SICP but reading long form really puts a damper on my motivation/excitement. Also there were a lot of exercises (with a lot of overlap in concepts) so I didn't know what to do and what not to do, since I wasn't about to do every single one. Any pointers would be much appreciated!

[0] http://cryptopals.com

Post reply on HN