Hi,
Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application.
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL.
Cheers, Bob
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/
On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison hutch@recursive.ca wrote:
Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application.
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL.
Sounds like an interesting idea. I've never done this until now, though.
Cheers, Edi.
On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote:
On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison hutch@recursive.ca wrote:
Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application.
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL.
Sounds like an interesting idea. I've never done this until now, though.
I think this is worth pursuing -- the more I think about it the more I'm convinced. I think Araneida might be the way to go because both packages will benefit. I want to avoid any changes to either Araneida or TBNL at least for the first pass at this, so I guess that an Araneida handler with a socket connection between them is an easy way to achieve this. The socket can be eliminated later. Going to have to worry about concurrent requests too...
Now all I have to do is find the time.
Cheers, Bob
Cheers, Edi.
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/
"Bob Hutchison" hutch@recursive.ca wrote:
On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote:
On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison hutch@recursive.ca wrote:
Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application.
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL.
Sounds like an interesting idea. I've never done this until now, though.
I've done this once with paserve. IIRC there was just very few lines to write to call the normal mod_lisp handler function.
Marc
On Mar 7, 2005, at 11:41 AM, Marc Battyani wrote:
"Bob Hutchison" hutch@recursive.ca wrote:
On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote:
On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison hutch@recursive.ca wrote:
Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application.
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL.
Sounds like an interesting idea. I've never done this until now, though.
I've done this once with paserve. IIRC there was just very few lines to write to call the normal mod_lisp handler function.
You mean calling mod_lisp from the lisp server, presumably using an FFI? Hadn't thought of that.
Marc
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/
"Bob Hutchison" hutch@recursive.ca wrote:
On Mar 7, 2005, at 11:41 AM, Marc Battyani wrote:
I've done this once with paserve. IIRC there was just very few lines to write to call the normal mod_lisp handler function.
You mean calling mod_lisp from the lisp server, presumably using an FFI? Hadn't thought of that.
No, I mean calling the mod_lisp handler on the Lisp side. Generally it's the #'process-apache-command or #'process-apache-request function.
Marc
On Mar 3, 2005, at 10:49 AM, Bob Hutchison wrote:
On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote:
On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison hutch@recursive.ca wrote:
Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application.
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL.
Sounds like an interesting idea. I've never done this until now, though.
I think this is worth pursuing -- the more I think about it the more I'm convinced. I think Araneida might be the way to go because both packages will benefit. I want to avoid any changes to either Araneida or TBNL at least for the first pass at this, so I guess that an Araneida handler with a socket connection between them is an easy way to achieve this. The socket can be eliminated later. Going to have to worry about concurrent requests too...
Now all I have to do is find the time.
I've found some time in the last couple of days and pretty much have this working with Araneida (in LispWorks at least). I've got to track down a few little problems but nothing much (e.g. a spurious 404 error when using FireFox that doesn't happen with other browsers, and some also spurious and intermittent socket errors).
While doing this I noticed something a little funny with the dates associated with If-modified-since. TBNL (rfc-1123-date) produces dates like "Tue, 1 Feb 2005 13:49:29 GMT" while Safari produces dates like "Tue, 01 Feb 2005 13:49:29 GMT" -- same date but you can't compare them as strings. If you look at rfc2616 section 3.3.1 there is an example that has the leading 0 on the day of month. Safari produces a header with the leading 0 for If-modified-since, so files in the first 9 days of any month will never match. FireFox appears to return whatever you send it, so it works there. I think this is probably a bug in TBNL.
This turned out to be fairly straight forward in the end -- I tried several strategies and think I have a pretty simple one. Unfortunately the question becomes what is Araneida adding to this other than handling the request parsing.
It is *very* fast on my machine. I've appended part of the output from the apache ab utility for the direct to Araneida and apache/mod_lisp configurations (unfortunately, if I increase the concurrency level to 15 or more I get a lot of errors from Araneida). I don't have Araneida operating as a proxy behind apache at the moment so I have no benchmarks for that configuration (and this also means that I've not tested it). A similar application in Java (that is being replace by this CL version) can barely sustain 18 Kbytes/s (don't read too much into that number, the Java application runs much better if it is operating on something other than my notebook (Mac powerbook G4 1GHz 2G RAM) -- of course so might the lisp application). And remember, this is not a well conceived benchmark -- make of it what you will.
I'm going to download the most recent version of TBNL and integrate changes into that. There are not many and perhaps I can avoid them all. I'll get this cleaned up and then make it available.
Cheers, Bob
Araneida (directly) -> TBNL -------------------------------------
Document Length: 4288 bytes
Concurrency Level: 10 Time taken for tests: 63.614 seconds Complete requests: 5000 Failed requests: 0 Broken pipe errors: 0 Total transferred: 22415000 bytes HTML transferred: 21440000 bytes Requests per second: 78.60 [#/sec] (mean) Time per request: 127.23 [ms] (mean) Time per request: 12.72 [ms] (mean, across all concurrent requests) Transfer rate: 352.36 [Kbytes/sec] received
Connnection Times (ms) min mean[+/-sd] median max Connect: 0 17 218.8 0 3016 Processing: 10 109 42.7 100 365 Waiting: 9 109 42.7 100 365 Total: 10 127 221.6 101 3144
Percentage of the requests served within a certain time (ms) 50% 101 66% 119 75% 132 80% 141 90% 170 95% 198 98% 234 99% 282 100% 3144 (last request)
mod_lisp -> TBNL -------------------------------------
Document Length: 4288 bytes
Concurrency Level: 10 Time taken for tests: 96.451 seconds Complete requests: 5000 Failed requests: 0 Broken pipe errors: 0 Total transferred: 22764006 bytes HTML transferred: 21440000 bytes Requests per second: 51.84 [#/sec] (mean) Time per request: 192.90 [ms] (mean) Time per request: 19.29 [ms] (mean, across all concurrent requests) Transfer rate: 236.02 [Kbytes/sec] received
Connnection Times (ms) min mean[+/-sd] median max Connect: 0 5 13.5 0 154 Processing: 8 187 222.2 107 2246 Waiting: 0 185 222.9 105 2245 Total: 8 192 221.5 115 2246
Percentage of the requests served within a certain time (ms) 50% 115 66% 180 75% 248 80% 291 90% 445 95% 614 98% 890 99% 1083 100% 2246 (last request)
I've found some time in the last couple of days and pretty much have this working with Araneida (in LispWorks at least). I've got to track down a few little problems but nothing much (e.g. a spurious 404 error when using FireFox that doesn't happen with other browsers, and some also spurious and intermittent socket errors).
The 404s are probably caused by Firefox wanting to leech "favicon.ico".
Regards, Peter.
Could be. I'll check into that.
On Mar 11, 2005, at 4:30 PM, Peter BARABAS wrote:
I've found some time in the last couple of days and pretty much have this working with Araneida (in LispWorks at least). I've got to track down a few little problems but nothing much (e.g. a spurious 404 error when using FireFox that doesn't happen with other browsers, and some also spurious and intermittent socket errors).
The 404s are probably caused by Firefox wanting to leech "favicon.ico".
Regards, Peter.
-- ((call/cc call/cc) (call/cc call/cc)) _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/
On Fri, 11 Mar 2005 16:26:41 -0500, Bob Hutchison hutch@recursive.ca wrote:
While doing this I noticed something a little funny with the dates associated with If-modified-since. TBNL (rfc-1123-date) produces dates like "Tue, 1 Feb 2005 13:49:29 GMT" while Safari produces dates like "Tue, 01 Feb 2005 13:49:29 GMT" -- same date but you can't compare them as strings. If you look at rfc2616 section 3.3.1 there is an example that has the leading 0 on the day of month. Safari produces a header with the leading 0 for If-modified-since, so files in the first 9 days of any month will never match. FireFox appears to return whatever you send it, so it works there. I think this is probably a bug in TBNL.
Thanks, I'll look into this if I find some time. Or maybe Stefan will... :)
I'm going to download the most recent version of TBNL and integrate changes into that. There are not many and perhaps I can avoid them all. I'll get this cleaned up and then make it available.
Thanks. If you send patches it'd be very nice if you could also add a section to the docs which explains how to set up TBNL with Araneida.
Cheers, Edi.
On Mar 12, 2005, at 3:50 AM, Edi Weitz wrote:
I'm going to download the most recent version of TBNL and integrate changes into that. There are not many and perhaps I can avoid them all. I'll get this cleaned up and then make it available.
Thanks. If you send patches it'd be very nice if you could also add a section to the docs which explains how to set up TBNL with Araneida.
So. I was thinking. What if somebody didn't want to use Araneida, just TBNL?
It turns out that with a relatively straight forward re-organisation of Araneida's daemon.lisp code that *simultaneous* support for:
* browser->apache->mod_lisp->tbnl * browser->apache->araneida * browser->apache->araneida->tbnl * browser->araneida * browser->araneida->tbnl * browser->tbnl
are all possible if you get your port numbers right.
There's a little problem though. The browser->tbnl support isn't behaving properly. It serves the pages fine, but the memory use is growing monotonically. Something is not being released. I'm not sure what. Maybe the socket isn't closed? The number of processes remains small (actually only one in TBNL, a few in aranedia).
Any ideas? If not, I'll try to work out what is happening. I may post the patches with this problem still there.
I have a small test of the setup. I'll include that in the test directory (I still have to clean it up a bit).
I'll try to post the patches to TBNL and Araneida later today.
Cheers, Bob
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/
On Sun, 13 Mar 2005 10:32:44 -0500, Bob Hutchison hutch@recursive.ca wrote:
It turns out that with a relatively straight forward re-organisation of Araneida's daemon.lisp code that *simultaneous* support for:
- browser->apache->mod_lisp->tbnl
- browser->apache->araneida
- browser->apache->araneida->tbnl
- browser->araneida
- browser->araneida->tbnl
- browser->tbnl
are all possible if you get your port numbers right.
Huh? browser->tbnl? How does that work? Who does the http part?
Cheers, Edi.
On Mar 14, 2005, at 3:57 AM, Edi Weitz wrote:
On Sun, 13 Mar 2005 10:32:44 -0500, Bob Hutchison hutch@recursive.ca wrote:
It turns out that with a relatively straight forward re-organisation of Araneida's daemon.lisp code that *simultaneous* support for:
- browser->apache->mod_lisp->tbnl
- browser->apache->araneida
- browser->apache->araneida->tbnl
- browser->araneida
- browser->araneida->tbnl
- browser->tbnl
are all possible if you get your port numbers right.
Huh? browser->tbnl? How does that work? Who does the http part?
I hacked, er, enhanced, yes, that's it, enhanced, Araneida's daemon.lisp to open it up a bit so that TBNL can use it's header parsing stuff. When the first line received to TBNL has a space in it the assumption is made that this is a direct HTTP request, otherwise a mod_lisp request.
Cheers, Bob
Cheers, Edi.
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/
On Fri, 11 Mar 2005 16:26:41 -0500, Bob Hutchison hutch@recursive.ca wrote:
While doing this I noticed something a little funny with the dates associated with If-modified-since. TBNL (rfc-1123-date) produces dates like "Tue, 1 Feb 2005 13:49:29 GMT" while Safari produces dates like "Tue, 01 Feb 2005 13:49:29 GMT" -- same date but you can't compare them as strings. If you look at rfc2616 section 3.3.1 there is an example that has the leading 0 on the day of month. Safari produces a header with the leading 0 for If-modified-since, so files in the first 9 days of any month will never match. FireFox appears to return whatever you send it, so it works there. I think this is probably a bug in TBNL.
Thanks for the info, I've uploaded a new version (0.3.13) which fixes this.
Stefan Scholl provided some additional info which I'll include here:
1. This bug didn't show up before because Apache silently parses and rewrites this header. Only because you sent it through Araneida which obviously just lets it through could you see the wrong format.
2. While Safari's behaviour is not strictly wrong it doesn't follow the recommendation given in the RFC to send the header back exactly as received from the server.
Thanks again, Edi.
Hi!
On 2005-03-03 10:10:07, Bob Hutchison wrote:
It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities.
And when you're at it: How about a FastCGI bridge? There are some nice and new http servers out there, which support FastCGI.
Regards, Stefan
On Thu, 3 Mar 2005 16:26:43 +0100, Stefan Scholl stesch@no-spoon.de wrote:
And when you're at it: How about a FastCGI bridge? There are some nice and new http servers out there, which support FastCGI.
One would need to integrate this one
http://www.s2.org/~chery/projects/fastcgi-cmucl
or write a new implementation-independent version.