mapreduce based on socket.io