Hyperon concepts

Versioning

Some kinds of applications need to have business logic that varies in time. For example tariff tables or used formulas may have multiple versions arranged on a timeline.

Hyperon introduces 3 concepts to meet such requirements: region, version and timeline.

You can divide your business logic into separate areas called regions or create 1 region for all of them. Next fill them with parameters, functions and domain elements which we call versionable items. Technically speaking each versionable item can be assigned to only one region or left unassigned.

Once the regions are created you can define multiple versions of each region. Each version has its code unique within region. At this point, application connected to Hyperon can decide which version to use by simply setting this with Hyperon runtime API.

However, we can arrange region's versions on the region's timeline. Timeline shows which version should be used for any effective date, whether this date is provided by application or taken from system clock.

As in the case of parameters, functions or domain elements, each region and version is identified by code.

Consider sample configuration:

Region [A]
 version  : V1
 version  : V2
 timeline :
    01 jan 2015 - 01 dec 2015  :  use V1
    01 dec 2015 - 15 may 2016  :  use V2
    15 may 2016 - ...          :  use V1 again

Region [B]
 version  : standard
 version  : promo-march
 version  : promo-april
 timeline :
    01 jan 2015 - 01 mar 2015  :  use standard
    01 mar 2015 - 01 apr 2015  :  use promo-march
    01 apr 2015 - 01 may 2015  :  use promo-april
    01 may 2015 - 01 apr 2016  :  use standard
    01 apr 2016 - 01 may 2016  :  use promo-march
    ...
    

If parameter P is assigned to region A (which we write P@A) it can have different matrix defined for V1 and V2 versions. Similarly, functions F assigned to region B can have different body for standard and promo-april versions.

Above regions' configuration means that:

  • application getting value for parameter P for effective date 12-may-2015 will use its matrix from V1,
  • application getting value for parameter P for effective date 01-feb-2016 will use its matrix from V2,
  • application calling function F for 10-mar-2016 will use function's definition from promo-march version,
  • and so on.
More tutorials

Hyperon concepts