Alan Shields | 2 Oct 04:01 2005

More Araneida testing features: with-url-params and defurlmethod

Hello everyone,

In a project I'm working on, it made sense to treat url parameters as
method parameters for multi-method-dispatch (like defmethod), so I wrote
defurlmethod that allows you to do that.

Example:

(defurlmethod foome (handler method request
                             &require bim
							 &key (baz "default value for baz"))
  (format nil "bim: ~A, baz: ~A" bim baz))

(defmethod handle-request-response ((handler my-handler) method request)
  (html-stream (request-stream request)
    `(html (body (p (foome handler method request))))))

If there was at least some value for bim, it would work. Otherwise there
would be no match.

So you could do:

(defurlmethod foome (handler method request)
  (format nil "Needed parameters not given!"))

to have a default.

You can do more than that, though:

(defurlmethod foome (handler method request
(Continue reading)

Berlin Brown | 5 Oct 16:56 2005
Picon

Hello, new user, good to be here

Hello, I really wanted to work on a web framework in lisp.  I am
actually putting together a machine that will have a variety of
different services.

I thought I would bring it up again, but I will probably start with
Araneida, because I need the services more than I need the speedy lisp
web environment(like mod_lisp)?

But, I thought I would bring it up again.  Arneida should be able to
handle 1000 hits a day?
Richard Newman | 5 Oct 17:31 2005
Picon
Picon

Re: Hello, new user, good to be here

Araneida should be able to handle 1000 hits a *minute*!

(Of course, it depends on what the handlers involve...)

I've never had problems with Araneida.

-R

On 5 Oct 2005, at 07:56, Berlin Brown wrote:

> Hello, I really wanted to work on a web framework in lisp.  I am
> actually putting together a machine that will have a variety of
> different services.
>
> I thought I would bring it up again, but I will probably start with
> Araneida, because I need the services more than I need the speedy lisp
> web environment(like mod_lisp)?
>
> But, I thought I would bring it up again.  Arneida should be able to
> handle 1000 hits a day?
Brian Rice | 5 Oct 17:26 2005

Re: Hello, new user, good to be here

On Oct 5, 2005, at 7:56 AM, Berlin Brown wrote:

> Hello, I really wanted to work on a web framework in lisp.  I am
> actually putting together a machine that will have a variety of
> different services.
>
> I thought I would bring it up again, but I will probably start with
> Araneida, because I need the services more than I need the speedy lisp
> web environment(like mod_lisp)?
>
> But, I thought I would bring it up again.  Arneida should be able to
> handle 1000 hits a day?

It should handle closer to 1000 hits per second, although I forget if  
it can actually reach that particular figure. 1000 hits per day is / 
nothing/.

--
-Brian
Marc Battyani | 5 Oct 17:29 2005

Re: Hello, new user, good to be here

"Berlin Brown" <berlin.brown <at> gmail.com> wrote:

> Hello, I really wanted to work on a web framework in lisp.  I am

Congratulation :)

> actually putting together a machine that will have a variety of
> different services.
>
> I thought I would bring it up again, but I will probably start with
> Araneida, because I need the services more than I need the speedy lisp
> web environment(like mod_lisp)?

You should have a look at TBNL if you want services (with or without
mod_lisp)

> But, I thought I would bring it up again.  Arneida should be able to
> handle 1000 hits a day?

uh? Have you forgotten a k, M or G after 1000 ? With mod_lisp on a small
Dell Xeon server I get 440 (small) pages/s that is 38016000/day. Even with a
very slow system like CGI you should be able to get at least 1 hit/s that is
86400/day.

Marc
Berlin Brown | 5 Oct 17:36 2005
Picon

Re: Hello, new user, good to be here

You guys must have some popular sites, I was just being practical, I
dont have much of a web presence.

I guess when I meant handle, I meant handle 1000 - 10,000 a day
without reboots or core dumps over a year period or so.  3million hits
a day, everyday for a year or month without problems seems a little
bit of a stretch, especially when you add a database and whatever.

And, I will probably go with Araneida.

Yea 1000 a day is only 41 hits an hour.  I guess my cellphone can handle that.

On 10/5/05, Richard Newman <r.newman <at> reading.ac.uk> wrote:
> Araneida should be able to handle 1000 hits a *minute*!
>
> (Of course, it depends on what the handlers involve...)
>
> I've never had problems with Araneida.
>
> -R
>
> On 5 Oct 2005, at 07:56, Berlin Brown wrote:
>
> > Hello, I really wanted to work on a web framework in lisp.  I am
> > actually putting together a machine that will have a variety of
> > different services.
> >
> > I thought I would bring it up again, but I will probably start with
> > Araneida, because I need the services more than I need the speedy lisp
> > web environment(like mod_lisp)?
(Continue reading)

Marc Battyani | 5 Oct 18:00 2005

Re: Hello, new user, good to be here

"Marc Battyani" <marc.battyani <at> fractalconcept.com> wrote:

> "Berlin Brown" <berlin.brown <at> gmail.com> wrote:
>
> > But, I thought I would bring it up again.  Arneida should be able to
> > handle 1000 hits a day?
>
> uh? Have you forgotten a k, M or G after 1000 ? With mod_lisp on a small
> Dell Xeon server I get 440 (small) pages/s that is 38016000/day. Even with
a
> very slow system like CGI you should be able to get at least 1 hit/s that
is
> 86400/day.

In fact it's 1476 hit/s => 127M hits/day.
My server generally gets less than 10k hits/day so I use 0.0078% of this. I
feel I have a safe margin ;-)

Marc
Alan Shields | 5 Oct 20:25 2005

TBNL

In the thread right before this one, someone mentioned that if you want
features, you use TBNL. Given the recent development on Araneida, I
wondered how true this still was.

Looking through TBNL, the primary advantages seem to be:

1) It's actively developed by Edi Weitz. I need say no more. ;-)

2) A very flexible system for connecting handlers to URI-space.
   Whereas Araneida uses string matching with an optional "inexact"
   (not fuzzy matching or anything like that, it just allows you to
   match x+y when specifying x), TBNL allows a regexp.

3) Handlers return data to be sent to the browser.
   Whereas Araneida handlers write output to a stream. This is a
   philosophical issue, and there are advantages and disadvantages to
   both ways.

4) Built-in session management
   Araneida currently has you roll your own.

------

I hope I didn't miss anything.

Recently, it would seem, many of the features of TBNL have been added to
Araneida, and I expect many of the coming features will have some
overlap - there is a certain amount of base functionality needed for any
web app. My hope is that the different web service frameworks will be
separated by styles instead of bullet-point features.
(Continue reading)

Edi Weitz | 5 Oct 21:55 2005
Picon

Re: TBNL

Hi Alan!

On Wed, 5 Oct 2005 13:25:50 -0500, Alan Shields <Alan-Shields <at> omrf.ouhsc.edu> wrote:

I think your enumeration is basically correct and complete.  Just two
minor clarifications:

> 2) A very flexible system for connecting handlers to URI-space.
> Whereas Araneida uses string matching with an optional "inexact"
> (not fuzzy matching or anything like that, it just allows you to
> match x+y when specifying x), TBNL allows a regexp.

Actually, TBNL allows any "dispatch" mechanism whatsoever.  Regex
matching is just one of the pre-built mechanisms.

  <http://weitz.de/tbnl/#*dispatch-table*>

I don't know how exactly Araneida handles this.

> 3) Handlers return data to be sent to the browser.  Whereas Araneida
> handlers write output to a stream. This is a philosophical issue,
> and there are advantages and disadvantages to both ways.

Yep, the disadvantage of TBNL's approach is that you have to create
the whole output in memory which can be a problem if it is large.  The
main advantage is that you can pretend you're writing to a stream and
at any time change your mind and send an error message or redirect to
another page instead.  (Also, output can be post-processed which is
done by the session code to enable cookie-less sessions.)  For those
familiar with PHP (yuk!) - they call it "output buffering."
(Continue reading)

Alan Shields | 6 Oct 02:58 2005

How well Araneida reacts to stress

Using the unit test server and siege, I set up benchmark.sh to test
how well Araneida would hold up under repeated queries.

I will say that the threaded SBCL server reacts much better than the
serve event server to high concurrency. It does, however, tend to
seriously wig out in highly interesting ways at said high concurrency.

50 continuous concurrent clients seems to be about the limit before
you start tempting fate.

serve-event will continue serving without throwing conditions, but it
will be very slow.

The threading seems to have issues with the repeated compile calls in
the test suite - wrapping them in a mutex reduces most of the issues,
but not all of them.

Here are the stats for 5 minutes of 50 concurrent clients with random
delays between requests between one second and 3.

Transactions:                  29582 hits
Availability:                 100.00 %
Elapsed time:                 300.03 secs
Data transferred:            3405777 bytes
Response time:                  0.00 secs
Transaction rate:              98.60 trans/sec
Throughput:                 11351.45 bytes/sec
Concurrency:                    0.42
Successful transactions:       29588
Failed transactions:               0
(Continue reading)


Gmane