[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

loading additional code


i'm currently developing a http server in mzscheme.  it already serves static
content, but i'd like to give it the ability to load up additional pieces of
code - perhaps similiar to Java servlets, or perhaps there's a better way to
accomplish such functionality in Scheme?

i have two ideas to do this:
1. create a new namespace/custodian, load a file which would have to define a
   http_post function, and call that function.
2. force the user to place his methods inside a unit - load up that unit and
   pass the request and session variables into the unit's import clause.

which way would be better?  i'd like to cache the 'servlets' and invoke functions
defined by them from various threads - which way allows me to accomplish it?
in the future - i'd like to make sure that the code inside a 'servlet' isn't
able to access any data outside it's unit - how will that work with caching the

i'm also planning to develop some kind of JSP equivalent for scheme.  i don't
think custom tags will be needed, because scheme is so readable and 'natural'
that it can be seamlessly included in the HTML code like:
	<(reqparam "foo")>
would display a request parameter "foo", contrary to the long and dirty
java code for the same:
	<%= request.getParameter("foo") %>

is this the right way to go?  or perhaps i should experiment with XML related
code in http://pobox.com/~oleg/ftp/ and go some other way?

thanks for any comments.  i'm going to make the server open source as soon as
it reaches some sensible state.  if You have any suggestions/ideas - please let
me know.

also, is it possible to make the mailing list archives searchable?  i've tried
to browse them to find answers to my questions but it really took too long..