Previous week Up Next week


Here is the latest Caml Weekly News, for the week of June 22 to 29, 2010.

  1. Plasma MapReduce, PlasmaFS
  2. Symbol type
  3. Other Caml News

Plasma MapReduce, PlasmaFS


Gerd Stolpmann announced:
I'm very proud to announce the public availability of Plasma MapReduce,
a map/reduce compute framework, and PlasmaFS, the underlying distributed

Plasma MapReduce is a distributed implementation of the map/reduce
algorithm scheme. In a sentence, map/reduce performs a parallel
on an input file, sorts and splits the output by some criterion into
partitions, and runs a List.fold_left on each partition. Only that it
does not do that sequentially, but in a distributed way, and chunk by
chunk. Because of this Plasma MapReduce can process very large files,
and if run on enough computers, this also will work in reasonable time.
Of course, map and reduce are Ocaml functions here.

This all works on top of a distributed filesystem, PlasmaFS. This is a
user-space filesystem that is primarily accessed over RPC (but it is
also mountable as NFS volume). Actually, most of the effort went here.
PlasmaFS focuses on reliability and speed for big blocksizes. To get
this, it implements ACID transactions, replicates data and metadata with
two-phase commit, uses a shared memory data channel if possible, and
monitors itself. Unlike other filesystems for map/reduce, PlasmaFS
implements the complete set of usual file operations, including random
reads and writes. It can also be used as unspecialized global

Both pieces of software are bundled together in one download. The
project page is

This is an early alpha release (0.1). A lot of things work already, and
you can already run map/reduce jobs. However, it is in no way complete.

For discussions on specifics of Plasma there is a separate mailing list:

Symbol type


José Romildo Malaquias asked, Michael Ekstrand said, and Nicholas Kidd suggested:
> > Is there a symbol type in OCaml, with a constant time comparison
> > function? Something like symbols from Scheme and LISP or atoms from
> > Prolog. Useful in compiler construction.
> Not directly.  As I see it, you have two decent options:
> - Use/write a symbol table which "interns" symbols to integers.  The
> resulting integers can be compared.
> - Use/write a symbol table which interns symbols to unique string
> instances, so SymTbl.intern "foo" returns the existing string object if
> one already exists, and the string object passed in if it's never been
> seen before.  The resulting strings can be compared with == rather than
> = in constant time.
> Either of these options would be fairly similar to how symbols work
> under the hood in a Lisp implementation, I believe.
Use the Ocaml hash-consing library.
bluestorm also suggested:
If your set of symbol is closed, you can use a variant type (sum type). 

type symbols = 
| A 
| B 

If you really need open symbols, you can use [polymorphic variants]. 
Let tag_a foo = (`A, foo) 

 [polymorphic variants] 

However, you won't have convenience functions such as string_of_symbol; you 
would have to define them yourself. 

Other Caml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the Caml Weekly News the links to the
recent posts from the ocamlcore planet blog at

LLVM Backend for DDC.:

Post-OWASP AppSec Research:

FP-Syd #25.:

Plasma: Map/Reduce for Ocaml:

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.

Alan Schmitt