From: Kirk Haines Date: 2004-08-09T00:33:14+09:00 Subject: Re: ANN: Iowa 0.9 Released On Sun, 8 Aug 2004 22:41:20 +0900, Ara.T.Howard wrote > iowa sounds a lot like fastcgi. besides from being a ruby > application with all that comes with that, how does it differ? > > - is there an object pool, or one responder object? > - does session affinity exist? > - how exactly would one use it 'with' fastcgi? Iowa is a framework for creating web apps and dynamic web content. It's only affiliation with FCGI is using FCGI as a mechanism for transfering the request from the web server to the Iowa process. BROWSER -------> WEBSERVER --[REQUEST_TRANSPORT]---> IOWA ^ | ^ | | | | | ----------------- --------------------------------- The browser sends it's request to the web server. Through some mechanism, the web server identifies that the request should be handled by Iowa, and transfers the request to the Iowa process. Iowa handles the request, returning content to the webserver which then returns it to the browser. The mechanism that I typically use for the webserver to identify requests that should go to the Iowa process is a mod_ruby handler. One uses regular Apache directives like to tell Apache what should be subjected to the handler's examination. The handler, in turn, uses a simple file of paths such as: / /index.html /my_application /images/project_gannt_chart.svg to know what it should pass on to Iowa and what it should simply let fall through for Apache to handle itself. The FCGI or plain old CGI support replaces the mod_ruby handler. If one does not run mod_ruby, one can use web server directives to decide what requests should go to Iowa. , , mod_rewrite rules, whatever. Those requests get to the Iowa process by going through a CGI or FCGI program that basically just constructs an Iowa::Request object (which is like a lightweight serializeable Apache::Request) and sends it to the Iowa process's communication's socket. Iowa handles the request, generating the content, and returns it back down the socket to the CGI or FCGI program, which then in turn sends the content back to the webserver as its own. The Iowa process is multithreaded. When a request comes into it, it dispatches a thread to handle the request. In a nutshell, this handler identifies which component the request needs to go to and passes responsibility to the component. Each piece of content, whether it be a full web page or just a piece of a page such as a header, footer, or navigation bar/box, is a component, and each component is an object. Each component is constructed of a layout section and a code section, with an optional bindings section. An example of layout:
Name: @user
Email:
Comment: