Comments (4)
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.
@dschwartznyc
Sorry for the delay on replying to this issue. We will take a look tomorrow morning.
from rune-dsl.
@minesh-s-patel - checking in on this.
from rune-dsl.
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)
- Rename master to main HOT 2
- Create Docusaurus website basic structure HOT 3
- Static compilation error when type starts with lowercase character
- Enhancements to one-of construct HOT 26
- Unable to build the repo HOT 5
- Xtext grammar file is too large HOT 1
- Condition with only exists operator should only validate attributes on the type that contains the condition
- Errors in naming of Rune DSL in documentation HOT 1
- DSL should show when the implementation of a function is in code (ie Java) HOT 3
- Missing documentation on the generated Java code
- Incompatible Types error thrown converting List of String(Enum Value) to List of FieldWithMetaString
- Caching sometimes breaks change propagation
- Highlighting broken for `only exists` and `required choice` with a comma
- Code generator crashes when using Java keyword `exists` in Function output
- Using fully qualified name of enum in expression returns class cast error
- Tabulator Generator does not support circular dependancies
- Dedicated choice types
- Support choice types as enum
- Choice type attributes should be referencable with address/location
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rune-dsl.