Get desktop application:
View/edit binary Protocol Buffers messages
//////////////////////////////////////////////////// Called by serving daemon (compilation servant). // ////////////////////////////////////////////////////
Called periodically by daemons to report their states.
The scheduler only accepts requests carrying a recognized token.
Expected time of next heartbeat.
An interval less than 10s is suggested.
Version of this daemon.
IP:port of the reporting servant.
Number of processors.
Current load average
The reason why `capacity` is zero.
@sa: NotAcceptingTaskReason
Maximum number of task concurrency this node is willing to provide.
Total memory of this node.
Available memory.
Compilers recognizes by this servant.
The desc of running tasks on servant. This help scheduler to collect all running tasks of cluster, avoiding unnecessary compilations and cluster overload.
Tokens that should be accepted by this daemon. This is in no way related to the token provided in the request. This one is used for accessing daemons, while the latter is used for accessing scheduler. Usually there's only one entry in this list. There can be more if we're rolling out a new one. The delegate daemon periodically requests a token from the scheduler via `GetConfig`
IDs in `running_tasks` of the request that the scheduler think is dead. Usually this means the task submitter failed to sent keep-alive in a timely manner. The caller is free to instantly terminate tasks listed here without further negotiation.
Called periodically to obtain configurations such token to access other serving daemons.
Token to access scheduler.
Token to access other daemons.
Apply for distributing one or more compilation tasks. This method returns a list of servant to do actual compilation. Unless there's no quota available, this method never blocks. However, this method can return less quota than requested if the system under heavy load. Each grant can be applied to exactly one compilation task. If the client believes it has more task to run in the near future, it can "prefetch" some quota.
Milliseonds the caller would like to wait before the scheduler fails this request with `STATUS_NO_QUOTA_AVAILABLE`. This value is NOT the same as RPC timeout. The latter should be greater than this timeout.
An duration less than 10s is suggested.
Tasks grant requested.
The caller should call `KeepTaskAlive` in this time period.
An interval less than 10s is suggested.
Minimal version of daemon is requested.
Quota allocated to the caller. Note that this array does not need to have exactly `desired_quota` elements. If the system is under heavy load, this method can return with less quota than requested.
For long-running compilation tasks. The grant (or, "lease", if that terms makes you feel better) timeout set in the initial request is likely to be too short. In this case the client should renew its grant periodically by calling this method.
The caller should call `KeepTaskAlive` again in this time period.
An interval less than 10s is suggested.
The daemon should call this after it finishes its compilation to return the quota to global quota pool. Failing to call this method is not catastrophic, though. So long as the client does not renew its grant inefinitely, the grant will expire sooner or later. Once the grant expires, we're back to normal. Actually I believe the scheduler and the servant can cooperate to drop a grant actively once the compilation is done. This way we don't have to count on client not to keep renewing its least to work correctly. Well-behaved client should pair this call with its acquisition.
(message has no fields)
Get all running compile tasks.
NOTHING.
(message has no fields)
@sa: Enumeration with the same name in `daemon/cloud/execution_engine.h`.
Keep them in sync with `daemon/cloud/execution_engine.h`.
Solely used by this IDL.
Used in:
,Defines priority when selecting servant. The scheduler usually prefer to assign task to servant with higher priority.
Used in:
Dedicated servant. QoS of them are somewhat guaranteed.
Users who volunteer their CPUs (if not otherwise ruled out by other factors. @sa: `NotAcceptingTaskReason`.)
Only servant who is able to provide such environment is returned.
@sa: StartingTaskReason
Describes a newly-allocated task quota.
Used in:
ID allocated to this task. You will need this to invoke renew operation. For the moment this ID is allocated as a monotonically increasing number sequence. Perhaps using a 128-bit random number would help in mitigating collision attack? Note that the daemons do not verify each other's token, they solely relies on what's provided by the scheduler (e.g., this ID, and (if implemented) scheduler's signature) to be safe.
Physical location of this node. (IP:port)
Describes the reason why a task grant is acquired.
TODO(luobogao): Some of the following status code are quite common, and can be defined in Flare to be shared by all services.
`rpc.STATUS_SUCCESS`, actually.
The entire system is under heavy load, and no quota can be allocated to the caller.
Invalid token?
Daemon should be upgraded.
No matched servant environment.