A JavaScript API for mapreduce resources in the cloud (MapReduce as a service)