Take the 2-minute tour ×

There are many datastores written in Erlang, for example Riak, Dynomite, CouchDb, Scalaris, have I missed any?

I know that Java and C/C++ have also been used to write datastores (Cassandra, Hypertable, etc), but have any Datastores been written in any other functional languages such as F#, Scala, Haskell, Clojure, etc? The reason I am asking this (and many other functional programming and Erlang type questions) is to assess the feasibility of functional programming languages for real world projects.

As a side note it has been pointed out to me that I mean the actual implementation language of the datastore itself, and not the client language to access the datastore (ie: via ODBC).

share|improve this question
To the first part: Yes. Mnesia comes with Erlang ;-) –  ConcernedOfTunbridgeWells Feb 5 '10 at 10:12
I'll just mention that Scala, as opposed to the other languages you mention, is mostly an Object Oriented language, which happens to integrate Functional Language features. It's creator has recently called it "post-functional". –  Daniel C. Sobral Feb 5 '10 at 11:10
Ok,so I should probably remove Scala from the list if it is mostly OO? –  Zubair Feb 5 '10 at 11:27
Depends if you are asking whether Scala can build a good datastore where you can take advantage of its functional features (answer = yes), or whether it is practical to use a purely functional approach to build a datastore (answer = you likely wouldn't make it 100% functional with Scala; other languages like Haskell are better test cases). –  Rex Kerr Feb 5 '10 at 14:03
add comment

4 Answers

up vote 8 down vote accepted
  1. Data.Tcache is a transactional cache with configurable persistence for Haskell.
  2. Elephant is a persistent object database for Common Lisp with full transaction semantics.
  3. CLSQL - a SQL database for Common Lisp interface.
  4. AllegroCache is a high-performance, dynamic object caching database system for Allegro Common Lisp.
  5. Spark-Scheme comes with a built-in database and ODBC support.
share|improve this answer
Brilliant, I will look into these. Thanks –  Zubair Feb 5 '10 at 9:50
I had a brief look at these. Spark seems the nicest, but has the worst website :) Do any of them work in clustered settings? –  Zubair Feb 5 '10 at 9:54
@Zubair Thanks for the favorable comment on Spark. That is my personal Lisp! About the website, do not have enough resources (all of time, money and personal) to create a better one. –  Vijay Mathew Feb 5 '10 at 10:08
add comment

In one sense you have already answered your own question. The systems you mention, and others from the comments, ARE written in functional langauges and ARE definitely real world projects, so the answer is yes.

share|improve this answer
add comment

FleetDB is schema-free database in Clojure.

share|improve this answer
add comment

Your question puzzles me a little. You ask about datastores written in a variety of languages. Generally, when I program I look for a library or API to get and put data from and to the datastore in my chosen language. What the underlying datastore is written in (if it's written in anything, some datastores are no more than file layouts) I do not care.

And on that basis a little Googling will turn up Haskell-to-ODBC libraries, and I imagine the other languages will have similar facilities. I have no knowledge of these, so won't comment on their suitability for projects.

share|improve this answer
Yes, you are right, I did not explain it so clearly. I did mean the "underlying" data store as you pointed out. –  Zubair Feb 5 '10 at 9:22
Also, interesting point you made, which datastores are just file layouts, as I would like to evaluate them? –  Zubair Feb 5 '10 at 9:42
Really? Are you sure, that application data storage which doesn't copy data between processes of application and db doesn't have some benefits? Performance? In this case data store in specific language have big sense. Ordinal embedded db is not solution here because necessity of boiler plate. For example It is why mnesia in Erlang have big sense in some cases especially with native "stored procedures" and transactions (distribution involved). –  Hynek -Pichi- Vychodil Feb 5 '10 at 10:09
Well, I guess when I think of a datastore I think of something persistent, something on disk, in which case yes, accessing data storag has to transfer data between disk and memory. And yes, there are cases where it is advantageous to have a very close fit between your programming language and your data store. But it is not necessary that the datastore be written in the same language as your programs. And, if you work in multi-language environments, as many of us do, which language do you choose ? –  High Performance Mark Feb 5 '10 at 11:50
@Zubair: have a look at HDF5 or netCDF for data formats which are suitable for large datastores but are really just file layouts. Then, invent your own file format which contains all the information you need, translate it into a binary form, and there you have your own datastore which is language independent. –  High Performance Mark Feb 5 '10 at 11:51
add comment

Your Answer


