mirror of https://github.com/BOINC/boinc.git
Page:
BackendLogic
Pages
API Implementation
ATI Radeon
Account managers
AccountControl
AccountManagement
AccountManagers
Adaptive Replication
AdminAlphaTest
AdminApprovedProjects
AdminDepLibs
AdminDepLibsCurl
AdminDepLibsOpenSSL
AdminDepLibsSqlite
AdminDepLibsZlib
AdminInstallerMac
AdminInstallerUnix
AdminInstallerWin
AdminLocalize
AdminReleaseAndroid
AdminReleaseManagement
AdminRoles
AdminTasks
AdminWrappers
Advanced view
AlphaInstructions
AndroidBoinc
AndroidBoincImpl
AndroidBoincTesting
AndroidBoincTodo
AndroidBuildApp
AndroidBuildClient
AndroidBuildStatus
AndroidGuiDiscuss
Anonymous platform
AppCoprocessor
AppDebug
AppDebugAndroid
AppDebugWin
AppDev
AppFiltering
AppIntro
AppLibraries
AppMultiThread
AppPlan
AppPlanSpec
AppVersion
AppVersionNew
Apple Metal Support
AssignedWork
Assimilation introduction
Assimilators in C
Assimilators in scripting languages
AutoFlops
AutoUpdate
BOINC Client
BOINC Data directory
BOINC Help
BOINC Manager
BOINC Security
BOINC screensaver
BOINC apps (introduction)
BOINC community
BOINC events
BOINC overview
BOINC projects
BOINC software development
BOINConPhones
BackendLogic
BackendPrograms
BackendState
BackendUtilities
BadgeDoc
BadgesOld
BashCommandCompletion
BasicApi
BasicConcepts
BerkeleyTasks
BetaTest
BlackList
BoincBasics
BoincContributersCall
BoincDocker
BoincFiles
BoincGovernanceWorkingGroups
BoincIntro
BoincLite
BoincPapers
BoincPlatforms
BoincPmcPage
BoincPr
BoincProjectsCall
BoincSecurity
Boinccmd tool
BuildClientProcedure
BuildMacApp
Building BOINC on Unix
Building BOINC software
CamelCase
CancelJobs
CertSig
Changes to this Wiki
Choosing and joining projects
Client configuration
Client release notes
ClientAppConfig
ClientDataModel
ClientFiles
ClientFsm
ClientLogic
ClientOpaque
ClientSched
ClientSchedOctTen
ClientSchedOld
ClientSchedVersionFour
ClientSetupLogicWin
ClientSetupLogicWinFileLayout
ClientSetupLogicWinSix
ClientSetupLogicWinSixCleanup
ClientSetupWinSix
ClientSim
CloudServer
CodeSigning
CodingStyle
CommIntro
Command line job submission
CompileApp
CompileAppLinux
CompileAppWin
CompileClient
CompileWithWxWidgets
CompoundApps
Computation credit
Computing with BOINC
CondorBoinc
ConferenceList
Contact BOINC
ContributePage
Controlling BOINC remotely
CoreClient
CpuSched
Create a BOINC server (cookbook)
CreateProjectCookbook
Creating a skin for the BOINC Manager
Creating custom installers
CreditAlt
CreditGeneralized
CreditNew
CreditNotes
CreditOptions
CreditProposal
CreditStats
CrossProjectUserId
CudaApps
DataBase
DataFlow
DbDump
DbIds
DbPurge
DebugClientWin
DeleteFile
Deploy Linux apps using VirtualBox (cookbook)
DesignKeywords
DesktopGrid
DevMethodologies
DevProcess
DevProjects
DevProjects_New
DevQualityAssurance
Development_Workflow
DiagnosticsApi
DirHierarchy
DiskManagement
Docker and WSL
Docker app cookbook
Docker app implementation
Docker apps
Docker design alternatives
Docker universal app web interface
Docker universal app
DownloadInfo
DownloadOther
DrupalConversion
DrupalIntegration
EastCoast08
Editing computing preferences with the BOINC Manager
EmBoinc
EmailChangeNotification
EmailLists
Error handling (cookbook)
Error handling (introduction)
ErrorReference
Error_Abortingtask_Exceededdisklimit
Error_Cantdeletepreviousstatefile
Error_Givinguponupload
Error_Schedulerrequestfailed
ExampleApps
FileCompression
FileDeleter
FileList
FileUpload
FortranApps
Fossils
GPU computing
GPUApp
GSoC_13
GdprCompliance
GetFile
GetFileList
GitMigration
Global prefs override.xml
Going public
GpuSched
GpuSync
GpuWorkFetch
GraphicsApi
GraphicsApiOld
GraphicsApps
GraphicsHtml
GridIntegration
GuiRpc
GuiRpcProtocol
GuiUrls
HTMLGfx
HarzPics
Heat and energy considerations
Home
Homogeneous App Version
Homogeneous Redundancy
Host identification and merging
HostId
HostMeasurement
How BOINC works
HtmlOps
Initialization files
InstallDrupal
Installing BOINC on Debian or Ubuntu
Installing BOINC on EC2
Installing BOINC on Fedora
Installing BOINC on Gentoo
Installing BOINC on Ubuntu
Installing BOINC
Installing on Android
Installing on FreeBSD
Installing on Linux
Installing on MacOS
Installing on Windows
IntermediateUpload
JavaApps
Job processing (cookbook)
Job processing (introduction)
Job replication
JobEst
JobIn
JobIntro
JobKeywords
JobPinning
JobPrioritization
JobReplication
JobSched
JobSizeMatching
JobStage
JobStatus
JobSubmission
JobTemplates
KeySetup
LammpsRemote
LdapSupport
Linux file permissions
Linux DEB and RPM support
Linux installer
LocalityNew
LocalityScheduling
Locating stolen computers
LogExtension
LogRotate
LowLatency
MacBacktrace
MacBuild
MacDeveloper
MacDeveloperProjects
Maintain your BOINC project
MakeProject
ManagerImpl
ManagerMenus
MasterUrl
MediaWiki
MemoryManagement
Missing Linux shared libraries
MpiApps
MultiHost
MultiSize
MultiUser
MultiUserPriority
MysqlConfig
Network related problems
NetworkApps
NonCpuIntensive
Notifications
OpenCL Applications
OpenCL CPU applications
OpenId
OpenclCpu
OptionsApi
OrgGrid
OtherProjectDocs
PMC_Minutes
PMC_Minutes_2017_12_15
PMC_Minutes_2018_01_10
PageTemplates
PasswordHash
PayPalDonations
Per user file sandbox
PerAppCredit
PersFileXfer
PhpDb
PhysicalFileManagement
PlanClassFunc
PortalFeatures
PowerManagement
Preferences
PreferencesXml
Prefs2
PrefsImpl
PrefsOverride
PrefsPresets
PrefsReference
PrefsReference_Time
PrefsRemodel
PrefsUnification
PrepareLinuxBuildMachine
Process_proposals
ProfileScreen
ProjectConfigFile
ProjectDaemons
ProjectDefaults
ProjectGovernance
ProjectLaunch
ProjectMain
ProjectNews
ProjectNotices
ProjectOptions
ProjectPapers
ProjectPlan
ProjectSecurity
ProjectSelect
ProjectSkin
ProjectSpecificPrefs
ProjectSponsors
ProjectTasks
ProofOfOwnership
Proposal_ProjectSimpleAccountCreation
ProtectionFromSpam
Proxy servers
ProxyServer
PyMw
PythonAppDev
PythonApps
PythonFramework
PythonMw
PythonMysql
QuickStart
RecentChanges
Reduce_usage_of_authenticator
Reduce_usage_of_authenticator_implementation
ReleaseNotes
RemoteInputFiles
RemoteJob
RemoteJobs
RemoteLogs
RemoteOutputFiles
RemoteOverview
Reporting client bugs
ResearchProjects
RightToErasure
RpcAuth
RpcPolicy
RpcProtocol
RpmSpec
Running Linux apps on BOINC
RuntimeEstimation
SandBox
SandboxUser
SchedMatch
Scientist interface
ScreensaverEnhancements
ScreensaverLogic
SecureHttp
SecurityIssues
SendFile
Server release notes
Server trouble‐shooting
ServerComponents
ServerDirs
ServerIntro
ServerSecurity
ServerStatus
ServerTestInstructions
ServerUpdates
Simple view
Simple attach usage
SimpleAttach
SingleJob
SingleJobImpl
SkinExamples
SoftwareAddon
SoftwareDevelopment
SoftwarePrereqsUnix
SoftwareTesting
SolarisClient
SolrIntegration
Source code map
SourceCode
SourceCodeGit
SourceCodeGit_Commands
SourceCodeGit_Windows
SourceCodeGit_WindowsKeygen
SourceCodeGit_WorkFlow
SourceCodeSvn
Sporadic Applications
Standard assimilators
Standard validators
StartTool
Starting BOINC on boot (Unix)
StatsXml
StatusApi
StolenComputers
Stop or start BOINC daemon after boot
StripChart
StyleSheets
SuperHost
TeamDiscussion
TeamImport
Teams
TemplateImages
TermsOfUse
The BOINC out of box experience
The BOINC test drive
ToolUpgrade
Tools for MacOS
TranslateIntro
TranslateProject
Translate_Coordination
TranslationSystem
TreeThreader
TrickleApi
TrickleImpl
TrickleMessages
TroubleshootClient
TroubleshootClient_New
Troubleshooting
Tutorial_BOINCApplicationDevelopmentLifecycle
Tutorial_DeployingVMApplications
UnixClientPackage
UnixProjectPackage
UpdateVersions
UploadStatistics
Usage rules
User manual
UserJobs
UserOptInConsent
Using BOINC with modem, ISDN and VPN connections
UsingSvn
ValidationLowLevel
Validators in C
Validators in scripting languages
Validators
VboxApps
Vboxwrapper release notes
VersionDiff
VersionHistory
VersionPathSorter
VirtualBox Plan
VirtualBox
VirtualCampusSupercomputerCenter
VirtualMachines
Virtualbox Shared Directories
VmApps
VmCompatibility
VmServer
Volunteer
VolunteerComputing
VolunteerDataArchival
VolunteerRecruit
VolunteerStorage
WSL apps
WatchDog
Weak account key
WebCache
WebConfig
WebForum
WebResources
WebRpc
WebSubmit
WebTemplateProposal
WhyUseBoinc
WikiTodo
WinMulticore
WindowsIssues
WordPressInt
WorkDistribution
WorkFetchMaxConcurrent
WorkGeneration
WorkShop07
WorkShop07_BoincGrid
WorkShop07_BoincSched
WorkShop07_InterpretedApps
WorkShop07_PubBoincOne
WorkShop07_PubBoincTwo
WorkShop07_SecurityGroup
WorkShop07_SimplifyApp
WorkShop07_Summary
WorkShop07_VirtualMachines
WorkShop07_WebCode
WorkShop08
WorkShop08_WorkshopProceedings
WorkShop09
WorkShop09_BatchSched
WorkShop09_InterprocComm
WorkShop09_ScientistUsability
WorkShop09_UserIssues
WorkShop09_VmApps
WorkShop10
WorkShop10_VmApps
WorkShop10_VolunteerIssues
WorkShop11
WorkShop11_HackFest
WorkShop11_HackFest_Android
WorkShop11_MultiUser
WorkShop12
WorkShop12_WorkshopSummary
WorkShop13
WorkShop13_HackfestNotes
WorkShop14
WorkShop18
WorkShop19
Worker release notes
WorldWideLexicon
Wrapper release notes
WrapperApp
XaddTool
XmlFormat
XmlNotes
XmlStats
test_RunningBoinc
2
BackendLogic
Vitalii Koshura edited this page 2023-04-10 02:21:32 +02:00
Table of Contents
Backend program logic
Work generator
for each wu created
wu.transition_time = now
Scheduler
when send a result
result.report_deadline = now + wu.delay_bound
wu.transition_time = min(wu.transition_time, result.report_deadline)
when receive a result
if client error
result.outcome = client_error
result.validate_state = INVALID
else
result.outcome = success
result.server_state = OVER
wu.transition_time = now
when a result falls off the bottom of infeasible queue
result.server_state = OVER
result.outcome = COULDNT_SEND
wu.transition_time = now
Transitioner
// gets run when either
// - a result becomes done (via timeout or client reply)
// - the WU error mask is set (e.g. by validator)
// - assimilation is finished
for each WU with now > transition_time:
// check for timed-out results
for each result of WU
if result.server_state = in_progress and now > result.report_deadline
result.server_state = OVER
result.outcome = NO_REPLY
// trigger validation if needed
K = # of SUCCESS results
if K >= M
if any result is server_state OVER, outcome SUCCESS, validate_state INIT
wu.need_validate = true
// check for WU error conditions
if any result has outcome couldnt_send
error_mask |= couldnt_send
K = # results with outcome = client_error
if K > A
error_mask |= too_many_error_results
// Note: check on # of success results is done in validator
K = total # results
if K > B
error_mask |= too_many_total_results
// if no WU errors, generate new results if needed
if error_mask == 0
K = # results w/ server_state = unsent or in_progress
L = N - K
generate L new results
// if WU errors, clean up unsent results
// and trigger assimilation if needed
if error_mask
for all results server_state = unsent
server_state = over
outcome = didnt_need
if wu.assimilate_state == init
wu.assimilate_state = ready
// if WU is assimilated, trigger deletion of files
if wu.assimilated_state = DONE
// trigger input file deletion if needed
if (all results are OVER and those that are outcome SUCCESS
have validate_state != INIT)
wu.file_delete_state = ready
// outputs of error results can be deleted immediately;
// outputs of successful results can be deleted when validated
for results of WU
if canonical result and not all results OVER
continue
if outcome = CLIENT_ERROR or (SUCCESS and (VALID or INVALID))
if file_delete_state = INIT
result.file_delete_state = READY
// get next result timeout if any
transition_time = MAX_INT
for all results IN_PROGRESS
transition_time = min(transition_time, result.report_deadline)
// if transitioner is way behind schedule,
// don't repeatedly handle this WU
transition_time = max(transition_time, now+delay_bound)
Validator
for each WU w/ need_validate true
if have canonical result
for each result w/ validate_state INIT and outcome SUCCESS
// possible that we've already deleted canonical output files
if canonical_result.file_delete_state = DONE
validate_state = INVALID
else
if matches canonical, grant credit
validate_state = VALID or INVALID
need_to_handle_over_results = true
else
S = set of results w/ outcome SUCCESS
if consensus(S)
set canonical_result
set success results as VALID or INVALID
grant credit
need_to_handle_over_results = true
wu.assimilate_state = READY
for all results server_state UNSENT
server_state = OVER
outcome = DIDNT_NEED
else
if # of successful results > C
wu.error_mask |= too_many_success_result
need_to_handle_over_results = true
if need_to_handle_over_results:
wu.transition_time = now
Assimilator
for each WU with assimilate_state = READY
call project-specific handler function
wu.assimilate_state = done
wu.transition_time = now