Implement VM/Runtime for actors #147
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Only interfaces exist for
RuntimeandVirtualMachineincluster/types.goandcluster/distributed.go, but no actual implementation. Actors cannot be created, started, stopped, or have their state managed.Required Components
1. VM Implementation (cluster/vm.go - new)
Methods needed:
GetID(),GetActorID(),GetState()- already in interfaceStart()- replay events to rebuild stateProcessEvent(event *aether.Event)- apply event to stateStop()- persist final stateGetVersion()- current event version2. Runtime Implementation (cluster/runtime.go - new)
Methods needed:
Start()- initialize and start processingLoadModel(model eventstorming.Model)- register domain typesSendMessage(message RuntimeMessage)- route to appropriate VMGetActiveVMs()- return map of active VMsCreateVM(actorID string)- create new VM instanceStopVM(actorID string)- persist and stop VM3. Event Processing
Suggested Design
VM Lifecycle
State Management
Implementation Steps
cluster/vm.gocluster/runtime.goSetVMProviderFile Structure
Acceptance Criteria