The Talon Manual

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
div
idtoc
classtoc
div
classtocTitle

In This Section

div
classtocContents

Table of Contents
maxLevel2
indent8px
stylenone

Overview

When

Excerpt

When working with Event Sourcing, applications cannot make business logic decisions that affect recoverable state or the contents of outbound messages based on data in the local environmental or reference data that may be out of sync with backup instances. Doing so can lead to situations where a backup application instance makes different decisions than the primary

instances leading to

instance that result in divergent state. Divergence of state can causes major problems if the backup takes over after a failure in the primary.

 

 This section introduces Talon's Environment Replication feature which provides developers with a means of avoiding such pitfalls in a manner that doesn't incur major performance overhead.

One approach to making sure that primaries and backups are always operating on the same reference data is to inject that data into the applications messaging stream for use in subsequent business logic decisions. This approach is not always tenable. Consider a financial trading system making time sensitive order routing decisions based off a "firehose" of market data. A logically valid approach would be to inject all market data directly into the event sourced application's replication stream, but in reality such an approach is infeasible as it would overwhelm the application with data that will mostly be ignored. 

Talon provides an alternative approach to solving this problem, called Environment Replication. With this approach the platform provides an API which allow applications to write HA safe environment providers that capture local decisions on the primary instance into a capture buffer that is replicated along with the inbound message being processed. On the backup instance the capture buffer is then used to playback the same results as were used on the primary thereby allowing the same business logic decisions to be made. Environment providers are fairly simple to write and simple for applications to work with. For example, Exegy, in partnership with Neeve backed their entire market data api with an environment provider in a matter of days, providing a seamless solution to the market data problem referenced above. With this approach market data is received out band with the respect to the trading application's order processing messages, as the primary instance of a trading application looks at current market data while processing messages the values it sees are captured and replicated to the backup such the the backup instances see the same values. In this fashion the entire stream of market data being absorbed by Exegy need not be replicated to backup instances, just the data that the primary instance uses in making decisions is replicated. 

This section discusses how a developer can write an environment provider to replicate its own replication data.

...