Object.SchemaEvolutionManager (object v0.1.2)

Manages schema evolution and self-modification across the object system. Implements distributed consensus for schema changes and evolution tracking.

Summary

Functions

Returns a specification to start this module under a supervisor.

Gets the evolution history for an object.

Gets evolution performance metrics.

Gets the current status of an evolution proposal.

Proposes a schema evolution for an object.

Starts the schema evolution manager GenServer.

Triggers a system-wide evolution.

Casts a vote on an evolution proposal.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_evolution_history(object_id)

Gets the evolution history for an object.

Parameters

  • object_id - ID of the object

Returns

Evolution history from the schema registry

get_evolution_metrics()

Gets evolution performance metrics.

Returns

Map with evolution statistics and performance data

get_evolution_status(proposal_id)

Gets the current status of an evolution proposal.

Parameters

  • proposal_id - ID of the evolution proposal

Returns

  • {:ok, status} - Current proposal status
  • {:error, :proposal_not_found} - Proposal not found

propose_evolution(object_id, evolution_spec)

Proposes a schema evolution for an object.

Creates an evolution proposal and initiates the voting process among eligible objects.

Parameters

  • object_id - ID of the object to evolve
  • evolution_spec - Specification of the proposed evolution

Returns

  • {:ok, proposal_id} - Evolution proposal created successfully

start_link(_)

Starts the schema evolution manager GenServer.

Initializes the evolution state and starts periodic evolution analysis.

Returns

  • {:ok, pid} - Successfully started evolution manager

trigger_system_evolution(evolution_type, parameters)

Triggers a system-wide evolution.

Parameters

  • evolution_type - Type of system evolution
  • parameters - Evolution parameters

Returns

  • {:ok, evolution_id} - System evolution initiated

vote_on_evolution(proposal_id, object_id, vote)

Casts a vote on an evolution proposal.

Parameters

  • proposal_id - ID of the evolution proposal
  • object_id - ID of the voting object
  • vote - Vote (:approve or :reject)

Returns

  • :ok - Vote recorded successfully