Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Optional actor-level causality tracking #103

Closed
krasserm opened this issue Sep 8, 2015 · 1 comment
Closed

Optional actor-level causality tracking #103

krasserm opened this issue Sep 8, 2015 · 1 comment
Assignees
Milestone

Comments

@krasserm
Copy link
Contributor

krasserm commented Sep 8, 2015

Overview

The default for tracking happened-before relationships (= potential causality) of events is described in #68. Briefly, event-sourced actors on the same local event log share a vector clock entry. Consequently, the strong clock condition doesn't hold in this context. Concurrency of events can only be reliably detected if they have been emitted at different locations. Although this is reasonable default for many applications, others need a more fine-grained tracking of potential causality.

Individual EventsourcedActors (EAs) should be able to reserve their own entry in a vector clock, instead of sharing it with others on the same local event log. This should be possible by overriding a sharedClockEntry method to return false. When overridden, concurrency of events can be reliably detected even if they have been emitted at the same location.

Formalism

The causality tracking default, described in #68, satisfies the plausible clock condition which includes the weak clock condition. If all sources of concurrent activity (EAs) have their own entry in the vector clock, the strong clock condition holds. Given a function T that maps events to their vector timestamps, for any two events x and y, there is an isomorphism between vector timestamps and the causality relation between these events (see also VectorTime operators):

  • x = yT(x) equiv T(y) (equivalent)
  • xyT(x) < T(y) (happened-before)
  • x ↔︎ yT(x) conc T(y) (concurrent)

Given a subset of EAs that have their own entry in a vector clock and a subset of events E that is routed between these EAs, the strong clock condition also holds for all events in E, if these EAs do not additionally consume events for which the strong clock condition doesn't hold.

@krasserm
Copy link
Contributor Author

krasserm commented Jul 4, 2016

Optional actor level causality tracking has been disabled (see #280)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant