dpbriggs / distributed-sieve-e Goto Github PK
View Code? Open in Web Editor NEWDistributed Implementation of the Sieve of Eratosthenes
License: Eclipse Public License 1.0
Distributed Implementation of the Sieve of Eratosthenes
License: Eclipse Public License 1.0
Distributed Sieve of Eratosthenes David Briggs Source files: src/mail-sieve-e/* Github Page: https://github.com/iMultiPlay/Distributed-Sieve-e Default setup (Run "Run Lead.bat") expects 3 machines. Run "Run Lead.bat" once and "Run Follower.bat" twice. Runs on port 10001. Custom implementation of the Sieve of Eratosthenes (https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) Description -- This Sieve is designed to be able to compute primes between several machines (over the internet). Rather than listing all of the natural numbers, this sieve starts at 3 and skip counts by two. Each machine recieves an evenly sized chunk to process. If we wanted to compute the primes below 10000 between two machines, each machine would compute chunks of size 5000 (due to optimizations this is lowered to ~2500). Machines are ordered starting at 1, with the lead machine starting at one. All other machines are followers, which report to the lead machine. When machines mark a new prime, they report a vector of the machine number, prime position (in their chunk), and the prime. All machines with a number greater than the reporting machine recieve and process this vector. All communication between machines is done with sockets, with the lead computer acting as the middle man between all of the following machines. Algorithm -- Lead: - Mark first non-zero number in the chunk as prime - Send prime vector to respective computers - Mark composites of prime - Find next non-zero number, repeat until there is no non-zero numbers after last prime. -> if no non-zero primes left, elect next machine in sequence as lead. Follower: - Wait for prime vector. - Process prime vector, marking all composites of the prime number. - If given an appoint sequence, check if appoint sequence is from previous machine. If it is, start sieve as Lead machine. - Repeat.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.