I created new project for distributed computing. It is successor of my previous project, distributed prime searching in browser.  Improvements from my previous project: * Larger workunits (workunit size can be changed without stopping project) * Using JS threads * Different types of workunits are possible * Checking workunit results between users Project in beta now. That means I can reset results when needed (but not your payouts). After some time I create release and move project to external hosting. Currently it hosted on my netbook. # Current project Twin primes - finding twin primes below 9×10<sup>15</sup> ([wiki link](https://en.wikipedia.org/wiki/Twin_prime)). Value 9×10<sup>15</sup> is upper limit of javascript integer variable. It could be avoided later. # Rewards Currently 0.0001 GRC per completed workunit. It could be adjusted later. Payroll happens daily. # Future plans I'm planning to implement next projects here: * Amicable checker - check if BOINC amicable numbers didn't miss any amicable numbers. * Collatz checker - analog for collatz conjecture. * Anybody can add their own function - function format is easy as possible (but there is some limitations, because storage is limited). Also you can run your own instance, project is opensourced. # Checking function Each project should have checking function in JavaScript. Input is interval: start number and stop number, they are received with message. Function reports progress and results (when done). As I said above it's pretty easy. Sample for prime twins searching: ```` // Event listener. Listens to message with input parameters self.addEventListener('message', function(e) { var thread_index = e.data[0]; var workunit_result_uid = e.data[1]; var start_number = parseInt(e.data[2]); var stop_number = parseInt(e.data[3]); var version = 1; // Check each number and report progress function check_number_seq(thread_index, start_number, stop_number) { var number; var seq_result = []; var is_prime; var progress = 0; progress_report_interval=Math.floor((stop_number-start_number)/100); progress_report=start_number; if((start_number % 2) == 0) start_number++; for(number=start_number; number<=stop_number; number+=2) { // Check number result = check_number(number); if(result !== null) { // Add number to results seq_result.push(number); // Optimization - next 4 numbers can be skipped number+=4; } // Report progress if(number > progress_report) { progress=(number-start_number)/(stop_number-start_number); self.postMessage([thread_index,0,progress]); progress_report+=progress_report_interval; } } // Return result return seq_result; } var result = check_number_seq(thread_index, start_number, stop_number); // Return result with message to parent thread self.postMessage([thread_index, 1, version, workunit_result_uid, result]); }, false); // Number checking function // Returns null if not twin // Returns first of twins otherwise function check_number(number) { if((number%2)==0) return null; if(check_is_prime(number) && check_is_prime(number+2)) return [number,number+2]; return null; } // Check is number prime or not function check_is_prime(number) { number=parseInt(number); var i; var limit=Math.floor(Math.sqrt(number)); for(i=2;i<=limit;i++) { if((number%i) == 0) return 0; } return 1; } ```` # Links * Project https://netbook.arikado.ru/microgrid/ * Github https://github.com/sau412/microgrid * Twin primes https://en.wikipedia.org/wiki/Twin_primes
author | sau412 |
---|---|
permlink | distributed-calculations-in-yout-browser-beta |
category | gridcoin |
json_metadata | {"tags":["gridcoin","microgrid","grid"],"image":["https://cdn.steemitimages.com/DQmRnAKUEafeAqJi31izHG7gu5UKUfAfeeDsDY8YquLH4tF/%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png"],"links":["https://en.wikipedia.org/wiki/Twin_prime","https://netbook.arikado.ru/microgrid/","https://github.com/sau412/microgrid","https://en.wikipedia.org/wiki/Twin_primes"],"app":"steemit/0.1","format":"markdown"} |
created | 2019-02-12 12:33:12 |
last_update | 2019-02-12 12:38:30 |
depth | 0 |
children | 2 |
last_payout | 2019-02-19 12:33:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 1.723 HBD |
curator_payout_value | 0.523 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,786 |
author_reputation | 8,198,119,818,978 |
root_title | "Distributed calculations in your browser (beta)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,765,798 |
net_rshares | 4,531,638,989,856 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cm-steem | 0 | 599,802,241,827 | 100% | ||
vortac | 0 | 3,748,249,032,052 | 100% | ||
barton26 | 0 | 9,804,404,742 | 100% | ||
darth-azrael | 0 | 37,225,139,169 | 33% | ||
darth-cryptic | 0 | 8,080,090,864 | 100% | ||
nuad01 | 0 | 753,146,613 | 100% | ||
grider123 | 0 | 14,658,343,417 | 100% | ||
jringo | 0 | 24,249,524,083 | 100% | ||
zamaza | 0 | 551,632,463 | 100% | ||
agentjuno | 0 | 96,833,735 | 100% | ||
parejan | 0 | 4,541,443,047 | 20% | ||
hotbit | 0 | 13,801,124,021 | 100% | ||
cheneats | 0 | 1,166,305,984 | 5% | ||
h202 | 0 | 14,910,964,694 | 100% | ||
alexmaksto | 0 | 353,263,465 | 100% | ||
ilikechocolate | 0 | 4,795,370,078 | 100% | ||
fun2learn | 0 | 1,044,647,906 | 1.6% | ||
shmoogleosukami | 0 | 2,702,850,334 | 100% | ||
legko | 0 | 314,877,104 | 10% | ||
steemgridcoin | 0 | 1,024,031,676 | 100% | ||
bogdasha | 0 | 2,424,348,422 | 10% | ||
yougotresteemed | 0 | 97,016,970 | 5% | ||
sensi-stats | 0 | 333,800,981 | 100% | ||
nathanielcwm | 0 | 298,995,191 | 100% | ||
nailyourhome | 0 | 1,088,965,327 | 1.6% | ||
crypto-swiss | 0 | 554,021,791 | 100% | ||
delegate4upvot | 0 | 1,152,852,298 | 1.6% | ||
merlin7 | 0 | 797,586,535 | 0.02% | ||
steemexpress | 0 | 2,197,249,976 | 4.05% | ||
stmpay | 0 | 6,298,860,499 | 2.48% | ||
bluesniper | 0 | 3,163,816,954 | 0.5% | ||
primeradue | 0 | 1,955,044,402 | 2.5% | ||
steem.create | 0 | 1,220,852,888 | 1.8% | ||
ctime | 0 | 21,930,310,348 | 0.75% |
Awesome, I'm imagining right now calculations I'd be interested to put on there.
author | h202 |
---|---|
permlink | re-sau412-distributed-calculations-in-yout-browser-beta-20190212t234917926z |
category | gridcoin |
json_metadata | {"tags":["gridcoin"],"app":"steemit/0.1"} |
created | 2019-02-12 23:49:18 |
last_update | 2019-02-12 23:49:18 |
depth | 1 |
children | 1 |
last_payout | 2019-02-19 23:49:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 80 |
author_reputation | 260,059,645,359 |
root_title | "Distributed calculations in your browser (beta)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,791,120 |
net_rshares | 13,311,521,248 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
grider123 | 0 | 13,311,521,248 | 100% |
If you ever decide to try some interesting calculations there I'd be willing to do some crunching :D
author | grider123 |
---|---|
permlink | re-h202-re-sau412-distributed-calculations-in-yout-browser-beta-20190213t140533646z |
category | gridcoin |
json_metadata | {"tags":["gridcoin"],"app":"steemit/0.1"} |
created | 2019-02-13 14:05:33 |
last_update | 2019-02-13 14:05:33 |
depth | 2 |
children | 0 |
last_payout | 2019-02-20 14:05:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 100 |
author_reputation | 107,965,352,035,530 |
root_title | "Distributed calculations in your browser (beta)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,816,084 |
net_rshares | 16,167,934,879 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
h202 | 0 | 16,167,934,879 | 100% |