samples-go  by temporalio

Samples for building resilient, scalable applications with Temporal Go SDK

Created 6 years ago
737 stars

Top 46.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This repository provides a comprehensive collection of sample applications for the Temporal Go SDK, designed to illustrate the capabilities of Temporal Server. It targets developers building stateful, distributed applications in Go, offering practical examples of various Temporal features and best practices to accelerate adoption and understanding.

How It Works

This repository showcases Temporal's distributed systems capabilities through a comprehensive suite of Go-based sample applications. It demonstrates core concepts like Workflows, Activities, Signals, and Queries, emphasizing Temporal's deterministic execution model. Samples guide users on correctly implementing concurrency using Temporal coroutines (workflow.Go()) and selectors (selector.Select()) to avoid non-determinism, a critical aspect for reliable stateful applications.

Quick Start & Requirements

Temporal Server must be running locally (via VSCode Remote Containers or manual setup). Clone the repository to begin. The 'helloworld' sample is recommended as a starting point. Specific prerequisites beyond Temporal Server and the Go SDK are not detailed.

Highlighted Details

  • Core Concepts: Basic, mTLS, API Key authentication, external configuration, standalone activities.
  • API Demonstrations: Asynchronous activity completion, custom retries with heartbeats, child workflows (including ContinueAsNew), cancellation, cron jobs, schedules, encryption, external payload storage (S3), queries, sessions, signals, search attributes, tracing, OpenTelemetry, and worker versioning.
  • Dynamic Logic & Patterns: Dynamic workflows, branching, mutexes, saga patterns, Nexus for cross-namespace calls, and worker-specific task queues.
  • Advanced Scenarios: DSL-based workflows, file processing, particle swarm optimization, Prometheus metrics, various request/response patterns, and serverless Lambda workers.
  • Internal Tools: Fixtures for edge cases and bug reporting.

Maintenance & Community

Links to the Temporal Server (temporalio/temporal) and Go SDK (temporalio/sdk-go) repositories are provided, along with Go SDK documentation (docs.temporal.io/dev-guide/go). Further community or maintenance details are not specified in the README.

Licensing & Compatibility

The repository's README does not specify a license. This omission requires clarification for adoption decisions, particularly regarding commercial use or closed-source integration.

Limitations & Caveats

Some features, such as 'Eager Workflow Start,' are experimental. The samples strictly enforce Temporal's deterministic execution rules, requiring the use of Temporal coroutines (workflow.Go()) and selectors (selector.Select()) over native Go concurrency primitives to prevent non-determinism.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
17
Issues (30d)
0
Star History
21 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.