Tuesday, August 02, 2011


From controller to request processing

Some lower level details: obviously the controller listens on a socket, as soon as a connection is received, it handles this to a separate thread.

The separate thread should handle everything else, which means reading environment/get/post/cookie variables, merging them, and handling the actual request. It's a bit unclear if The Eiffel Web Server Gateway Interface covers this properly. The spec appears to say yes, some of the code I've seen says no, but this can be easily fixed.

Frameworks like this often provide url to handler mapping, but as I'm targeting a REST based framework, this works somewhat differently, and therefore I'll discuss possibilities and options in a later post.

I wouldn't need authentication as the web server should handle this. Else resources not controlled by the Eiffel app (files) cannot be protected without hard-work.

Authorisation is necessary, and often complex. I'll probably like to have some configuration mechanism, but it would be nice to have a central place of configuration. So could have a reusable authorisation class that takes the name of the user, the verb (GET/PUT), and the variables, and returns TRUE/FALSE and some error text. Might want to have the ability to do an override at the lowest level (resource) as well.

More on resources in the next post.

About Eiffel Web Framework, it seems to me , that the connector (i.e the controller) is handling the httpd connection (listen on socket for instance), and then prepare a REQUEST (with environment, get, post, cookie variable), and a RESPONSE_BUFFER to write back to the client
So I guess the code, is doing what you described.

Otherwise, for url to handler mapping.
I made an attempt using either URI or URI-template

Please, see https://github.com/Eiffel-World/Eiffel-Web-Framework/tree/master/library/server/request/router

to be continued
Hey Berend, this was a really useful post on the Eiffel request processing.
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?