Why Lisp?
paragent.com
paragent.com
I enjoy working in lisp, but I find the zillions of libraries in python keeps me coming back...
The biggest issue we had was with a limitation in SBCL's serve-event implementation. It turns out it uses select, which caused some nasty issues for us when file descriptors climbed over 1024. In our case, we are handling thousands of persistent ssl connections on the back end. We were using epoll to service all of these connections, but the database library clsql was using serve-event. Under certain situations, we would end up handing select an FD > 1024, and things would go all pear-shaped.
The fix was to patch serve-event itself to use epoll. It is a pretty rough patch at this point, but it works and keeps us going.
The other area we had to punt was with our installer generation. That was as much because we are running our servers on Linux as anything else. We have a special windows server that creates the custom MSI files for each account.
Some times the power is a bit too much, as well. While patching a running server with fixes is cool, I will fully admit to a couple gotchas when we thought we were making obvious fixes that turned out to have not-so-obvious repercussions. In those cases, the problem always existed between the keyboard and chair. We do a better job of checking things offline before rolling them out.
I know #lisp has a pretty bad reputation, but there are some very smart people that hang out there, and they want to see Common Lisp succeed. In general it is a much saner place than c.l.l.
I have similar experiences that saved myself (more than once) by patching 3rd party libraries. In our case, they were proprietary and we didn't have the source. Sometime it was an apparent bug in the library, sometimes it was that the library functionality came short to cover the cases we wanted to handle.
Inspecting their library internals with "apropos", "describe" and other means, and defining "around" method on their internal generic functions, we could just inject our fix or enhancement to the libraries. I admit it was nasty; however, if it weren't Lisp, we had to file a bug report or a feature request to the vendor and wait for them, or to find alternative libraries, or to reimplement things by ourselves. (Open source advocates may say it was our fault to use proprietary library, but proprietary libraries exist for reason; besides, inspecting and modifying things without recompiling the entire library is very useful even you have the source.)
Such emergency patching is like a safety net. In the end you may not have needed it if everything goes smoothly as planned, but it is good to know it exists, and even good if it saves you from disaster.
LISP is my favorite language, but if you use the wrong editor, it can be hell on earth. If you want to turn someone on to LISP, don't forget to point this obvious fact out! I wonder how many novices get turned off to LISP because of this.
Besides, there are some nice Lisp modes for vim, which not only shows matching parens but indents, autocompletes, and does a lot more (or so I heard; I'm a emacs user).
The tricky part is macros and inline functions. Any time you change a macro or a function you want to inline (CL compilers can't do that automatically because of the language spec), you need to recompile all the functions that use that macro/inlined function. ASDF has some dependency-tracking functionality, but I haven't used it.
We're using SBCL on Ubuntu, and we have run into some problems with compiled fsl files. Even though we use an asdf load routine with dependencies defined, we sometimes run into certain fsl files not properly getting updated. This is either a dependency error on our part (most likely) or something else, and our work around is to simply delete all .fsl files just before running the asdf (which you can make part of the load process). So our routine is for each machine, (2 net + local instance) is to run an svn update and then run our loader file (sf-load) and thats it. It is most impressive to keep the same process running and update the code with no interruption in service.
Do you need some kind of remote procedure call to coordinate the updates from an admin instance?
I only know that there's the swank server for talking to emacs, is there something similar for talking between CL instances?
Perhaps you just issue an HTTP Post for each server in a loop?
...generally, you wouldn't do this production systems, I would hope, whatever the language.
I commonly claim that my job often ends up being fulfilling greenspuns 10th law.