This is a really interesting topic for discussion. I haven't heard
much from others about the practical issues of web app deployment. I
was setting up a test server for a student working with me and
realized how complex my setup actually was (like that proverbial
lobster, the complexity has been slowly accumulating around me).
Here are a few things we do:
1) We build an image with all but three libraries baked in:
- elephant, weblocks and my app because I patch/develop on all
three.
2) I keep a mirror of the source tree for live inspection of the
running system
- I use *features* and some conditional reader macros to work with
different optimization settings between deployment and staging
- A staging server is helpful for verifying changes and upgrades
to the database before exposing new code to the new DB. I can run the
staging server on the latest live DB and do all my verification and
tests there before upgrading the live server.
3) I do most live patching manually by editing source files and re-
evaluating them. I then darcs record the changes and push them back
to my integration and development installations. Quite frankly this
is the model I think that Graham talks so much about. The ability to
walk through the code and trace user activity followed by small
changes is awesome; I think this scales to patch releases as well, but
certainly doesn't mean that your normal feature upgrades can somehow
magically be done without server downtime.
4) Large changes or changes to dependent libraries require:
a) Update the source trees
b) Rebuild the image
c) Stop/restart the server
5) Then there's all the sysadmin stuff
a) start/stop system scripts
b) log file, dribble file
c) apache config
d) minifying, etc.
e) static file management
f) backups (daily backup of database, backup history of images)
Thoughts:
The lightest weight deployment I can imagine is:
- A complete image with the site and lisp libs pre-loaded
- Static file hierarchy
- Lisp init file to start server, link-in static libraries, open DBs,
etc.
I do think that having a source tree that is in-sync with the server
is critical for rapid diagnosis of problems. About 90% of the
problems or small features people request I've been able to make
directly on the live site (of course I only have about 100 users at
present with low simultaneous numbers of connections). I have also
shot myself in the foot two or three times doing this, so now that
I've officially launched the product I'm more circumspect about the
changes I make. Once I have identified them on the main site, I
switch to a staging server, debug and fix there, then push the diff to
the live site, manually evaluate the changed files, and verify by hand
and/or with users.
I think that automating the patch or deployment process only makes
sense when you're pushing to more than one running server; otherwise
the manual process makes you think more about what you're doing.
So what facilities in other languages/frameworks are the most helpful,
is it a lack of tools or something more fundamental that makes lisp
hard? What tools would you want or need?
Ian
On Mar 15, 2009, at 9:13 AM, Jan Rychter wrote:
>
>> When people talk about Common Lisp they usually mention the
>> interactivity factor and the ability to fix bugs on live servers.
>
> I stopped believing these people. I don't think this is doable except
> for very simple cases or if you really put a lot of effort into it.
>
> I also found deploying CL web applications to be immensely
> problematic,
> and I currently have no good way of doing it short of shipping a giant
> tarball containing all dependencies with their sources, basically a
> replica of my development system.
>
> --J.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---