Skip to content

tomasreimers/cs262-final

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyShard

Created by Nicholas Mahlangu, Tianyu Liu, and Tomas Reimers.

Project Abstract

Currently, it is difficult to write a program that uses the power of multiple computers. We introduce PyShard, a Python library for writing multi-computer python programs. Pyshard allows simple distribution of work across a network using simple decorators and library calls. We find that the network time to pass data around is largely negligible (less than 0.3s) compared to the time it takes large workloads to run.

File Descriptions

  • unit_test.py
    • Some tests showing how the system functions
  • run_worker.py
    • Starts a worker that listens for "work" to do
  • lib/Nexus.py
    • Main part of the system that accepts "work" from the client, dispatches it to workers, monitors worker state, and hands the client results back as they are returned
  • lib/Resources.py
    • Defines "work" that a client wants to do and the objects that are sent over-the-wire
  • lib/Worker.py
    • Runs "work" assigned by the Nexus and returns its result to the Nexus

Requirements

Pip install:

  • dill
  • mock
  • flask
  • requests

Demo

In one terminal session run:

$ python run_worker.py

In another session on the same machine:

$ python example.py

Unit tests

$ python unit_tests.py

About

Sharding work across machines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages