Migration notes 2.0

This page explains the changes required to migrate to the stated version of Atoti What-If.

Migrate to 2.0.0-AS6.0 and 2.0.1-AS6.0

Upgrading from version 1.9.0 See Atoti What-If 2.0.0-AS6.0 Release Notes.

Atoti What-If is using Atoti Server 6.0.3.

For new features and fixes included in these releases, please see:

Headline announcement

  • Top to bottom redesign : The API has been extensively redesigned to reduce coupling between implementation details and simulation parameters and make use of Atoti Server database service APIs. REST services have also been modified accordingly.
  • Simplified deliverables : Merged the whatif-core and whatif-examples libraries into a single whatif library.
  • Support for distributed simulations : Simulations are now fully supported in a distributed environment.
  • Removal of Netty messaging : The distribution implementation based on Netty messaging has been removed.
  • JSON-based persistence : Simulations are now persisted using JSON-based serialization.
  • Removal of the merge mechanism : Merging simulations into a parent branch is no longer supported.

Top to bottom redesign

Definition and simulation objects have been modified to allow easier serialization and leverage Atoti Server database service APIs. For implementation specifics, refer to Atoti What-If Components and Atoti What-If Implementation Example.

REST service changes

The following high-level changes have been made to the included REST services:

Removals

Endpoint HTTP method Reason
services/rest/what-if/getAllSubmissions GET Redundant data being retrieved.
services/rest/what-if/getSubmission?subId=xyz GET Redundant data being retrieved.
services/rest/what-if/getSpecificSubmission?subId=xyz GET Redundant data being retrieved.
services/rest/what-if/getAggregatedInformation?subId=xyz&taskId=xyz GET Redundant data being retrieved.
services/rest/what-if/merge?id=xyz POST We no longer support merging branches.
services/rest/what-if/whatIfDefinitions?id=xyz DELETE Definitions are now plugins and can’t be deleted individually. The specific instance contained in a simulation can only be deleted as part of that simulation.

Changes

Endpoint HTTP method New endpoint Description
services/rest/what-if/whatIfDefinitions GET services/rest/what-if/simulations/definitions/ Now returns a Set<Object> containing the simulation definition IDs.
services/rest/what-if/whatIfDefinitions?id=xyz GET services/rest/what-if/simulations/definitions/{key} Now returns a DatabaseSimulationDefinitionDTO object.
services/rest/what-if/whatIfSubmissions GET services/rest/what-if/simulations/ Now returns a list of DatabaseSimulationDTO objects.
services/rest/what-if/whatIfSubmissions?id=xyz GET services/rest/what-if/simulations/{simId} Refactored with no functional changes.
services/rest/what-if/whatIfSubmissions?id=xyz DELETE services/rest/what-if/simulations/{simId} Refactored with no functional changes.
services/rest/what-if/execute?id=xyz POST services/rest/what-if/simulations/execute/{simId} Now returns a DatabaseSimulationDTO object.
services/rest/what-if/whatIfBranches GET services/rest/what-if/branches Refactored with no functional changes.
services/rest/what-if/whatIfBranches?id=xyz GET services/rest/what-if/branches/{branchId} Now returns a list of DatabaseSimulationDTO objects.
services/rest/what-if/whatIfBranches?id=xyz DELETE services/rest/what-if/branches/{branchId} Now returns a DatabaseSimulationStatus object.

Additions

Endpoint HTTP method Description
services/rest/what-if/simulations POST Allows the creation of simulations through REST calls. The body is a DatabaseSimulationDTO object.
services/rest/what-if/version GET Retrieves the version of the Atoti What-If library.
services/rest/what-if/simulations/{simId}/diff GET Retrieves the before and after values for the definition associated with a simulation as a list of DatabaseSimulationDiffDTO objects, when implemented in a custom definition.

Simplified deliverables

The whatif-core and whatif-examples libraries have been merged into a single whatif library. The packages within the libraries have been updated accordingly, with the removal of the .core and .examples packages.

Support for distributed simulations

Simulations are now fully supported in a distributed environment. Atoti What-If leverages Atoti Server database service APIs, with distributed executions being handled through a RestDistributedDatabaseService using an IDistributedQueryResultsMerger. Within Business Solutions, a query node will use these distributed objects, allowing a single point of entry for the entire cluster.

Removal of Netty messaging

As the execution of simulations in a distributed environment is now using Atoti Server database service APIs, the following classes have been removed:

Class Description
BranchesFinderMessenger Messenger for discovering branches in a cluster.
BranchesRetrivalMessenger Messenger for discovering branches per address in a cluster.
BranchQuerierMessenger Messenger for querying a branch in a cluster.
DatastoreInfoMessenger Messenger for retrieving all datastore information from a cluster.
DatastoreMetadataMessenger Messenger for retrieving condensed datastore metadata from a cluster.
DeleteBranchMessenger Messenger for deleting branches in a cluster.
EpochMessenger Messenger for retrieving the epoch of the main branch.
ExecuteSubmissionMessenger Messenger for executing the simulations on a cluster.
QuerierMessenger Messenger for querying datastores in a cluster.
RollbackMessenger Messenger for reverting branch changes in a cluster.
WhatIfDistributedController Messaging Agent that monitors the cluster for changes.
WhatIfDistributedEngine What-if engine implementation that leverages distributed messengers to execute simulations on a cluster.
WhatIfDistributedExceptionHandler What-if exception handler that sends RollbackMessenger instances when exceptions are triggered in the cluster.

The distributed simulations are now using the same engine as local simulations, with the addition of the following classes:

Class Description
IDistributedQueryResultsMerger Interface for merging results from distributed queries.
DefaultDistributedQueryResultsMerger Implementation of the IDistributedQueryResultsMerger with support for all operations included in IDatabaseService.
DefinitionParser Implementation of IParser for DatabaseSimulationDefinitionDTO objects.
StatusParser Implementation of IParser for DatabaseSimulationStatus objects.
RestDistributedDatabaseService Implementation of IDatabaseService that executes operations against multiple RemoteDatabaseService instances and leverages the IDistributedQueryResultsMerger to merge the results.

JSON-based persistence

Simulations are now persisted using JSON serialization. The DatabaseSimulation and DatabaseSimulationDefinition objects and associated DTOs (DatabaseSimulationDTO and DatabaseSimulationDefinitionDTO) contain easily serializable parameters. The execution logic is now decoupled from the instance parameters, allowing instances created by the persistence manager to execute seamlessly.

Removal of the merge mechanism

Merging the results of simulations into the parent branch is no longer possible. For a secured implementation backed by workflows, use the Sign-off Module.