[Haskell] Re: Trying On Learn Haskell Web Server

Mattias Bengtsson moonlite at dtek.chalmers.se
Tue Mar 7 14:30:54 EST 2006

On Tue, 2006-03-07 at 00:06 +0100, Niklas Broberg wrote:
> On 3/6/06, Graham Klyne <GK at ninebynine.org> wrote:
> > - An easy way to map incoming URIs to specific functions (hmm.. or to monadic
> > values, I think)
> I don't think I understand what you're after exactly, but I'm sure
> it's interesting, care to explain a bit further? :-)

Hm, i remember seeing this in ruby on rails i think.
You would like to be able to map http://www.domain.com/show or
http://www.domain.com/show etc. to haskell-functions that spits out
webpages. With all this defined in one file?

> > - Easy mapping from Haskell data structures to underlying SQL - what would be
> > called an Object-Relational Mapper (ORM) in OO languages
> Some of our students are working on bringing the power of Ruby/Rails
> to HSP, with emphasis on smooth database interfacing. Not sure exactly
> what this entails though, I've never used Rails... :-)

This is basically some sort of database abstraction which is somewhat
inspired by ActiveRecord in Rails. In short we let the programmer define
its database in a spec-file. Mostly things you'd do anyway using a list
of CREATE TABLE in an SQL-file. 
However we have a different syntax and some extra attributes that can be
set to define what sort of relations different tables has to each other
(one to one, one to many and many to many). We plan on extending this
later (maybe software TRIGGER's and CASCADE'ing and some sort of

This spec-file is then supposed to create an empty database conforming
to the spec and Haskell modules containing HaskellDB defintions together
with generated helper functions for retreiving data from your database.
This together with support for "Higher Order Queries" should make it
both easy and fast to do database actions without giving up on
flexibility. At least that is our goal.

> >
> > - Handling of interaction with a browser-side Javascript library for smoother
> > AJAX support
> This is not currently present in HSP, but they are surely on the
> conceptual todo-list. There is a design for a crude JavaScript
> support, but we'd certainly need more.

This is quite important.

> > - Options to run the whole thing behind Apache to leverage its security and web
> > space management capabilities
> Lemmih has implemented a HSP/FastCGI binding for Apache. I also know
> that work is being done on building a direct HSP/Apache binding. All
> work in progress though.

Yes. Two guys in my group is working on this. Haven't made any progress
as of yet though.

> > I think that continuation-based web session state management, ala
> > Smalltalk/Seaside, would be a very natural fit for a Haskell framework -- all
> > handled by a "Web session monad", maybe.  (Or maybe I just don't know what I'm
> > talking about ;)
> This is by far the biggest drawback of HSP today. There is no
> high-level support for continuations (other than explicitly defined
> continuations at top level).

I would really like to know exactly what this means. Are there any
examples or papers on this?

> > How far are we from having such a framework for Haskell?
> Depends on how many people would be willing to invest time in it.
> Right now we have students at Chalmers working on a project that aims
> towards such a framework, but they can only do so much in the time
> they have. We would surely welcome any help we could get. :-)

Hopefully we will a real homepage up pretty soon and tell the world what
we are working on. Hopefully some of us would like to actively continue
on this project after spring when we need to show something.


More information about the Haskell mailing list