This project contains protobuf models of financial objects & request/response formats for APIs; as well as language specific bindings.
This project represents the mental model upon which all services are built. Services do not have their own financial models, meaning that any service that needs to model financial objects must add it here and consider the global impact to all users.
Goals:
The golden source protobuf definitions
e.g. proto/java. Contains auto-generated code from protobuf libraries. YOUR CODE WILL BE OVERWITTEN IN HERE.
The Java contains a standalone implementation of models. This is to allow for behavioral aspects to be added to models. For example the Transaction.java class has logic for creating cash impacts and maturation children transactions. Behaviors can't be defined in protobuf, so have to be implemented per language.
This philosophical approach requires great thought to go into data modelling. This is on purpose. Concepts like 'strategy' have far-reaching implementation trade-offs that need to be considered at design time.
Contains packages for different groups of models, with the Java code:
All of the above are RawDataModelObjects meaning they are bi-temporal in nature.
Separates out the record-keeping date from the system date (technical). The technical date should only be used for debugging, it should have no impact on business processing. Where date/time gets complex additional business modelling should be done. Let's use a bond issuance as an example:
In this example above, the first set of dates explain date information about the bond. It must be explained via annotations so that each field has a clear meaning. The validfrom date is simply for system tracking purposes. In this case the bond may not have existed in the system until 2021 perhaps because no-one was interested in it. If, for some reason, we want to track the first time a user was interested in the bond, and therefore created it, a new business field with annotations should be created, rather than relying on the validFrom date to inform the user.
This is very important when it comes to a view on aggregated data. We are only interested in the latest state of data as it exists in the system for any given business date. If we advance to use cases such as year-end statements with revisions, we need to create business concepts to allow it to be implemented. For example, when it comes to year end processing, there are a couple options:
The above philosophy is very important so that we don't end up re-using a technical field for various different business reasons across the infrastrcuture.
Run:
cd proto
protoc -I=. --java_out=./java ./**/*proto
mvn clean deploy -Dgpg.passphrase=askDave -Pci-cd