codesample-distributed's Introduction
The code sample demonstrates a client-server framework by exploiting multiple cores/machines to support machine learning and data processing tasks (e.g., MapReduce). The client-server framework has two players: a master and a set of workers. The master hands out jobs to workers and handles failures of workers via RPC (Remote Procedure Call). Asynchronous communications are provided between the master and workers. We showed an example that one master manages 10 workers handling 30 first-phase jobs (e.g., Map) and 60 second-phase jobs (e.g., Reduce). The code sample can be extended to support parallelization approaches in machine learning, including but not limited to: 1. Iteratively averaging parameters: run p learners on p workers in parallel and average their weight vectors on the master node. 2. Asynchronous SGD: maintain a single weight vector and for p parallel learners to update it simultaneously. ============= More Details =============== Master procedure (master.cpp): 1. A master splits work into a number of jobs. 2. A master registers a worker when a register RPC is received. 3. A master thread/node hands out jobs to the workers via asynchronous call. 4. A master waits for an available worker before it can hand out more jobs. Worker procedure (worker.cpp): 1. When a worker starts, it sends a Register RPC to the master. 2. If a job RPC is received, the worker (as an asynchronous server) will perform the computation (e.g., Map or Reduce), and send back the reply after the job is done.
codesample-distributed's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.