Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.
jocelyn edited this page Jun 22, 2011 · 15 revisions

Table of Contents

Goals

Provide a framework to easily build web application with Eiffel, with the following requirements

  • portable web server framework: this means, platform independant, and web server independant solution, and even protocol independant (support for fcgi, cgi, ...)
  • up-to-date with Eiffel: standard syntax, and void-safety by default
  • framework to help the user to build quickly a web application (RESTful service, CMS web interface, XML-RPC ...)
  • be adopted by the Eiffel community, and let it grow with quality and rich set of features

Context

Currently there are a few web solutions in Eiffel

  • EiffelWeb: which is quite poor and not usable for non trivial site
  • Goanna: which provides FastCGI, CGI and standalone, but based on EPOSIX which does not seems that portable (many C external works only on Linux/Unix), and it is not Void-safe.
  • Xebra: experimental solution which works for Apache2 and maybe IIS, but it is embedded in a auto-re-compilation system which make it not that flexible for any context. Then it is not portable easily on any web server.
That's why we decided to start a new framework very flexible, so that at some point we could "port" part of Goanna, and Xebra to EiffelWebReloaded. It must be void-safe, provide solution to run on any web server, and not dependent on any httpd connector (FCGI, CGI, ... ), but could use any of them. Then we will be able to build the web server application using a common code, and decide to use FCGI or CGI, or anything else at compile time or even at run-time (the various connectors can be compiled in the same Eiffel system without any trouble).

The REST libraries were built mainly to demonstrate the flexibility of the framework. Once we have a solid, reliable base for the httpd library, we'll add more utilities classes, better MIME functionality, new authentication, and hopefully we'll try to port existing solutions on top of EiffelWebReloaded.

Current state

  • the EiffelWebReloaded is composed of many libraries, which could be categorized into server, client, and utility, and it is far from being complete, but it can already be used.
  • Server libraries under "library/server" folder
    • httpd: the common interfaces to build a httpd application, this is protocol independant. It will rely on httpd_connector implementations
    • httpd_connector: this bring the protocol "implementation" of the httpd interfaces. Currently it contains the following support/connectors for
      • cgi: support to build web application based on CGI protocol, this has performance limitation, since the server is executed for each request, however this provides an easy integration to most of the web hosting service
      • fcgi: support to build web application based on libfcgi. It is similar to CGI, except that the FCGI server is run once and handle severals requests (According to the associated web server configuration). See below fcgi
      • nino: support for the EiffelWebNino httpd server. See below nino
      • note: we could also try to adapt Goanna connector to be used with this framework
    • fcgi: wrapper for the libfcgi SDK. It contains a modified version of the libfcgi to be compilable on win64, and it adds a new function to ease integration on Windows.
    • nino: a httpd server implemented with Eiffel. Either single-thread or multi-threaded. It is a basic and simple server, very useful to develop, debug, and test web application without the need to configure Apache or IIS, ..
    • rest: an implementation to provide RESTful service, based on httpd library . It includes an auto-generated API documentation.
    • XML-RPC, ... will come later
    • note: we could also try to adapt Goanna web library (servlet, ...) to be used on top of the httpd framework.
    • note: fcgi and nino can be used by them self without integration to the httpd framework, but using the httpd framework provide portability over connectors
  • Client libraries under "library/client" folder
    • rest: an implementation to consume RESTful services. Obviously this works fine with the server rest library. But this can also be used with popular services such as twitter (except that currently there is no OAuth implementation).
    • XML-RPC, ... will come later
  • Utility libraries under "library" folder
    • error: very basic component to handle errors
    • logger: very basic component to log message (currently to file, or console)
    • text/encoder: it currently supports base64, url-encoded, and xml encoding and unencoding implementation.
    • text/json: JSON parser library
Notes:
  • json, nino are external contribution from Javier Velilla (with inputs from Paul Cohen, and Jocelyn Fiat)
  • the rest of the libraries were developped for EiffelWebReloaded.
  • currently all the code from EiffelWebReloaded is void-safe, tested using EiffelStudio 6.8

Information

Warning:

  • The current interfaces are not fixed, and might change before we get a first release. The 25th of June, there is a Design Feast at Zurich focused on Web Development, and it is likely to impact on the current project. There is also the netc workshop for the community which might impact this project as well.
To summarize currently (2011-05-31), any one can build easily an Eiffel Web application using EiffelWebReloaded. That is to say for instance a Web site, a CMS, or RESTful services. And this works on Windows, Linux, using either FCGI, CGI or EiffelWebNino. Using CGI and FastCGI, this allows to use any popular web server such as apache2, lighttpd, nginx, ...
Clone this wiki locally