[pro] Are you an Imager or a Filer?
Chaitanya Gupta
mail at chaitanyagupta.com
Thu Jan 20 19:13:18 UTC 2011
On Thursday 20 January 2011 11:49 PM, Peter Seibel wrote:
> I'm a filer. With ASDF and even more so these days with Quicklisp,
> it's just easier to load the stuff I need and it doesn't take that
> long and it saves me having to spend any mental energy keeping track
> of different images.
I agree. I have tried using images, but the savings in startup time have
not been worth the hassle, atleast not during development.
>
> However, Fare's mention of buildapp reminded me that I use it for some
> of my deployed websites, mostly just so I have one thing that is built
> and I know won't change, if I accidentally decide to upgrade a library
> or tweak some source code for some other reason. (Obviously, I could
> also just keep my source for the running app in some distinct
> place--now that I'm a bit more adept at git, I might start doing
> that.)
Interesting you should mention that. At a previous company, we started
with using only images for deployment. Soon, though, we started running
into problems with this approach -- during early days of development
atleast, it was very painful since we were always patching our live
system every now and then. And image files were huge compared to the
size of our source code, so transferring them was never fun.
Eventually, what we settled on was to put the source code on our
production server(s), but build an image whenever a new version was
checked out -- which would ensure quick startup if ever the server was
rebooted or the application went down.
A nifty thing which went along with this was a system of patches which
could be applied to running production images without restarting them.
When we had to push a bug fix to production, we could have done this:
- update the source in the maintenance branch,
- update source on production server(s),
- shutdown, rebuild, and boot our Lisp system again,
However, shutting down a running Lisp image was not very desirable, so,
thanks to the nature of Common Lisp, we managed to go with this instead:
- upload a patch (a .lisp source file) to a designated directory on the
server
- `load` all the patches in the running Lisp system from said directory
(we would ensure that each patch wouldn't break things if load-ed more
than once)
- ensure that these patches are loaded when the application is started
(to account for restarts)
(I hope I've got everything right, this was all over two years ago)
All in all, a combination of images and files worked out fairly well for
our production system.
Chaitanya
--
http://chaitanyagupta.com/blog/
More information about the pro
mailing list