Changes between Version 6 and Version 7 of soc/2007/cgi


Ignore:
Timestamp:
May 29, 2007, 1:01:51 AM (15 years ago)
Author:
Darren Garvey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • soc/2007/cgi

    v6 v7  
    22
    33Below is a partial list of things this project aims to provide:
     4 * '''Implement the Controller part of the [http://en.wikipedia.org/wiki/Model-view-controller model-view-controller] idiom'''
    45 * Simple access to standard CGI environment variables and input data.
    56 * Clean access to request meta-data (ie. 'environment vars') and input data using alternative protocols, such as FastCGI.
     
    111112The gateway is the abstraction of the interface with the server. This can vary from just an abstraction of std::cin/cout to a fully multiplexed set of connections, which can themselves be of more than one type.
    112113
     114=== ```cgi::acceptor<>``` ===
     115Accepts connections. This should probably accept on only one connection type (meaning the ```gateway``` would be responsible for retrying an accept on a different connection type if that's allowed by the current protocol.
     116
     117=== ```cgi::dispatcher<>``` ===
     118Completion handlers should be sent to a dispatcher to be called since a variety of dispatching methods should be available. The most basic/general is a thread-per-request dispatcher; more efficient would be a thread-pool dispatcher. Users should be able to implement their own dispatcher if they wish without having to know about any other class: encapsulation is important. ''Note: asio already has a dispatcher, so what can be used from that?''
     119
    113120
    114121=== Random Notes ===
    115122
    116123 * The active requests queue should hold ```boost::weak_ptr<basic_request<> >```s. That means that the request will be properly destroyed unless it's on the pending requests queue or actually being handled by user code. ''Note: to keep it alive during asynchronous requests, the user should be using a function object with a ```boost::shared_ptr<request_base>``` that they pass to the Handler given to the async request.
     124 * The standard CGI sub-library should be header-only. Ideally the other parts (eg. fcgi_service) will be either header-only or compilable, with compilable as the default: a multi-process FastCGI server pool is the most common use, so using a shared '[MVC-]controller' library is likely to be quite effective.