Code Monkey home page Code Monkey logo

Comments (5)

iamwillbar avatar iamwillbar commented on August 20, 2024 1

Capturing what I said during today's tech meeting:

At a logical level, every element has a creation information, with all the properties containing their final value.

At a serialization level, a serializer can do any optimization it desires (including none), if once deserialized every element has a creation information, with all the properties containing their final value (i.e. it complies with the logical model).

For example, a serializer may optimize for space by storing duplicative creation information once and using a pointer in the element. On deserialization it would resolve the pointer and attach the creation information to the element (it could retain the pointer if it wanted to minimize differences when serializing that content back out).

Another example, a serializer that used hierarchies may optimize for space by supporting per-property inheritance by storing common values in the highest level of the hierarchy. On deserialization (or even when accessed) it would walk the hierarchy to retrieve the value of any property in the creation information.

from spdx-3-model.

goneall avatar goneall commented on August 20, 2024 1

I believe this has now been agreed to and resolved for JSON-LD.

Closing this issue.

from spdx-3-model.

goneall avatar goneall commented on August 20, 2024

That won't work because the requirement is for each property to have an individual default value that doesn't need to be sent even if another property is not defaulted.

I'm of the opinion that individual default values do not make sense. One of the main purposes of a default value is to not repeat the same information for Elements created at the same time from the same creator etc - in which case you would have all the same CreationInfo defaults.

This opens up another solution where you have a default CreationInfo and if you would want to have a different value for any of the CreationInfo fields, you'd just create a separate CreationInfo just for that element.

from spdx-3-model.

davaya avatar davaya commented on August 20, 2024

At the logical level, every element has one creationInfo property of type CreationInformation.

At a serialization level, a serializer can do any optimization it desires (including none), if once deserialized every element has a creation information, with all the properties containing their final value (i.e. it complies with the logical model).

True, but we are going to define serialization in a way that supports interworking. "A serializer" doesn't mean whatever a developer chooses, it means whatever SPDX documents as the standard. Whatever we document must support serialization of a single element, and the optimization algorithm for serializing multiple elements must be defined.

As I noted in https://github.com/davaya/spdx-3-model/tree/serialization/serialization, the conceptually simplest serialization would just concatenate the individual elements and then compress them (with gzip or whatever). When we define a serialized format it shouldn't be conceptually harder to understand than that.

from spdx-3-model.

davaya avatar davaya commented on August 20, 2024

As William said, the logical model defines element properties, one of which is creationInfo. Every serialization must preserve the logical value of every element. The approach to satisfying that requirement in the most effective manner will be discussed by the Serialization (Thursday) and Canonicalization (Friday) teams

from spdx-3-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.