lc_distribution_events (faber_neuroevolution v1.2.4)
View SourceBehavioral event constructors for Distribution Silo.
Events related to distributed computing, islands, and load balancing. Distribution Silo operates at timescale τ=60.
Summary
Types
-type distribution_event() :: #island_created{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, island_id :: binary(), cluster_id :: binary(), initial_population_size :: non_neg_integer(), compute_capacity :: float(), connected_islands :: [binary()]} | #island_destroyed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, island_id :: binary(), cluster_id :: binary(), destruction_reason :: consolidation | failure | migration, final_population :: non_neg_integer(), individuals_migrated :: non_neg_integer()} | #migration_route_established{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, route_id :: binary(), source_island_id :: binary(), target_island_id :: binary(), bandwidth :: float(), latency_ms :: non_neg_integer()} | #migration_route_severed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, route_id :: binary(), source_island_id :: binary(), target_island_id :: binary(), severance_reason :: failure | policy | consolidation} | #load_rebalanced{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, cluster_id :: binary(), load_variance_before :: float(), load_variance_after :: float(), individuals_migrated :: non_neg_integer(), rebalance_strategy :: random | fitness_based | load_based} | #topology_updated{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, cluster_id :: binary(), topology_type :: ring | mesh | star | hierarchical, island_count :: non_neg_integer(), route_count :: non_neg_integer(), diameter :: non_neg_integer()} | #node_joined{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, node_id :: binary(), cluster_id :: binary(), compute_capacity :: float(), assigned_islands :: [binary()]} | #node_departed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, node_id :: binary(), cluster_id :: binary(), departure_reason :: graceful | failure | eviction, affected_islands :: [binary()], individuals_orphaned :: non_neg_integer()} | #synchronization_completed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, cluster_id :: binary(), islands_synchronized :: [binary()], sync_duration_ms :: non_neg_integer(), conflicts_resolved :: non_neg_integer()}.
-type timestamp() :: integer().
Functions
-spec event_to_map(distribution_event()) -> map().
-spec island_created(map()) -> #island_created{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, island_id :: binary(), cluster_id :: binary(), initial_population_size :: non_neg_integer(), compute_capacity :: float(), connected_islands :: [binary()]}.
-spec island_destroyed(map()) -> #island_destroyed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, island_id :: binary(), cluster_id :: binary(), destruction_reason :: consolidation | failure | migration, final_population :: non_neg_integer(), individuals_migrated :: non_neg_integer()}.
-spec load_rebalanced(map()) -> #load_rebalanced{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, cluster_id :: binary(), load_variance_before :: float(), load_variance_after :: float(), individuals_migrated :: non_neg_integer(), rebalance_strategy :: random | fitness_based | load_based}.
-spec migration_route_established(map()) -> #migration_route_established{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, route_id :: binary(), source_island_id :: binary(), target_island_id :: binary(), bandwidth :: float(), latency_ms :: non_neg_integer()}.
-spec migration_route_severed(map()) -> #migration_route_severed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, route_id :: binary(), source_island_id :: binary(), target_island_id :: binary(), severance_reason :: failure | policy | consolidation}.
-spec node_departed(map()) -> #node_departed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, node_id :: binary(), cluster_id :: binary(), departure_reason :: graceful | failure | eviction, affected_islands :: [binary()], individuals_orphaned :: non_neg_integer()}.
-spec node_joined(map()) -> #node_joined{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, node_id :: binary(), cluster_id :: binary(), compute_capacity :: float(), assigned_islands :: [binary()]}.
-spec synchronization_completed(map()) -> #synchronization_completed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, cluster_id :: binary(), islands_synchronized :: [binary()], sync_duration_ms :: non_neg_integer(), conflicts_resolved :: non_neg_integer()}.
-spec topology_updated(map()) -> #topology_updated{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, cluster_id :: binary(), topology_type :: ring | mesh | star | hierarchical, island_count :: non_neg_integer(), route_count :: non_neg_integer(), diameter :: non_neg_integer()}.