major/minor version

svn path=/trunk/boinc/; revision=671
This commit is contained in:
David Anderson 2002-12-01 06:14:28 +00:00
parent 9e147559a6
commit 58f9876db7
16 changed files with 102 additions and 42 deletions

View File

@ -2438,3 +2438,11 @@ Seth/Eric Nov 18, 2002
boinc_gui/
boinc_gui.dsp
David Nov 30 2002
- use the major/minor version from env vars to identify the core client
(rather than the single version in Makefile)
client/
Makefile.in
client_state.C,h
cs_scheduler.C

View File

@ -5,8 +5,6 @@ VPATH = @srcdir@
INSTALL_DIR = /usr/local/boinc
VERSION = 2
CFLAGS = -g -Wall @DEFS@ \
-I @srcdir@ \
-I @srcdir@/../api \
@ -15,7 +13,8 @@ CFLAGS = -g -Wall @DEFS@ \
-I @srcdir@/win \
-I /usr/local/mysql/include \
-DHOST=\"@host@\" \
-DVERSION=$(VERSION)
-DMAJOR_VERSION=$(BOINC_MAJOR_VERSION) \
-DMINOR_VERSION=$(BOINC_MINOR_VERSION)
CC = @CC@ $(CFLAGS)

View File

@ -49,7 +49,8 @@ CLIENT_STATE::CLIENT_STATE() {
giveup_after = PERS_GIVEUP;
contacted_sched_server = false;
activities_suspended = false;
core_client_version = VERSION;
core_client_major_version = MAJOR_VERSION;
core_client_minor_version = MINOR_VERSION;
platform_name = HOST;
exit_after = -1;
app_started = 0;
@ -462,9 +463,11 @@ int CLIENT_STATE::write_state_file() {
active_tasks.write(f);
fprintf(f,
"<platform_name>%s</platform_name>\n"
"<core_client_version>%d</core_client_version>\n",
"<core_client_major_version>%d</core_client_major_version>\n"
"<core_client_minor_version>%d</core_client_minor_version>\n",
platform_name,
core_client_version
core_client_major_version,
core_client_minor_version
);
fprintf(f, "</client_state>\n");
fclose(f);

View File

@ -74,7 +74,8 @@ public:
private:
bool client_state_dirty;
TIME_STATS time_stats;
int core_client_version;
int core_client_major_version;
int core_client_minor_version;
char* platform_name;
unsigned int nslots;
bool exit_when_idle;

View File

@ -176,13 +176,15 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p, double work_req) {
" <hostid>%d</hostid>\n"
" <rpc_seqno>%d</rpc_seqno>\n"
" <platform_name>%s</platform_name>\n"
" <core_client_version>%d</core_client_version>\n"
" <core_client_major_version>%d</core_client_major_version>\n"
" <core_client_minor_version>%d</core_client_minor_version>\n"
" <work_req_seconds>%f</work_req_seconds>\n",
p->authenticator,
p->hostid,
p->rpc_seqno,
platform_name,
core_client_version,
core_client_major_version,
core_client_minor_version,
work_req
);
if (p->code_sign_key) {

View File

@ -20,5 +20,6 @@
#include "version.h"
#include "windows_cpp.h"
int gversion = VERSION;
int gmajor_version = MAJOR_VERSION;
int gminor_version = MINOR_VERSION;
char* gplatform_name = HOSTTYPE;

View File

@ -16,7 +16,7 @@ An application program may go through a sequence of
A particular version, compiled for a particular platform, is
called an <b>application version</b>.
An application version can consist of multiple files: for example, a
controller script, pre- and post-processing programs, and a primary.
controller script, pre- and post-processing programs, and a primary executable.
<p>
Each application version has an integer <b>version number</b>.

55
doc/boinc_version.html Executable file
View File

@ -0,0 +1,55 @@
<title>Versions of BOINC</title>
<h2>Versions of BOINC</h2>
<p>
The BOINC software (core client and all the server components)
will evolve over time.
There are a number of pairwise interactions
in which version mismatches could cause problems:
<ul>
<li> RPC from core client to scheduling server.
<li> RPC from core client to file upload handler.
<li> Interface between core client and application
(currently uses files; might use shared memory in future).
<li> Interface between BOINC DB and all BOINC back-end components.
<li> The parsing of the core state file by the core client.
</ul>
<p>
Each version of the BOINC software has a major and minor version number.
The client's version number is included in
scheduler and file upload RPC requests.
If a server receives a request from a client with a different major version,
it returns an error.
<p>
Some changes to the BOINC server software may involve
changes to the BOINC database
(e.g. adding a new table or field).
Such releases will include SQL script for modifying an
existing database in-place.
<p>
Major-version changes to the BOINC software will require
that all projects update their server software (and databases)
and that all participants update their core client software on all hosts.
This doesn't have to happen all at once,
but in the midst of the crossover
some clients won't be able to access some servers.
<p>
When a project makes a major-version change in its server software,
it may need to create new versions of its applications.
It must invalidate (by incrementing min_version)
all app versions that are incompatible with the new server software.
<p>
When a participant updates the core client,
all results currently in progress are discarded
(because new app versions would be needed).
The core client reads the version number from the old
client state file, and discards the results.
<p>
TODO: figure out how this interacts with work sequences.
Don't want to relocate a sequence needlessly.

View File

@ -14,14 +14,15 @@ BOINC's abstractions of data and computation.
<li><a href=parallelize.html>What applications are suitable for BOINC?</a>
<li><a href=files.html>Files and file references</a>
<li><a href=platform.html>Platforms</a>
<li><a href=app.html>Applications and versions</a>
<li><a href=app.html>Applications and application versions</a>
<li><a href=work.html>Workunits</a>
<li><a href=result.html>Results</a>
<li><a href=batch.html>Batches</a>
<li><a href=flow.html>Work distribution</a>
<li><a href=sequence.html>Handling long, large-footprint computations</a>
<li><a href=file_access.html>Remote file access</a>
<li> <a href=security.html>Security</a>
<li><a href=security.html>Security</a>
<li><a href=boinc_version.html>Versions of BOINC</a>
</ul>

View File

@ -0,0 +1,2 @@
<form method=post action=bug_report_action.php>
</form>

View File

@ -8,7 +8,7 @@
db_init();
$user = get_user_from_cookie();
if ($user) {
page_head($user->name);
page_head("Member page for $user->name");
show_user_page_private($user);
page_tail();
} else {

View File

@ -33,6 +33,7 @@ and give it your account key.
<li><a href=login_form.php>Log in</a>
<li><a href=home.php>User page</a> - view stats, modify preferences
<li><a href=team.php>Teams</a> - create or join a team
<li><a href=bug_report_form.php>Report problems</a>
<li><a href=top_users.php>Top users</a>
<li><a href=top_hosts.php>Top hosts</a>
<li><a href=top_teams.php>Top teams</a>

View File

@ -5,7 +5,7 @@
echo "<form method=post action=login_action.php>
<table cellpadding=8>
<tr><td align=right>
Your account key:
Your account ID:
</td><td>
<input name=authenticator size=40>
</td></tr>

View File

@ -1,37 +1,30 @@
<?php
function show_user_stats($user) {
echo TABLE2."\n";
echo "<tr>".TD2.LG_FONT."<b>User Stats:</b></font></td></tr>\n";
row("<b>User ID: </b>", $user->id);
$row = sprintf("<b>%s user since: </b>", $project);
row($row, time_str($user->create_time));
row("<b>Total credit: </b>", $user->total_credit);
row("<b>Recent averaged credit: </b>", $user->expavg_credit);
row("<b>Recent average credit: </b>", $user->expavg_credit);
if ($user->teamid) {
$result = mysql_query("select * from team where id = $user->teamid");
$team = mysql_fetch_object($result);
row("<b>Team: </b>", "<a href=team_display.php?id=$team->id>$team->name</a>");
} else {
row("<b>Team: </b>", "None");
row("<b>Team: </b>", "none");
}
echo "</table>\n";
}
function show_user_profile($user) {
echo TABLE2."\n";
echo "<tr>".TD2.LG_FONT."<b>User Information:</b></font></td></tr>\n";
row("<b>User name: </b>", $user->name);
row("<b>Email address: <b>", $user->email_addr);
row("<b>Country: </b>", $user->country);
row("<b>Postal (ZIP) code: </b>", $user->postal_code);
echo "<tr><td align=right><a href=edit_user_info.php>Edit user information</a></td>\n";
row("<b>name</b>", $user->name);
row("<b>email address<b>", $user->email_addr);
row("<b>country</b>", $user->country);
row("<b>postal (ZIP) code</b>", $user->postal_code);
echo "<tr><td align=right><a href=edit_user_info.php><font size=-1>Edit the above information</font></a></td>\n";
if (1) {
echo "<td><br></td></tr>\n";
} else {
echo "<td align=center><a href=change_password.php>Change Password</a></td></tr>\n";
}
echo "</table>\n";
}
function show_hosts($user) {
@ -48,16 +41,13 @@ function show_hosts($user) {
// it has info that other users aren't supposed to see
function show_user_page_private($user) {
echo "<h1>$user->name</h1>\n";
start_table();
echo "<table cellpadding=4>\n";
show_user_profile($user);
echo "<p><p>\n";
show_user_stats($user);
echo "<p>\n";
echo "</table>\n";
echo "<ul>";
echo "<li><a href=show_hosts.php>Host info</a></li>";
echo "<li><a href=prefs.php>Preferences</a></li>";
echo "<li><a href=team.php>Teams</a></li>";
echo "<li><a href=show_hosts.php>Your computer(s)</a></li>";
echo "<li><a href=prefs.php>Your preferences</a></li>";
echo "</ul>";
}

View File

@ -57,7 +57,8 @@ function page_tail() {
// put your copyright notice etc. here
echo "<hr>Copyright (c) 2002 Sample Project\n";
echo "<hr><center><a href=index.php>Astropulse home page</a>\n";
echo "<br>Copyright (c) 2002 Astropulse\n";
}
function date_str($when) {

6
todo
View File

@ -1,14 +1,10 @@
<<<<<<< todo
user PHP session mechanism
scheduler and file upload handler: return error if wrong major version
protection mechanism for project admin web
=======
use PHP session mechanism instead of our own cookies
use https for login (don't sent account key or password in clear)
protect project admin web pages (htaccess)
>>>>>>> 1.6
Deadline mechanism for results
- use in result dispatching