Page 1 of 1

Multiple "apps" per sbcl session ?

Posted: Sun Aug 03, 2008 11:59 am
by xma

This is a simple question: is it safe to "mix" several apps into a unique common lisp session (or lisp image) ?

If not, when is it safe or recommended to do so ?

For example, I am planning to develop several webapps and/or use other project like hunchentoot and ucw. Would you put them all in the same lisp image or would you seprarate them in a one app per lisp image ?

I hope I have been clear here :)

Thank you.

Re: Multiple "apps" per sbcl session ?

Posted: Sun Aug 03, 2008 5:42 pm
by findinglisp
There are no hard and fast rules. The short of it is that you could probably do it quite easily. A lot of it depends on how you build it. That said, whether you want to or not may depend more on your deployment environment than anything else. For instance
  • Are these apps going to be small, lightly used applications internal to a company? If so, then putting them in the same Lisp image might be acceptable.
  • If you ever think that these might be running on different servers, as things scale-up, for instance, then perhaps they would be better running in separate images.
  • That said, how many apps would you have? If 2 or 3, then running separate images might be fine. But if 20 or 30, then you're probably growing the virtual memory footprint on your single server and perhaps you want to avoid that.
  • Do the applications communicate in any way, or share any resources? If so, then perhaps running them together will make them more efficient.
So, I think it really depends on what types of applications you are writing and what sort of environment they will be run in. What you want to do is definitely possible. Simply give each application a different URL prefix in the Lisp image and you're off to the races.

Re: Multiple "apps" per sbcl session ?

Posted: Sun Aug 03, 2008 11:56 pm
by Paul Donnelly
It's generally safe, unless you're doing things that could crash your Lisp and you'd like to limit the crash and preserve the rest of the environment. And if you're developing something that you might want to load from scratch more often than the other Lisp programs you're running, it's best to keep it in its own Lisp. But very few Lisp programs muck with the environment so much that they will disrupt other running programs.

Re: Multiple "apps" per sbcl session ?

Posted: Thu Aug 07, 2008 2:22 pm
by xma
Thank you guys for your valuable answers.