<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Jay,<br>
<br>
On 9/23/2014 10:03 PM, Jay McCarthy wrote:<br>
</div>
<blockquote
cite="mid:CAJYbDak29o47-yU5ONQy3DH+V+2DVCzT8UWqtaZNMsHAdb=JdA@mail.gmail.com"
type="cite">
<pre wrap=""><font color="#006600">The command-line tool is basically deprecated and only provided for
backwards compatibility. There is a huge amount that it can't do at
all and it hasn't been the primary way that we recommend using the Web
server for a very long time.</font></pre>
</blockquote>
<br>
I'm not using the plt-web-server app - I created a minimal
application that set up the environment: directories, ports, etc.
and a start function that just returns a 404 if called. My server
sits behind Apache and only handles servlets, which I would like to
be demand load modules so they can be added to and updated easily.
That's why I am interested in being able to unload servlets on
command, though not necessarily all of them at once (although that
also is helpful).<br>
<br>
<br>
<blockquote
cite="mid:CAJYbDak29o47-yU5ONQy3DH+V+2DVCzT8UWqtaZNMsHAdb=JdA@mail.gmail.com"
type="cite">
<pre wrap=""><font color="#006600">> Not really knowing much about Racket's internals he naively asks:
> </font><font color="#006600"><font color="#006600">Could </font>a server pre-load the commonly used webserver modules and make
> </font><font color="#006600">them </font><font color="#006600"><font color="#006600">available </font>to new module servlets, or does the custodian
> </font><font color="#006600">implementation</font> <font color="#006600"><font color="#006600">make doing that </font>difficult/impossible?
This is the purpose of the make-servlet-namespace argument of
configuration-table->web-config@ but there is no option in the
configuration file for that argument.
<a class="moz-txt-link-freetext" href="http://docs.racket-lang.org/web-server-internal/Web_Servers.html?q=servlet-namespace#%28def._web-config._%28%28lib._web-server%2Fweb-config-unit..rkt%29._configuration-table-%7E3eweb-config%7E40%29%29">http://docs.racket-lang.org/web-server-internal/Web_Servers.html?q=servlet-namespace#%28def._web-config._%28%28lib._web-server%2Fweb-config-unit..rkt%29._configuration-table-~3eweb-config~40%29%29</a></font></pre>
</blockquote>
<br>
The namespace facility seems designed more for user written modules
than for library modules. <br>
<br>
My analysis may be off-base as I have very little experience working
directly with custodians, but it seems that when a dynamic servlet
is first loaded, its custodian spends a lot of additional time
(re)loading library modules that already exist in other custodians.
[ Though I can't tell exactly what's happening, I can see a lot of
disk activity when I think I'm loading a 5KB servlet. ] Reasonably
I would have expected that after loading/linking the first servlet,
the libraries common to the servlets would be already in memory.
But loading additional servlets is no quicker [ and causes a similar
disk hit ] so clearly I don't understand what is happening
internally with the custodians.<br>
<br>
If a Racket library is deliberately put into the servlet-namespace,
does that streamline linking?<br>
<br>
<br>
<blockquote
cite="mid:CAJYbDak29o47-yU5ONQy3DH+V+2DVCzT8UWqtaZNMsHAdb=JdA@mail.gmail.com"
type="cite">
<pre wrap=""><font color="#006600">> My application so far is based on stateful servlets and AJAX ... stateful
> mainly because it's easier for me to understand. Currently there is
> </font><font color="#006600"><font color="#006600">little use of </font>continuations, but some planned functionality will use them
></font><font color="#006600"><font color="#006600"> extensively and it certainly would </font>help if debugging didn't always mean
> </font><font color="#006600"><font color="#006600">starting over setting up conditions in the </font>application.
This comment/question is related to questions 4 and 5 from the FAQ:
<a class="moz-txt-link-freetext" href="http://docs.racket-lang.org/web-server/faq.html?q=servlet-namespace#%28part._update-servlets%29">http://docs.racket-lang.org/web-server/faq.html?q=servlet-namespace#%28part._update-servlets%29</a>
</font></pre>
</blockquote>
<br>
That link leads to a "troubleshooting" page 8-). I didn't consider
the issue to be a "problem" per se - I already knew that restarting
a stateful servlet would lose saved state. Most of my existing
servlets are one-shots that don't save any state, but they are
written using the stateful language. Only a few use continuations
and not extensively (so far). I was just thinking ahead to stuff
that will need to use continuations more extensively.<br>
<br>
Thanks for putting up with my questions.<br>
George<br>
<br>
</body>
</html>