Eiffel Web Framework


Currently the design of the EWSGI is not going very fast, mainly due to conflicts for the core design.

Let's try to summary today's points of conflict between Paul's proposal, and Jocelyn's proposal. Since Paul put the specification on the wiki from Seibo Solution Studio, and Jocelyn is implementing the proposal withing the current Eiffel Web Framework. (If other proposals are provided, we'll compare them to those 2 existing proposals.)

Let's name the Seibo-EWSGI proposal and the EWF-EWSGI proposal.

Of course, the goal is to have only one specification, but it is good to have more than one proposal. So that we really try to specify the best EWSGI as possible.

Let's remind that EWSGI is meant to be a specification, and we are looking at Specification-Compliance for the future implementation (so this is mainly about class names, and feature signatures. I.e the Eiffel system interface).

Note: to make the code shorter, we will not always include the prefix EWSGI to the class name. Note2_: we will use the term of "user" for the developer using the EWSGI specification and/or implementation(s)

General goal

At first, the main difference between Seibo-EWSGI and EWF-EWSGI is a tiny nuance on the general goal. Seibo-EWSGI: get web application portability across a variety of web servers. EWF-EWSGI: get web application portability across a variety of web servers including connectors.

Both are following the CGI specification.

To resume, the goal is to get an Eiffel Web ecosystem based on EWSGI specification which allow to write components, libraries, applications based on EWSGI, and which can be compiled and used without changes on the various EWSGI implementations. EWF-EWSGI is also targetting to make the connector implementations portable on the various EWSGI implementation. However this is not the most critical point, and could be address in later specification version, or maybe a specific EWSGI/Connector specification ...

Conclusion: the general goal is (merely) the same for both proposals. That is a good point, otherwise no need to compare the 2 proposals

Main entry point for a Web application component

This is the first important difference in the class EWSGI_APPLICATION

Seibo-EWSGI:

response (request: EWSGI_REQUEST): EWSGI_RESPONSE is
        -- The response to the given 'request'.
   deferred
   ensure
       Result.status_is_set
       Result.ready_to_transmit
   end

EWF-EWSGI:

execute (req: EWSGI_REQUEST; res: EWSGI_RESPONSE_BUFFER)
        -- Execute the request
        -- See `req.input' for input stream
        --     `req.environment' for the Gateway environment    
        -- and `res' for the output buffer
    require
        res_status_unset: not res.status_is_set
    deferred
    ensure
        res_status_set: res.status_is_set
    end

So the main difference is for the user/developer Seibo-EWSGI: the user has to create the RESPONSE object. EWF-EWSGI: the user has the RESPONSE_BUFFER object passed as argument, and it is ready to use.

The consequences are important because

Notion of output stream

As you might noticed In EWF-EWSGI, the output stream is kind of hidden and replaced by the output buffer, which is in fact quite similar. However the goal is to allow the user to send immediately the message parts to the client as simple as writing in the buffer. The EWSGI implementation will handle this buffer to integrate nicely with the underlying web server techno. This will be done through the implementation of the various connectors.

In Seibo-EWSGI there is NO notion of output stream, this is to handle the potential case of a HTTP server technologies following CGI specification but without any output stream. The read_block pattern allows the user to send a big response part by part, and/or also send some message parts immediately to the client during the transmission, this looks like a delayed computation of the messages.


So for now, those are the main critical (blocking) differences I (Jocelyn) can see.

Personal point of views

(Feel free to add your own point of view)

Jocelyn

Others ... ?

Please contribute ... correct also the wiki page if there are mistake or misunderstanding.