WIP: some rough sketches and ideas around map reduce interface for queries.