Sean2108 / Distributed-Factorization-By-Trial-Division

A distributed client-server program to factorize a large number using brute force Trial Division method. Uses Java RMI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distributed-Factorization-By-Trial-Division

The server will send packages which are ranges of numbers to clients that connect to it. When a factor of the target number is found, the server and all clients will exit.

Server is run with runServer.sh in server directory. First argument is the number to factorize, second argument is the number of packages (degree of parallelism). Eg. sh runServer.sh 36893488065814724653 300

A larger degree of parallelism allows more clients to execute simultaneously but for smaller numbers, a low degree of parallelism is optimal due to unnecessary overheads when the server repeatedly sends small packages to the client.

Client is run with runClient.sh in client directory. No additional arguments are needed. eg.

sh runClient.sh

This program was created to demonstrate the effectiveness and increase in speed offered by distributing processes, however trial division is slow (exponential time) and should not be used for extremely large numbers.

About

A distributed client-server program to factorize a large number using brute force Trial Division method. Uses Java RMI.

License:MIT License


Languages

Language:Java 88.9%Language:Shell 11.1%