You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by Wilfred Spiegelenburg <wi...@apache.org> on 2023/07/03 22:53:54 UTC

Re: [DISCUSS] Use "omitempty" in web service json definition

Since there has not been any feedback that indicates issues with the
proposed change I will start logging the jiras.
Looking at implementing this for YuniKorn 1.4.

Cheers,
Wilfred

On Mon, 26 Jun 2023 at 15:06, Wilfred Spiegelenburg <wi...@apache.org> wrote:
>
> Hi,
>
> I have looked over a number of state dumps and other web service
> responses over the last months and noticed their size and empty
> objects.
> None of our web service objects contain the "omitempty" tag in their
> definition. That means the json objects generated contain the value
> even if empty or equal to the zero value for the type[1]. Not
> generating empty references would reduce the size of the objects that
> we send. All K8s objects have the "omitempty" tag defined.
> There is however an impact to the consumer of the data. If the
> consumer does not check for object existence it could fail when we add
> this tag.
>
> There will be at least two impacts for YuniKorn itself: data transfer
> size but also memory size when we prepare the objects. I have not
> checked how big the impact is on our code, memory usage or the data
> generated.
> I have also not analysed yet if the web UI would be able to handle this change.
>
> Before we start looking at this I would like some feedback from the
> community on this proposal.
> * Would this break integration that people have built?
> * If we plan this for the YuniKorn 1.4 release, is that too soon to
> prepare and check. Keeping in mind that 1.4 is planned for October?
>
> Cheers,
> Wilfred
>
> [1] https://yourbasic.org/golang/default-zero-value/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org