[Update] Dolphin Swazoo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Update] Dolphin Swazoo

Steve Alan Waring
Update on Dolphin Swazoo.

I have updated the Dolphin Swazoo port with the changes that Ken Tries
posted to the list including;

-Created the class SwazooURI and moved all url parsing/printing code from
HTTPRequest.
-Made SwazooStream compatible with the VW version.
-Added SwazooSocket with the VW class instance creation methods.
-Added the new URI resolution methods.

One other change I made, was to remove any change of state in HTTPRequest
during a resolution. To support this, the main "answer" method of a resource
is now sent the HTTPRequest message and the URIResolution. It can then query
the resolution for whatever information it needs. I have named the method
#answerTo:resolution:.

I have also added a class that I have named SwazooCacheControl. This takes
the HTTPRequest message and an object that I have called cacheTarget. A
cache target needs to implement two methods; #etag and #lastModified. The
SwazooCacheControl object knows to look at the request for cache
information, the version of the request, and create an appropriate response.

I have been playing around with Tomas Vanak's FasTalk code which is still
under development, but he was kind enough to send me his work in progress.
His website is http://www.vanak.cz

The port was made easy, because I was able to use SwazooStream in place of
the FasTalk's Squeak/VW ExternalStreams. As a proof of concept, I wrote a
"Responder" that creates an HTTPRequest message from the CGI parameters,
resolves it in a SwazooResource tree, and writes the response back out. The
interesting thing is that I was able to use HTTPServer, with the only change
that I could set the class of connections. Using a SiteAlias, I was able to
setup a site registry with an HTTPServer creating HTTPConnections on port
80, and Apache on 8080 with a FastCGI connection to a second HTTPServer
creating FCGIServices ... both accessing the same site!

FasTalk is a powerful implementation of FastCGI, and well worth having a
look at.  I only used a subset of the FastCGI protocol but I am planning to
do more work on this over the coming month to see if it makes sense to
deploy dolphinharbor as a single Apache server with multiple FastCGI
connections to Swazoo console apps.

Steve
www.dolphinharbor.org