Index Directives define how the index index should respond to business events.
Created by damonrolfs on 11/5/14.
IndexAggregate maintains the logical index for an Aggregate Root.
IndexAggregate maintains the logical index for an Aggregate Root. Index keys to identifier values are demesne.index.Directive.Recorded. Recorded events are published via a distrubuted pub/sub mechanism to a relay who makes sure the index is recorded in a local Index Akka Agent for easier access. Created by damonrolfs on 10/26/14.
IndexBus connects the index mechanism via Akka's EventBus framework.
IndexBus connects the index mechanism via Akka's EventBus framework. The rebister bus is used to route aggregate events to the IndexAggregate who maintains the local index for the Aggregate Root. Created by damonrolfs on 11/1/14.
envelope message used to deliver the index akka agent
Created by rolfsd on 8/16/16.
base index protocol type
Created by damonrolfs on 10/27/14.
Created by damonrolfs on 11/6/14.
Created by rolfsd on 8/15/16.
request index agent to be used in subscriber
notifies each local listener that the agent has completed initialization and is ready
marks the beginning of initializing the local index agent.
Utility function to make a standard event bus topic for events pertaining to a specific aggregate instance.
The index index defines a capability for maintaining a common registry for aggregate facilitating predefined LOGICAL actor lookups.
Indexes are kept in sync (eventually consistent) with changes to aggregate actors; e.g., creation, modification (todo), deletion (todo).
demesne.index.Index clients can use the instance to easily look up AggregateRoot identifiers based on logical keys or in bulk.
Indexes are eventually consistent with events pertaining to their AggregateRoots. Events flow from an AggregateRoot event publishing to a IndexRelay subscriber, who filters for events specified by the demesne.index.IndexSpecification defined in the AggregateRootType.indexes() sequence, and directs the event to the corresponding demesne.index.IndexAggregate. The IndexAggregate records the logical key to identifier mapping and published a Recorded event, which is picked up by local demesne.index.Indexs, such as an in-memory demesne.index.local.IndexLocalAgent or in the future a index backed by some other form of cache (perhaps Redis).
AggregateRoots override the publish() operation to publish events to the Index Index. demesne.index.IndexRelay actors listen for events published either via the IndexBus (default) or the ContextChannel subscription for a specific class. Aggregates can publish to additional channels by adding to the publish chain.
demesne.index.Index subscriptions are registered by overriding the AggregateRootType.indexes() operation. Each subscription is provided a partial function that is used to extract logical key to aggregate indentfier mapping from the published event. Events that don't match both the publish subscription of key-id extractor are ignored by the index index mechanism.