[
https://issues.apache.org/jira/browse/YUNIKORN-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420465#comment-17420465
]
Wilfred Spiegelenburg commented on YUNIKORN-337:
------------------------------------------------
One last thing: looking at the node message there is a lot of overlap between
the two messages for a new or updated node. It special cases the create action
and add a repeated field. Adding the create action as a value in the enum and
the existing allocations the node request message becomes even simpler:
{code}
message NodeUpdateRequest {
repeated NodeInfo nodes = 1;
string rmID = 2;
}
{code}
With node info for all cases turning into this:
{code}
message NodeInfo {
enum ActionFromRM {
CREATE = 0;
UPDATE = 1;
DRAIN = 2;
SCHEDULABLE = 3;
DECOMISSION = 4;
}
string nodeID = 1;
ActionFromRM action = 2;
map<string, string> attributes = 3;
Resource schedulableResource = 4;
Resource occupiedResource = 5;
repeated Allocation existingAllocations = 6;
}
{code}
> interface message complexity
> ----------------------------
>
> Key: YUNIKORN-337
> URL: https://issues.apache.org/jira/browse/YUNIKORN-337
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: scheduler-interface
> Reporter: Wilfred Spiegelenburg
> Assignee: Wilfred Spiegelenburg
> Priority: Critical
>
> The current interface allows us to only send one message between a shim and
> the core. This provides us with a really simple way of interactions
> definition.
> The complexity is however hidden in the message itself. Every message serves
> multiple purposes and when the message is received the core and shim need to
> unpack it and process each part separately and for certain parts in a real
> specific order.
> Because the message serves a number of purposes it has a large overhead. This
> might not show up in the code directly as the heavy lifting is done in the
> generated code. It will show up in the amount of data as a message, even if
> it does not have all fields, still needs to be encoded in a way that it
> unpacks correctly on the other side.
> The trade off between having one message with a simple interface or multiple
> more focussed messages with a slightly more complex interface needs to be
> assessed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]