Giter Club home page Giter Club logo

mr-node's Introduction

MapReduce in Node

A MapReduce framework written in Nodejs that coordinates a master node and multiple distributed worker nodes to collectively run map and reduce jobs in parallel. Communication between nodes uses Google's RPC framework gRPC This project is a work in progress.

Currently this only supports WordCount (counting number of occurrences of each word) of the input textfile that is passed to master. I'm working on extending this be able to use any user-defined map or reduce functions.

Getting started

Installing dependencies (only needed when running locally):

$ npm i

Make sure to copy the text file to be processed into the root directory. This will later be copied into the docker image for master.

Docker

Building docker images mr-master and mr-worker:

$ docker-compose build

Running docker-compose to start the containers and begin running MapReduce:

$ docker-compose up

Running locally

Alternatively, you could also run master locally:

$ node index.js master -f input.txt -m 2 -r 2 -a localhost:5050

and running a worker locally in a different process:

$ node index.js worker -m localhost:5050 -a localhost:6000

mr-node's People

Contributors

mutaphore avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mr-node's Issues

Add logging system

Need to implement a robust logging system to replace console.log (i.e. bunyan?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.