Look Ma, No Database

There are a lot of advantages to programming in a typed functional language like haskell. Certain bugs, like misuse of global variables, are virtually impossible unless you bend over backwards to do things wrong. Code tends to be incredibly short, and modular. The haskell community is very friendly, and with coders in every time zone the #haskell irc channel seems well populated seemingly 24 hours a day.

But we're here to talk about HAppS, not haskell.

What got me interested in HAppS was a strongly held feeling that as modern software systems tend toward ever increasing complexity, database usage is an unnecessary source of complication that should be factored out where possible.

Ruby's rails and python's django have become popular largely because of their object relational mapping systems, which hide the complexity of database engines by converting application data manipulation logic into sql. When I first used an ORM, it felt like a huge improvement over writing sql statements every time I wanted to manipulate an application's state. But pretty soon ORMs started seeming hackish to me too. At some point, the metaphors I wanted to use just broke down. $!Or to put it another way, that sql is an ugly hack. !$

HAppS is haskell's answer to rails and django (and perl's catalyst, and php). With HAppS, there is no wrangling data structures into and out of the database, because there is no database. You use whatever data structures are natural to your application, and serialize them transparently using powerful machinery that's running behind the scenes. And if there are existing databases that you need to connect to, you can do that too -- you're not locked in to using macid for everything.

MACID, the HAppS storage mechanism, is no vanilla serialization layer that will start acting in weird ways when an application has many concurrent users doing possibly conflicting things. By leveraging haskell's type system (see composable memory transactions paper), you get the same ACID guarantees that normally only come with a database.

There are some limitations to using macid as a datastore that you should familiarize yourself with if you are looking into using HAppS for heavy-usage transactional applications. But long term, HAppS with macid looks promising enough that I've started using it as a platform for building commercial web 2.0 type apps. (My first commercial happs app will be public soon, so stay tuned on techcrunch.   :)   )

In short, HAppS is awesome, and webmonkeys everywhere should use it. Except...

Well, nothing is perfect.