Git Product home page Git Product logo

Comments (4)

dschwartznyc avatar dschwartznyc commented on August 20, 2024

Additionally, is the global key expected to be invariant between versions of the same "object?" IE Are all keys expected to be the same after update or, as long as reference consistency is maintained, can they change?

from rune-dsl.

minesh-s-patel avatar minesh-s-patel commented on August 20, 2024

@dschwartznyc
Sorry for the delay on replying to this issue. We will take a look tomorrow morning.

from rune-dsl.

dschwartznyc avatar dschwartznyc commented on August 20, 2024

@minesh-s-patel - checking in on this.

from rune-dsl.

minesh-s-patel avatar minesh-s-patel commented on August 20, 2024

There are 3 mechanisms for referencing in RUNE. Some of these concepts need to be reviewed and revised as they evolved along side the development of the CDM.

Global Keys/Global References - Global keys are a pluggable infrastructure where a user of a RUNE model can "inject" calculated a uniquely identifying string to identify an instance of a RUNE type or a Basic Type, and references elsewhere.

  • Types annotated with [metadata key]
  • Attributes annotated with [metadata id]
  • Attributes annotated with [metadata reference]

Note that global keys may not be invariant over instances of a particular RUNE object.

External Keys/External References - These are keys that a user "sets" as meta data to any identifiable type.

  • Types annotated with [metadata key]
  • Attributes annotated with [metadata id]
  • Attributes annotated with [metadata reference]

More info needed for Address/Location:

  • Types annotated with [metadata key]
  • Attributes annotated with [metadata address "pointsTo"=PriceQuantity->price]
  • Attributes annotated with [metadata location]

The results of the default "Hash based" Global Keys algorithm shipped with the JAVA libraries are not designed to be shared across different implementations of systems built on top of a RUNE Model (even though this is desirable).

A good place to look for how the Global Keys are injected into the model: https://github.com/finos/common-domain-model/tree/master/examples/src/main/java/com/regnosys/cdm/example/globalkey

The hashing utility libraries can be seen here: https://github.com/finos/common-domain-model/blob/master/examples/src/test/java/com/regnosys/cdm/example/TestObjectsFactory.java

The hashing algorithm for CDM is using the Java hashcode fuctionality - https://github.com/finos/rune-common/blob/0f18618e947a69cf69b28dc68329c6926a20b5ac/src/main/java/com/regnosys/rosetta/common/hashing/IntegerHashGenerator.java

This is the processor that sets all global keys making use of the hashing algo - https://github.com/finos/rune-common/blob/0f18618e947a69cf69b28dc68329c6926a20b5ac/src/main/java/com/regnosys/rosetta/common/hashing/GlobalKeyProcessStep.java

from rune-dsl.

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.