Temporal Workflow Engine
Temporal is an open-source distributed workflow orchestration platform for building reliable and scalable applications. Through workflows and activities, it provides core capabilities including automatic retry, state persistence, long-running support, and distributed transactions. This application deploys a complete Temporal service on LazyCat platform, including Server, Web UI, and PostgreSQL database, ready to use out of the box. Suitable for order processing, payment flows, data processing, microservice orchestration, and more.
## Temporal Workflow Engine Temporal official website: https://temporal.io/ Temporal is an open-source distributed workflow orchestration platform designed for building reliable and scalable distributed applications. Through the concepts of Workflows and Activities, it helps developers easily implement complex business process orchestration. This application deploys a complete Temporal service on the LazyCat platform, including Temporal Server, Web UI, PostgreSQL database, and admin tools, ready to use out of the box. ## Core Features - ✅ **Automatic Retry Mechanism** - Activities automatically retry on failure without manual retry logic - ✅ **Execution Integrity Guarantee** - Workflows resume from interruption points even after service restarts - ✅ **Long-Running Support** - Supports workflow execution times from seconds to years - ✅ **Distributed Transactions** - Provides Saga pattern for simplified distributed transaction handling - ✅ **Observability** - Built-in Web UI to view workflow execution history and status - ✅ **Horizontal Scaling** - Workers can scale horizontally to increase processing capacity ## Main Components - **Temporal Server** - Core workflow engine service (gRPC port 7233) - **Web UI** - Workflow management and monitoring interface (accessible via application domain) - **PostgreSQL** - Persistent storage for workflow state and history - **Admin Tools** - Command-line management tools ## Usage Instructions ### 1. Access Web UI Access the Temporal Web UI directly through the application domain to view and manage workflow executions: ``` https://temporal.${BOXNAME}.heiyu.space ``` ### 2. Connect to Temporal Service Use the Temporal Go SDK in your application to connect to the service: ```go import "go.temporal.io/sdk/client" c, err := client.Dial(client.Options{ HostPort: "temporal.${BOXNAME}.heiyu.space:7233", }) ``` ### 3. Run Example Project This repository includes a complete order processing system example (order-demo) demonstrating: - 5-step order processing flow (Validation → Inventory → Payment → Shipping → Notification) - Automatic retry mechanism - Compensating transactions (Saga pattern) - Fault tolerance handling Start Worker: ```bash cd order-demo go run worker/main.go -temporal-address temporal.${BOXNAME}.heiyu.space:7233 ``` Run Client: ```bash go run client/main.go -temporal-address temporal.${BOXNAME}.heiyu.space:7233 ``` ## Use Cases - 📦 **Order Processing** - E-commerce order orchestration from creation to completion - 💰 **Payment Processing** - Complex payment flows and refund compensation logic - 📊 **Data Processing** - ETL processes, batch data processing tasks - 🔄 **Scheduled Tasks** - Complex scheduled task scheduling and retry - 🎯 **Microservice Orchestration** - Business process coordination across multiple microservices - 📧 **Notification System** - Reliable message sending and retry mechanism ## Technical Architecture - **Temporal Server Version**: 1.29.0 - **Web UI Version**: 2.40.1 - **Database**: PostgreSQL 16 - **Supported SDKs**: Go, Java, Python, TypeScript, .NET, PHP ## Important Notes - ⚠️ **Background Service**: This application is a background service and will run continuously without automatic sleep - 💾 **Data Persistence**: All workflow state and history data is stored in PostgreSQL, regular backups recommended - 🔒 **Single Instance Mode**: Application runs in single instance mode, suitable for small to medium scale scenarios - 🌐 **Network Access**: Workers can be deployed in any environment that can access the LazyCat platform ## Related Resources - 📖 [Temporal Official Documentation](https://docs.temporal.io/) - 💻 [Go SDK Documentation](https://docs.temporal.io/dev-guide/go) - 📦 [Sample Code Repository](https://github.com/temporalio/samples-go) - 🐙 [Project GitHub](https://github.com/lazycatapps/temporal)



