I'm ongoing to explore Erlang. I'm considering beginning my next web project using Erlang, and at this time the only real factor I'll miss from Ruby on Rails is ActiveRecord.

It is possible to good option technology for Erlang?

Update: The nearest I have started to an answer would be to ErlyDB, a part of ErlyWeb.

ErlyDB is really a database abstraction layer generator for Erlang. ErlyDB combines database metadata and user-provided metadata to create functions that allow you to perform common data access procedures within an intuitive manner. It offers just one API for working with various database engines (although presently, only MySQL is supported), allowing you to write portable data access code.

I do not think there is really during the time of this writing. That might be because the sorts of systems being designed in erlang and the kind of people writing them don't really demand Relational Databases. I see a lot more code using mnesia, CouchDB, Tokyo, japan Cabinet along with other such alternative database technologies.

That's not saying someone may not are thinking about creating something similar to active record. It is simply has not really been a necessity yet. Maybe you'll be the very first? :-)

Well, the main benefits of ActiveRecord (when i view it) are:

  1. You are able to persist your objects inside a relational database nearly transparently.
  2. Searching the database by any attribute of the objects.
  3. You are able to validate objects when persisting them.
  4. You could have callbacks on removing, upgrading, or placing objects.

With Mnesia:

  1. You are able to persist any Erlang data absolutely transparently.
  2. Using pattern matching, searching the database by any attribute of the data or their combination.
  3. QLC provides you with a pleasant query interface for times when pattern matching is not enough.

No solutions for validating and callbacks, however...

So, what else have you got in ActiveRecord that's missing in Mnesia?

Some searching discloses libs / clients / wrappers for Couchdb referred to "ActiveRecord like libraries like CouchFoo", and advise to stay away:

http://upstream-berlin.com/2009/03/31/the-case-of-activerecord-vs-couchdb/

http://debasishg.blogspot.com/2009/04/framework-inertia-couchdb-and-case-of.html#

regarding your discuss "not suited to web applications yet", I believe the pieces exist: mochiweb, couch, yaws, nitrogen, erlyweb. There's some effective tools, completely different paradigm, certainly, from rails, django and PHP.

You may be thinking about Chicago Boss's "BossRecords":

http://www.chicagoboss.org/api-record.html

They're quite clearly patterned around the Active Record pattern, and employ lots of compiler miracle to create the syntax squeaky clean. BossRecords support save/validate in addition to has_many/goes_to associations. Characteristics inside your data model are created available through produced functions (e.g. "Worker:first_title()").