chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Standard APIs for databases, Web-apps


From: Graham Fawcett
Subject: [Chicken-users] Standard APIs for databases, Web-apps
Date: Fri, 10 Feb 2006 11:29:29 -0500

I'd like to open discussion about introducing two formal APIs for use
in the development of future Chicken eggs: a standard API for
accessing relational databases, and a standard API for connecting Web
frameworks/applications to HTTP servers or *CGI gateways.

Adding proper interfaces at these two points would serve multiple
duties, including (a) easier porting of code from one backend
(database or Web server) to another, and (b) the opportunity for
"middleware" components (such as O/RM mappers on the database side,
and mod_* style components on the Web side).

Two popular database APIs in other languages come to mind: JDBC (Java)
and DB-API (Python). Neither is a perfect fit for Scheme, though the
simplicity of DB-API might make it a good source of ideas. I don't
know whether a similar layer has been implemented in some other
Scheme.

On the Web front, I would love to see something like the WSGI proposal
that is current in the Python community. WSGI is somewhat analagous to
CGI (the interface, not the execution model): it's an in-process
contract between server-communication code on on side (scgi, fcgi,
tcp-server) and Web application code on the other. This decoupling
allows the vast sea of Python Web frameworks to share common Web
server bindings, and lets those frameworks share middleware components
(authentication, logging, content-validation, etc.) as well as
higher-level components from other frameworks.

I'm currently working on an SCGI adapter for Chicken; I'd like the
"inside" of this adapter to speak a WSGI-like protocol. Ideally, I'd
like to help rework Spiffy's internals, so that it could speak the
common protocol, and decouple it from http-server at its dedicated
back-end. I'd be happy to discuss implementation details with anyone
who's interested.

I don't follow developments in other Scheme implementations; it's
possible that suitable modules could be borrowed from other projects.

Is there interest in either (both?) of these proposals?

Graham




reply via email to

[Prev in Thread] Current Thread [Next in Thread]