GithubHelp home page GithubHelp logo

eecs485-discussion8-demo's Introduction

P4 Demo

This repo contains two highly simplified demo directories: mapreduce and threads_and_sockets

We hope that these demos provide a foundation for you to get started on Project 4. You will have to build on the concepts presented in this demo, the spec, and the lecture slides in order to build a fully functional MapReduce server like the one necessary for P4

mapreduce

To run the finished job, use the following:

$ cat input/* | python wc_map.py | sort | python wc_reduce.py

You can also use the script wc.sh, which is simply the above bash command written in an executable script

$ ./wc.sh

You should see the following output when completed:

(targaryen?)	1
are	            1
arya	        1
best	        1
characters	    1
daenerys	    1
game	        1
jon	            1
lannister	    1
ned	            1
of	            1
snow	        1
stark	        2
targaryen	    1
the	            1
thrones	        1
tyrion	        1

threads_and_sockets

To run this portion of the demo, open two terminal windows and navigate to the threads_and_sockets directory. Then, create and activate a virtual environment.

$ python3 -m venv env
$ source env/bin/activate

Then, install the dependencies for the demo.

$ pip install -e .

From one window, run the following:

$ python listen.py

From the other window, run the following:

$ python send.py

There are lots of comments explaining the complicated socket code that you hopefully find helpful. Please reach out if you have any questions.

eecs485-discussion8-demo's People

Contributors

nicksmart avatar ayushah avatar

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.