FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DSP V0.0 - Alpha (July,2004)

 
Post new topic   Reply to topic     Forum Index -> DSP
View previous topic :: View next topic  
Author Message
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Mon Jun 28, 2004 7:22 pm    Post subject: DSP V0.0 - Alpha (July,2004) Reply with quote

DSP V0.0 - Alpha (July,2004)

RELEASE NOTES

The engine at the moment is merely a prototype, with absolutely
no guarantee that it will build on your system. It simply hasn't
been tested enough outside of my development environment at this
time. Right now, it will only run under Windows environments,
but I have encapsulated some of the more OS-specific portions, so
porting it shouldn't prove too difficult. This goes for the
engine module as well as the Apache server module.

I anticipate that the project will approach a Beta quickly, and
kludged releases like this will be soon a distant memory. Smile

For now, please feel free to indulge your curiosity with the
files provided in this distribution.

- Eric Anderton


DSP RUNTIME

The DSP runtime is composed of two major parts: the Servlet
Engine and The Servlet Stub.

The Servlet Engine is where all the real work is done. Requests
are received and boiled down into a request for one or more
servlet dll's, via their source code files (.dsp files). These
dll's go through a lifecycle of build, cache and regenerate
depending on the age of the servlet and it's dependencies.

The Servlet Stub is a library that the Servlet Engine uses to
link new servlets into servlet dll's. The stub itself contains
all the dll startup and servlet management code, which is
identical from servlet to servlet. It is a major factor in
reducing compile time for servlets.


DSP APACHE MODULE

The apache module, mod_dsp, is also a prototype web server module
for DSP. Please read the mod_dsp.conf file for an example on how
to configure this module for Apache. Also, please bear in mind
that I have opted to maintain this module in C due to the fact
that attempting to port the entire APR over to digitalmars' C
(let alone D) has proven a task far too big for this developer.
Building a C module was not only documented online (albeit not
that well) but proven to be done on Windows as well as elsewhere.

The configuration only needs to know where to find the DSP
runtime, the cache folder and the dmd runtime (so it can compile
code). Also, the name of the Servlet Engine dll needs to be
set in mod_dsp.h (SERVLETENGINELIB_STR) so the module may find
the correct library.

There is also a known issue with shutdown of the module. The
DSP Servlet Engine dll will fault. This extends the shutdown
time of the server greatly, but if left to its own devices,
will eventually release all dll's and resources upon termination.
I have narrowed this problem to D dll's interacting with Apache
in particular, but have yet to find out exactly why this is
happening.


BUILDING

mod_dsp.dll:
trunk/mod_dsp/mod_dsp.c
trunk/mod_dsp/mod_dsp.h
libhttpd.lib (apache 2.0)
aprutil.lib (apache 2.0)
libapr.lib (apache 2.0)
libaprutil.lib (apache 2.0)

servletengine.dll:
trunk/mod_dsp/common.d
trunk/mod_dsp/extfile.d
trunk/mod_dsp/parser.d
trunk/mod_dsp/servletparser.d
trunk/mod_dsp/applicationparser.d
trunk/mod_dsp/engine.d
trunk/mod_dsp/servletengine.d
trunk/mod_dsp/servletengine.dep
concurrent.lib (D Concurrent lib)
(See http://www.dsource.org/projects/concurrent/ for more info)

servletstub.lib:
trunk/mod_dsp/common.d
trunk/mod_dsp/extfile.d
trunk/mod_dsp/servletstub.d
trunk/mod_dsp/servletstub.def


DEPLOYMENT

<dsp runtime path>/servletengine.dll
<dsp runtime path>/servletstub.lib
<dsp runtime path>/servletstub.def
<dsp runtime path>/servletstub.d
<dsp runtime path>/_cache/ (directory needed for cache to function)
<apache module path>/mod_dsp.dll
<apache config path>/httpd.conf (add settings for mod_dsp)
<dsp example web path>/test.dsp
<dsp example web path>/.dsp
<dsp example web path>/test.dsp
<dsp example web path>/test.dsp.d
<dsp example web path>/formatter.dsp
<dsp example web path>/datetime.dsp


TODO FOR V0.1

The whole mess needs to be retargeted for Mango for a whole
host of reasons. This will trigger a complete rewrite of the
runtime and the stub. Furthermore, the apache mod may be made
more mango-aware, and possibly neutral to DSP entirely. <g>

The parser is also very brittle and needs some enhancements
to improve error reporting and the context-sensitive nature of
various tags and tag groupings. The parser also needs a
metadata facility of some kind to track what has been added to
the servlet so far, to further enhance its capabilities. Taking
advantage of string buffers rather than using concats (~) will
enhance the parser's performance.

The grammar is somewhat deviant from the user's guide supplied
for this project. This is completely intentional, as this
prototype implements an older DSP grammar I was working with.
the user's guide contains the direction I wish to pursue, barring
any contributed improvements and/or suggestions.

The only cache-type supported is 'flat', but I have plans to add
a more structured (and less collision-prone) type that should
be closer to a final design. For now, keep in mind that servlets
that share the same name will overlap in the cache and cause
problems.

Lastly, the source is lacking some major D-isms including DBC
and unit tests.

- Rewrite for Mango
- ANT build scripts
- Debug and clean up Apache module
- Improve parser design and performance
- Support new DSP grammar
- Redo caching
- Provide DBC and unit test code.
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon Jun 28, 2004 7:48 pm    Post subject: Reply with quote

Wow! This looks totally cool Eric ... I'll have to dig into it next weekend. BTW, do you know of anyone who knows enough about OpenSSL to hook it up to Mango?

Nice work dude!
Back to top
View user's profile Send private message
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Mon Jun 28, 2004 8:00 pm    Post subject: Reply with quote

kris wrote:
Wow! This looks totally cool Eric ... I'll have to dig into it next weekend. BTW, do you know of anyone who knows enough about OpenSSL to hook it up to Mango?

Nice work dude!


Thanks for the compliments. I worked pretty hard to kick my code into decent enough shape to at least show. I hope you find it a good read.

As for an OpenSSL developer, I haven't a clue. I'd stick to asking in the NG (I think you've already asked there, right?) and seeing if you get a bite. Then again, maybe I should d/l it myself and see what all the hubub is about.

But if I manage to find one, I'll gladly trade 'em for someone with Apache module building experience. Online documentation on the topic is *very* thin, and I must be missing something since there is a world of difference between my module and others out there (mod_mono and mod_php for example) Wink
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DSP All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group