Lisp HUG Maillist Archive

Recommendations for web servers

Hi,

I was wondering what web servers people using LW are using and how 
things are working out.

There are several available, CL-HTTP and araneida I know to work, and 
araneida works nicely with Apache. I have not tried portable aserve as 
yet.

I keep hearing that there is a licensing problem with CL-HTTP, the 
license is strange, but aside from the 'anti-social' bit there doesn't 
seem to be much required that I wouldn't do anyway.

Cheers,
Bob

----
Bob Hutchison          -- blogs at <http://www.recursive.ca/hutch/>
Recursive Design Inc.  -- <http://www.recursive.ca/>


Re: Recommendations for web servers

Bob Hutchison wrote:
> Hi,
> 
> I was wondering what web servers people using LW are using and how 
> things are working out.
> 
> There are several available, CL-HTTP and araneida I know to work, and 
> araneida works nicely with Apache. I have not tried portable aserve as yet.
> 

I use portableaserve.  It works just fine, though it took a few tweaks
to get it to compile on LWW.  I also use Portableaserve with CMUCL on
FreeBSD and of course it also runs with ACL.

No crashes, 9 out of 10.

Wade


Re: Recommendations for web servers

Unable to parse email body. Email id is 3460

Re: Recommendations for web servers

On 19 Jan 2005, at 19:53, Bob Hutchison wrote:

> Hi,
>
> I was wondering what web servers people using LW are using and how 
> things are working out.
>
> There are several available, CL-HTTP and araneida I know to work, and 
> araneida works nicely with Apache. I have not tried portable aserve as 
> yet.
>
> I keep hearing that there is a licensing problem with CL-HTTP, the 
> license is strange, but aside from the 'anti-social' bit there doesn't 
> seem to be much required that I wouldn't do anyway.
>
> Cheers,
> Bob

We started using portable allegro serve on OpenMCL and LispWorks, and 
next added mod_lisp as an alternative.
Today I like mod_lisp better, because it works just as well and is 
somewhat easier to deal with and understand.

Sven

--
Sven Van Caekenberghe - mailto:sven@beta9.be
Beta Nine - software engineering - http://www.beta9.be
..Mac - svc@mac.com - http://homepage.mac.com/svc

"Lisp isn't a language, it's a building material." - Alan Kay 


Re: Recommendations for web servers

On Jan 19, 2005, at 12:53 PM, Bob Hutchison wrote:

> Hi,
>
> I was wondering what web servers people using LW are using and how 
> things are working out.
>
> There are several available, CL-HTTP and araneida I know to work, and 
> araneida works nicely with Apache. I have not tried portable aserve as 
> yet.
>
> I keep hearing that there is a licensing problem with CL-HTTP, the 
> license is strange, but aside from the 'anti-social' bit there doesn't 
> seem to be much required that I wouldn't do anyway.

Hi,

I'm one of the Araneida maintainers and responsible for its 
compatibility with multiple Lisps, though I didn't write the Araneida 
LispWorks compatibility layer. Araneida's compatibility shim is much, 
much simpler than acl-compat; in fact, it does no stream emulation at 
all. acl-compat adds emulation for Allegro's stream chunking, which 
I've heard reported as causing slowdowns in sending large body 
contents.

However, AllegroServe does have a better API and actual documentation. 
I have had thoughts of redesigning the araneida API around a defined 
and documented protocol; also, Kevin Rosenberg is working on an 
allegroserve compatibility layer for Araneida that would allow most 
aserve programs to work unmodified.

Unlike CL-HTTP, Araneida's license is unambiguous and completely free 
(3-clause BSD).

Araneida is currently ported to the same number of lisps as Portable 
AllegroServe, but I've had an easier time getting it running.

Hopefully this helps. Please ask if you have any more questions about 
Araneida.
--
Brian Mastenbrook
bmastenb@cs.indiana.edu
http://www.iscblog.info/blog/ - that's an Araneida site there!
http://cs.indiana.edu/~bmastenb/


Recommendations for web servers

Bob Hutchison writes:

 > I was wondering what web servers people using LW are using and how 
 > things are working out.

We (at Memetrics) are using portableaserve, plus some local fixes.
It seems to work ok; we're using it for the UI part of our application.

I'm not sure I'd really trust it for "serious" applications where it's
open to the big bad internet (this may just be prejudice; but we did
have to spend some time fixing some bugs in it; others may yet remain).
For that purpose, we're starting to use mod_lisp + apache.  That seems
very nice and highly efficient.  It does couple you to Apache, of course.

 > However, AllegroServe does have a better API and actual documentation. 
 > I have had thoughts of redesigning the araneida API around a defined 
 > and documented protocol; also, Kevin Rosenberg is working on an 
 > allegroserve compatibility layer for Araneida that would allow most 
 > aserve programs to work unmodified.

Well, you could use araneida (or even mod_lisp) plus aserve's nice
HTML generation package.

Good luck!


Re: Recommendations for web servers

Some comments:

--- Alain.Picard@memetrics.com wrote:

> For that purpose, we're starting to use mod_lisp + apache.  That seems
> very nice and highly efficient.  It does couple you to Apache, of course.

Coupling to Apache is probably not a bad thing.  In other words, being able to
coexist with Apache is a big plus, since Apache can do some heavy lifting for
you, e.g. SSL encryption, serving static content (esp. images) very
efficiently, etc.

With mod_proxy and mod_rewrite, you can easily run your Lisp-based webserver
(e.g. CL-HTTP or AllegroServe/PortableAserve, etc.) from behind Apache, and
leverage all that Apache has, but also get the benefit of the Lisp webserver. 
Basically, it's like having two webservers in one, and you use whichever you
like for each specific page or set of pages.  Simple RewriteRule rules (along
with ProxyPassReverse directives) can not only help you fully integrate your
webservers, but also ensure that people hitting your site see the links the way
you want them to.

For one of our websites, we used this solution, and it works very well. 
Customers have no idea that they're actually using different webservers, and
even on different ports, sometimes on different computers, even.

By running everything through Apache as the main webserver, you get:

 o a centralized and efficient logging system (compatible with AWStats, etc.)
 o extremely fast file serving
 o access to mod_*, which means many other languages and paradigms for
   creating web pages
 o SSL encryption, but only on the way out, and ultra-efficient
 o better security, though once you have a hole into your other webserver
   application, you never really know what can happen

I think that it's unnecessary for a webserver to try to be what Apache is.  It
makes more sense to focus on how running your web application from inside a
Lisp world can help simplify development, improve perforance, and produce the
dynamic content on most of your webpages with greater ease.  Then, for the
other stuff, just try to let Apache do the work.

So I guess what I'm trying to say here is that people should use the Lisp
webserver they feel is the easiest to program with -- not necessarily the one
that supports the most additional features (e.g. SSL), or the ones with the
greatest speed optimizations, which most likely won't compare to leveraging
Apache wherever appliable (e.g. serving static content).

dave


Re: Recommendations for web servers

Unable to parse email body. Email id is 3468

Re: Recommendations for web servers (case study)

Chris,

--- "Christopher C. Stacy" <cstacy@dtpq.com> wrote:

> On the other hand, if you don't have much static content compared to
> the dynamic content that will be generated by your Lisp web server,
> maybe putting Apache into the loop will increase the overhead.
> (Rather than doing a regular expression match against every URL,
> and then having to do an extra protocol layer to talk to Lisp
> most of the time anyway, it might be faster to just cut out
> the middleman and run everything from inside Lisp.)

Though what you're saying is sensible and logical, practice doesn't show it to
be true.

My company manages americandiamond.com, and we took a very plain vanilla X86
tower,  put Linux on it, with 1 GB of RAM, and did exactly what I said, using
Apache in the front, and then a full-blown Tomcat running alongside it, on the
same server.

We had Apache running, with over a dozen regexps/rewrite rules.  The static
content was all served off of Apache, while all of the dynamic stuff was passed
off to an often 300 MB Tomcat process (Java app server, much slower than a Lisp
app would have been, probably).

We made it through Christmas that way, and though I'm not supposed to say how
much volume they sold, it was quite huge.  I'll give you some stats on the
month of December:

 o 50 GB of data was pumped out by the server
 o 25,000 unique visitors, totaling 45,000 visits for that month
 o avg of 150 hits/visit
 o 400,000+ pages served

Not to mention that this server was also running PostGreSQL.  So while what
you're saying makes sense, a good Apache configuration goes a long way.

I should note that in November, the site was crashing about once (and sometimes
twice/day), until I relieved Tomcat of serving static content, and had Apache
do this directly.  Once I made the change, the site became several times
quicker, and never crashed.

Another thing that's interesting is that our site was extremely quick...pages
loaded up (and continue to load) very fast.  Note that the site is very heavy
on the graphics.

We considered doing it in CL in the beginning, but I was not sure that the CL
community had developed sufficient Web development tools.  Now that it's all in
the past, and I know how we did it with Java, I'm interested in Lisp frameworks
for developing sites like that.

We used Hibername (analogous to LispWorks Common SQL), though I'd say that
Hibernate is probably a bit more mature, and supports both OMG's OQL (Object
Query Lanuage and their own HQL, which is what we used)

We used an amazing framework/CMS called JPublish to manage (and separate) the
static content, pages, templates, actions, etc.  Action scripts were not coded
in Java, but rather in BeanShell, which is very Java-like, but it's
interpreted, so it's like having your pages in Perl or even CL, but compiled
on-the-fly, so you can still edit those pages in-place, and see the changes
immediately (and it was still fast enough).  This was a huge win, of course,
since writing in the scripted Java is much easier and faster than the
full-blown compiled Java, with all the declarations, etc.

JPublish, in turn, used the Velocity Template Engine for templating, and this
too helped a lot.

The only problem with Apache is that if you're developing an Lisp app that has
an embedded webserver (e.g. a Web configurator), then you can't really do the
whole Apache thing.  So the whole mod_lisp thing isn't quite as attractive as
something like PortableAserve.

dave


Re: Recommendations for web servers (case study)

On Jan 20, 2005, at 6:41 AM, Dave Bakhash wrote:

> Though what you're saying is sensible and logical, practice doesn't 
> show it to
> be true.
>
> I should note that in November, the site was crashing about once (and 
> sometimes
> twice/day), until I relieved Tomcat of serving static content, and had 
> Apache
> do this directly.  Once I made the change, the site became several 
> times
> quicker, and never crashed.

Hi Dave,

Thanks for the practical example. I would be very, very worried if a CL 
web server were as slow as Tomcat for serving static content. Without 
the overhead of the memory-hogging JVM and very slow, marginally 
compiled bytecode, I think Lisp does much better at serving static 
files.

I have not done any benchmarks on this, but I would guess that a simple 
Lisp web server serving static content would not be overloaded by a 
moderate load.

> The only problem with Apache is that if you're developing an Lisp app 
> that has
> an embedded webserver (e.g. a Web configurator), then you can't really 
> do the
> whole Apache thing.  So the whole mod_lisp thing isn't quite as 
> attractive as
> something like PortableAserve.

mod_proxy can be used with Araneida to make it appear that the Apache 
is serving the content. Araneida is listening on the backend, then, and 
translates the requests it receives from Apache to the request that was 
given to Apache.
--
Brian Mastenbrook
bmastenb@cs.indiana.edu
http://cs.indiana.edu/~bmastenb/


Re: Recommendations for web servers (case study)

* Brian Mastenbrook wrote:
> Thanks for the practical example. I would be very, very worried if a CL 
> web server were as slow as Tomcat for serving static content. Without 
> the overhead of the memory-hogging JVM and very slow, marginally 
> compiled bytecode, I think Lisp does much better at serving static 
> files.

This is off topic, but it's not anything to do with Java that makes
Tomcat slow: it just sucks because it is crap SW. Blaming Java is
dangerously close to blaming Lisp and equally wrong.



Re: Recommendations for web servers (case study)

just a quick thing, though:

--- Tim Bradshaw <tfb@cley.com> wrote:

> This is off topic, but it's not anything to do with Java that makes
> Tomcat slow: it just sucks because it is crap SW. Blaming Java is
> dangerously close to blaming Lisp and equally wrong.

Tomcat is anything but crappy.  I think it's excellent, and we've still had an
enormous amount of luck with it.

I think there is some truth to the fact that there is a certain amount of
overhead to running under the JVM.

Specifically, the version of the Linux kernel and the version of our JVM did
not work well together, and so Java seemed to be using the "Green Threads"
model, and not the native ones, which hurt us.

Now we have a new kernel and JVM, and things seemed to have gotten better.

I don't know if this is the case with LispWorks, for example, because I don't
think that LispWorks on Linux tries to use the native threads model at all. 
That's not to say that it would suffer from this, but I frankly don't know how
it would behave.

dave


Re: Recommendations for web servers (case study)

* Brian Mastenbrook wrote:

> I appreciate the sentiment, but Java is, for serious work, essentially 
> a single-implementation language, and the implementation itself is 
> seriously flawed in a number of ways. I don't think blaming the 
> implementation for unacceptable slowness when running 
> straightforwardly-written code is a problem.

Well, I can only beg to differ.  I work for a company which uses Java
very extensively, currently *not* using the Sun JVM (though stuff is
tested with it), and *all* the performance issues I've seen have been
due to crap code or use of crap frameworks (J2EE pretty much in its
entirety).

--tim


Re: Recommendations for web servers

On Thu, 20 Jan 2005 14:50:59 +0200, Bulent Murtezaoglu <bm@acm.org> wrote:

> Are people really seeing the kind of traffic where these would be
> issues?

I'd love to... :)

  "I would start small and grow as the demand grew. That's what I'm
   doing now.

   Back then we planned to be huge from the outset. So we built this
   monster platform on BEA, Sun and Oracle. We had huge dedicated
   connectivity pipes. We had two full racks clustered and fully
   redundant. We had E450's with RAID-5 and all 4 CPU slots filled,
   E250s, F5 load balancers...the cost of keeping that system on was
   enormous. The headcount to keep it humming was enormous too.

   The truth is, we could have run the whole company on my laptop
   using a cable modem connection."

<http://meet-the-makers.com/conversations/witchel/4/>


Re: Recommendations for web servers

"Bob Hutchison" <hutch@recursive.ca> wrote:

> I was wondering what web servers people using LW are using and how
> things are working out.
>
> There are several available, CL-HTTP and araneida I know to work, and
> araneida works nicely with Apache. I have not tried portable aserve as
> yet.

If you want to use Apache (and if it's a professional web server you should
use Apache) then mod_lisp is the most efficient and tightly coupled way to
do it. As mod_lisp is only an Apache module that will forward the Apache
requests to some Lisp processes, you have to add some higher level layers
above it. You should have a look at TBNL for this.

TBNL: http://www.weitz.de/tbnl/
mod_lisp: http://www.fractalconcept.com/asp/html/mod_lisp.html
The mod_lisp repository:
http://www.fractalconcept.com:8000/public/open-source/mod_lisp/

All my web servers are based on mod_lisp and LWL, though I generally develop
on Windows + LWW. (or sometimes Apache/mod_lisp on Linux and LWW)

Cheers,

Marc



Updated at: 2020-12-10 08:53 UTC