Temporal is a distributed, scalable, durable, and highly available orchestration engine used to execute asynchronous, long-running business logic in a scalable and resilient way.
Temporal Ruby SDK is the framework for authoring workflows and activities using the Ruby programming language.
Also see:
NOTE: This README is for the current branch and not necessarily what's released on RubyGems.
This SDK is under active development and has not released a stable version yet. APIs may change in incompatible ways until the SDK is marked stable.
During this time, we are requesting any/all feedback from early adopters. We welcome all forms of suggestions or
opinions. Please communicate with us on Slack in the #ruby-sdk
channel or via email at
sdk@temporal.io
.
Contents
- Quick Start
- Usage
- Client
- Workers
- Workflows
- Activities
- Telemetry
- Rails
- Ractors
- Platform Support
- Development
The Ruby SDK works with Ruby 3.2, 3.3, and 3.4.
Can require in a Gemfile like:
gem 'temporalio'
Or via gem install
like:
gem install temporalio
NOTE: Only macOS ARM/x64 and Linux ARM/x64 are supported, and the platform-specific gem chosen is based on when the gem/bundle install is performed. A source gem is published but cannot be used directly and will fail to build if tried. MinGW-based Windows is not currently supported. There are caveats with the Google Protobuf dependency on musl-based Linux. See the Platform Support section for more information.
NOTE: Due to an issue, fibers (and async
gem) are only
supported on Ruby versions 3.3 and newer.
Activities are classes. Here is an example of a simple activity that can be put in say_hello_activity.rb
:
require 'temporalio/activity'
# Implementation of a simple activity
class SayHelloActivity < Temporalio::Activity::Definition
def execute(name)
"Hello, #{name}!"
end
end