Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
pictures
ps_translations
18758997-Hands-Drawing-Conceptual-Stock-Vector-hands-hand-together.jpg
LICENSE
README.md
alloc.txt
allocate.php
allocate.txt
allocation.txt
build_po.php
db_init.php
do_accounting.php
docker.txt
en.po
get_project_config.php
gl
index.php
intro.php
language_trim.php
log.inc
logo.png
make_accounts.php
mods.sql
notes.txt
power.png
power_white.png
project.inc
project_digest.php
project_history.txt
project_init.php
rebuild_accounting.php
reset.sql
rpc.php
schema.sql
sign_url
status_3_17.docx
su.css
su.inc
su_about.php
su_account_settings.php
su_accounting.php
su_blurb.txt
su_boinc_users.php
su_compute_prefs.inc
su_compute_prefs.php
su_connect.php
su_create_retry.php
su_db.inc
su_delete_spammers.php
su_download.php
su_email.php
su_email_prefs.php
su_graph.inc
su_graph.php
su_help.php
su_home.php
su_hosts.php
su_intro.php
su_join.inc
su_join.php
su_keyword_stats.php
su_keywords.php
su_manage.php
su_prefs.php
su_project_infos.inc
su_projects_acct.php
su_projects_edit.php
su_schedule.inc
su_show_project.php
su_unsubscribe.php
su_user.inc
su_user_accounting.php
su_user_projects.php
su_util.inc
su_welcome.php
ucbseal.png
user_host.php
user_hosts.php
user_projects.php
user_stats.php

README.md

Science United

This repo is the source code for Science United (https://scienceunited.org), an interface to BOINC-based volunteer computing. Volunteers who use SU sign up for science areas (biomed, astronomy, etc.) and/or geographical areas, rather than for specific projects.

This code may be useful as a starting point for other BOINC account managers, especially those based on a similar coordinated model.

Science United is developed by the BOINC project at U.C. Berkeley, led by David Anderson, and supported by the National Science Foundation.

Contribute

If you're a programmer or web designer and would like to contribute to Science United, that would be great! To get started:

  1. Use Science United and explore its features.
  2. Read through the source code.
  3. Create issues for any bugs or suggested changes you find. Discuss with us.
  4. Once the approach for an issue has been decided, create a branch and pull request.

Implementation notes

SU is implemented as a BOINC account manager. The SU code consists of 3 main parts:

  1. The handler for RPCs from clients (rpc.php).
  2. Web page scripts.
  3. Scripts for periodic back-end maintenance tasks.

SU piggy-backs on the BOINC web code. It uses BOINC's code for account creation, login, message boards, and web utility functions.

SU uses a MySQL database which is an extension of the BOINC database; it adds tables for projects, accounts, and computational book-keeping info. See schema.sql.

Cloning Science United

If you want to make a clone of SU, the steps are:

  1. Download the BOINC source code.
  2. Use make_project --web_only to create a project.
  3. Run SU's schema.sql to add SU's DB tables.
  4. Copy or link SU's web files to the appropriate subdirectories of the project's html/ directory. .inc files go in html/inc/; maintenance scripts go in html/ops/ (allocate.php, do_accounting.php, su_delete_spammers, su_email.php). Other .php files go in html/user/.
  5. Add to the project's config.xml: <account_manager/>
  6. Use BOINC'c crypt_prog to generate a key pair, code_sign_private and code_sign_public
  7. Get the list of BOINC projects: wget https://boinc.berkeley.edu/project_list.php. Put the result in html/ops/projects.xml.
  8. In html/ops, run project_init.php. This will populate the su_project table.
  9. In html/ops, run project_digest.php. This creates projects.ser, a serialized file of project info.

Create an account for yourself. Visit the message boards to create a forum_preferences entry for that user. Then (using mysql) set the 'special_user' field of that entry to '01'; that makes the account administrative. Then go to su_manager.php to see the admin web interface.

Project accounts

The code supports two modes of operation:

  1. A separate account is created on each BOINC project for each SU user.
  2. All SU users share a single account on each BOINC project.

Originally SU used the first mode; it switched to the second mode because of GDPR privacy issues, and because it's much simpler.

To use the first mode, put this in your config.xml:

   <task>
       <cmd> run_in_ops ./make_accounts.php --timer</cmd>
       <period> 5 minutes </period>
       <disabled> 1 </disabled>
       <output> make_accounts.out </output>
   </task>

To use the second mode: create an account on each BOINC project you want to support. Store the WEAK authenticator of the account in the "authenticator" field of the project's entry in the su_project table.

Resource allocation among projects

SU tries to divide computing fairly among projects. This mechanism is embodied in its project assignment algorithm (rpc.php). Projects can be assigned different "shares", which you can edit in the admin web interface. To enable this mechanism, put the following in your config.xml:

   <task>
       <cmd> run_in_ops ./allocate.php </cmd>
       <period> 24 hours </period>
       <disabled> 0 </disabled>
       <output> allocate.out </output>
   </task>

Accounting

SU keeps track of how much computing each device has done, in terms of "estimated credit" reported by BOINC clients. To enable this, include the following in your config.xml:

   <task>
       <cmd> run_in_ops ./do_accounting.php </cmd>
       <period> 24 hours </period>
       <disabled> 0 </disabled>
       <output> do_accounting.out </output>
   </task>

Custom functionality

The SU code supports the model where users choose keywords, and project assignment is based on keywords.

With a certain amount of work, SU could be changed to the model where users explicitly choose projects (like BAM! and Gridrepublic). You'd need to change a number of files, starting with rpc.php.

You can’t perform that action at this time.