Hi, Sep.
If you don’t need to run any tcl code when serving these requests and you still
want to serve them using AOLserver (as opposed to some other web server or a
CDN), you can take advantage of pools to segregate threads for serving these
static resources into their own pool. If those threads never allocate a tcl
interpreter, they will be an order of magnitude smaller in footprint than your
normal threads and so you can just have a lot of them.
We have a module that you might find useful that helps with this:
http://aolserver.am.net/code/modules/ampools.adpx
-Alex Hisen
From: Sep Ng [mailto:thejackschm...@gmail.com]
Sent: Thursday, March 19, 2015 5:52 PM
To: aolser...@googlegroups.com
Cc: aolserver-talk@lists.sourceforge.net
Subject: Re: [AOLSERVER] AOLserver questions
Generally, what I hope to achieve is that all of these static files will be
offloaded into a single connection thread(?) So, when a request for a static
file comes in, I can push it to this sleeping thread and then serve another
request while this sleeping thread will look up the image and do ns_returnfile
(I guess). At least, this is how I'm envisioning it right now.
I don't know if I'm looking at it right or not. Judging from my readings on
Gustaf's work, this is how it would operate. Feel free to correct me if I'm
looking at this totally wrong.
On Friday, March 20, 2015 at 8:42:04 AM UTC+8, Tony Bennett (Brown Paper
Tickets) wrote:
Scheduling isn't needed. I read your question again and I understand what
you're looking for. You're asking for all the javascript and images on a page
to be sent in one request correct? You'll need to find a way to buffer the
output and then parse and change the buffer before it's sent. It would be nice
to have this be part of ns_register_filter postauth.
On 3/19/15 5:12 PM, Sep Ng wrote:
Thanks for the reply. I am perhaps confused with all of this. It seems that
if I use the scheduling proc, I can start a thread that runs perpetually and
does nothing. Then, I can use tclthread API to transfer control into this and
issue some proc that would perform mutex and serve the file to the current
ns_conn details and quit. Am I thinking this right or am I being stupid? :-)
On Friday, March 20, 2015 at 5:09:20 AM UTC+8, Tony Bennett (Brown Paper
Tickets) wrote:
Look at the scheduling commands at http://panoptic.com/wiki/aolserver/Tcl_API.
You could make an image processing queue that runs in it's own thread and it
won't take up any connections.
Tony
On 3/18/15 11:09 PM, Sep Ng wrote:
Hi all,
I've been reading up on aolserver background delivery tricks on OpenACS and
I've seen that the patches for the static TCL channel is already in 4.5.1. In
the spirit of improving server performance, I've been wondering if such
facility is worth building on the custom app to increase concurrency and
scalability.
Most of the time, our aolserver also has to handle incoming requests for
multiple jpeg, javascript libraries, and a lot of other things. Freeing up the
connection thread sounds very useful in improving the server scalability so I
wanted a little bit of help on getting this to work.
It's been hard trying to wrap my head around using ns_conn channel and what I
can actually do with this static TCL thread. It seems that I should be
redefining ns_returnfile to use background delivery. Could I use it to push a
TCL proc that generates given the parameters, the dynamic page to this TCL
channel to free up my connections?
Sep
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
aolserver-talk mailing list
aolserv...@lists.sourceforge.net<mailto:aolserv...@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/aolserver-talk
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk