zaro

What is temporal service?

Published in Temporal Platform Component 3 mins read

A Temporal Service is a fundamental architectural element within the Temporal Platform, designed to orchestrate and manage durable executions of business logic. It is essentially the group of services, known as the Temporal Server, combined with Persistence and Visibility stores, that together act as a component of the Temporal Platform.

Understanding the Temporal Service

The Temporal Service acts as the core backend for applications leveraging Temporal's powerful workflow capabilities. It ensures the reliability, durability, and scalability of long-running operations, abstracting away the complexities of state management, retries, and failure handling.

Key Components of a Temporal Service

To function as a cohesive unit of the Temporal Platform, a Temporal Service integrates several distinct but interdependent components:

  • Temporal Server: This is the engine of the Temporal Service, comprising multiple specialized services that handle various aspects of workflow execution, task routing, and communication with Worker Processes. It's the "group of services" mentioned in the definition, responsible for executing the core logic of Temporal.
  • Persistence Store: This component is crucial for durability. It stores the complete state of Workflow Executions, Task Queues, and other critical metadata. This ensures that workflows can survive outages, retries, and continue their execution from the last known state without loss of progress. Common choices for a Persistence Store include robust databases like Apache Cassandra, MySQL, or PostgreSQL.
  • Visibility Store: The Visibility Store provides the ability to query and list Workflow Executions. It makes it possible to search for workflows by their ID, type, status, or other custom attributes, offering crucial insights into the system's ongoing and historical operations. PostgreSQL or Elasticsearch are typical selections for this store.

These components work in concert to provide a robust and resilient environment for executing complex, long-running business processes.

Role within the Temporal Platform

As a "component of the Temporal Platform," the Temporal Service is the backbone that enables developers to write fault-tolerant applications using Temporal Workflows. It ensures that even if application code or the service itself crashes, the workflow state is preserved and execution can resume, providing strong guarantees of progress and eventual completion.

Component Description Primary Function
Temporal Server Group of services that form the core execution engine. Orchestrates workflow execution and task management.
Persistence Store Database for durable storage of workflow state and task queue data. Ensures data durability and recovery.
Visibility Store Database for querying and listing workflow executions. Provides operational visibility and search.

Deployment and Implementation Guidance

For practical implementation and deployment, especially in production environments, specific guidance is available. The reference explicitly points to the "Self-hosted Temporal Service production deployment guide" for detailed instructions and best practices. This guide provides invaluable insights into configuring, scaling, and maintaining a Temporal Service.