Microservice Template
Talon provides two built-in microservice templates that implement different consensus models for maintaining state consistency across clustered microservice instances.
Available Templates
Uses Talon's State Replication consensus model where state changes are automatically replicated across all instances by the runtime. State is modeled using ADM (Application Data Model) and is transparent to the Talon runtime.
Best for: Applications requiring automatic state synchronization with minimal coding effort.
Uses Talon's Event Sourcing consensus model where state is maintained by replaying a deterministic sequence of events. State is opaque to the Talon runtime and maintained in your POJO objects.
Best for: Applications requiring full control over state management and complex business logic.
Choosing a Template
Both templates provide high-availability and fault tolerance but differ in how they achieve consistency:
State Replication: Runtime manages state synchronization automatically
Event Sourcing: Application code replays events to rebuild state
For a detailed comparison, see Consensus Models.
Next Steps
Review Consensus Models to understand the differences
Choose the template that fits your application requirements
Follow the template-specific guide for implementation details
Last updated

