clarencen/lshift — Issue #65: WIre event should be defined in the participant support lib
Author: clarencen
Created: 2011-11-14 22:41:33+00:00
State: open

We need to move the definition of the WireEvent into the participant support library. This should also include porting the necessary serialization support for it into the same lib, i.e. merge the scala JSONSerilizationUtils into the java JSONHelper.

Also, whilst doing this, we should rename it to `ChangeEvent` (and remove the existing kernel ChangeEvent, since the non-PairChagneEvent hierarchy isn't required), and straighten the event definition to look like this:

* Id (string, mandatory)
* Previous version (string, optional) *
* Version (string, mandatory)
* Last update (timestamp, optional)
* Attributes (string -> object map, optional)

This lines up the event definition to look like an extended version of the ScanResultEntry.

When mapping these internally, the type of ChangeEvent created should depend on the usage of the endpoint it is sent to in a pair. For example, an event that comes in could be an upstream event for use in one pair, and a downstream event for another.

(*) The previous version is only ever used when generating a downstream correlated change event. In this case, the "previous version" is the upstream version, and the "version" is the downstream version.