Package

demesne

index

Permalink

package index

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. index
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class CommonIndexSpecification[K, I, V] extends IndexSpecification with Equals

    Permalink
  2. case class ContextChannelSubscription(channel: Class[_]) extends RelaySubscription with Product with Serializable

    Permalink
  3. sealed trait Directive extends AnyRef

    Permalink

    Index Directives define how the index index should respond to business events.

  4. abstract class Index[K, I, V] extends AnyRef

    Permalink

    Created by damonrolfs on 11/5/14.

  5. class IndexAggregate[K, I, V] extends PersistentActor with ActorLogging

    Permalink

    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.

  6. class IndexBus extends ActorEventBus with SubchannelClassification

    Permalink

    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.

  7. case class IndexEnvelope(payload: Any) extends IndexMessage with Product with Serializable

    Permalink

    envelope message used to deliver the index akka agent

  8. final case class IndexIdentifier extends Product with Serializable

    Permalink

    Created by rolfsd on 8/16/16.

  9. sealed trait IndexMessage extends AnyRef

    Permalink

    base index protocol type

  10. class IndexRelay extends Actor with ActorLogging

    Permalink

    Created by damonrolfs on 10/27/14.

  11. trait IndexSpecification extends AnyRef

    Permalink
  12. class IndexSupervisor extends IsolatedDefaultSupervisor with OneForOneStrategyFactory with ActorLogging

    Permalink

    Created by damonrolfs on 11/6/14.

  13. case class IndexedValue[I, +V](id: I, value: V)(implicit evidence$1: ClassTag[I], evidence$2: ClassTag[V]) extends Product with Serializable

    Permalink

    Created by rolfsd on 8/15/16.

  14. type KeyIdExtractor = PartialFunction[Any, Directive]

    Permalink
  15. sealed trait RelaySubscription extends AnyRef

    Permalink
  16. trait StackableIndexBusPublisher extends EventPublisher

    Permalink
  17. class TaggingEventAdapter extends WriteEventAdapter

    Permalink

    Created by rolfsd on 2/5/17.

Value Members

  1. object Directive

    Permalink
  2. object GetIndex extends IndexMessage with Product with Serializable

    Permalink

    request index agent to be used in subscriber

  3. object IndexAggregate

    Permalink
  4. object IndexAggregateProtocol

    Permalink
  5. object IndexBus extends LazyLogging

    Permalink
  6. object IndexBusSubscription extends RelaySubscription with Product with Serializable

    Permalink
  7. object IndexIdentifier extends Serializable

    Permalink
  8. object IndexRelay extends LazyLogging

    Permalink
  9. object IndexSupervisor extends StrictLogging

    Permalink
  10. object Started extends IndexMessage with Product with Serializable

    Permalink

    notifies each local listener that the agent has completed initialization and is ready

  11. object WaitingForStart extends IndexMessage with Product with Serializable

    Permalink

    marks the beginning of initializing the local index agent.

  12. package local

    Permalink
  13. def makeTopic[K, I](name: String, rootType: AggregateRootType)(implicit arg0: ClassTag[K], arg1: ClassTag[I]): String

    Permalink

    Utility function to make a standard event bus topic for events pertaining to a specific aggregate instance.

Inherited from AnyRef

Inherited from Any

Ungrouped