All Projects → linkyndy → Pallets

linkyndy / Pallets

Licence: mit
Simple and reliable workflow engine, written in Ruby

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Pallets

Pyflow
A lightweight parallel task engine
Stars: ✭ 108 (-50%)
Mutual labels:  workflow-engine, workflow
Microflow
Lightweight workflow engine
Stars: ✭ 129 (-40.28%)
Mutual labels:  workflow-engine, workflow
Openmole
Workflow engine for exploration of simulation models using high throughput computing
Stars: ✭ 120 (-44.44%)
Mutual labels:  workflow-engine, workflow
Kogito Examples
Kogito examples - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
Stars: ✭ 96 (-55.56%)
Mutual labels:  workflow-engine, workflow
Batchflow
BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflows even for datasets that do not fit into memory.
Stars: ✭ 156 (-27.78%)
Mutual labels:  workflow-engine, workflow
Nflow
nFlow is a battle-proven solution for orchestrating business processes. It can be used as microservices orchestrator (Saga-pattern), as business process engine or as persistent finite-state machine.
Stars: ✭ 96 (-55.56%)
Mutual labels:  workflow-engine, workflow
Kogito Runtimes
Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
Stars: ✭ 188 (-12.96%)
Mutual labels:  workflow-engine, workflow
Machine
Machine is a workflow/pipeline library for processing data
Stars: ✭ 78 (-63.89%)
Mutual labels:  workflow-engine, workflow
Etl unicorn
数据可视化, 数据挖掘, 数据处理 ETL
Stars: ✭ 156 (-27.78%)
Mutual labels:  workflow-engine, workflow
Django Lb Workflow
Reusable workflow library for Django
Stars: ✭ 153 (-29.17%)
Mutual labels:  workflow-engine, workflow
Flor
a workflow engine
Stars: ✭ 190 (-12.04%)
Mutual labels:  workflow-engine, workflow
Viewflow
Reusable workflow library for Django
Stars: ✭ 2,136 (+888.89%)
Mutual labels:  workflow-engine, workflow
Server
The Prefect API and backend
Stars: ✭ 87 (-59.72%)
Mutual labels:  workflow-engine, workflow
Petrinet
🚥 Petrinet framework for PHP
Stars: ✭ 107 (-50.46%)
Mutual labels:  workflow-engine, workflow
Workflows
Run Cloud Native workflows on any environment using Dapr
Stars: ✭ 84 (-61.11%)
Mutual labels:  workflow-engine, workflow
Microwf
A simple finite state machine (FSM) with workflow character where you define your workflows in code.
Stars: ✭ 122 (-43.52%)
Mutual labels:  workflow-engine, workflow
Loonflow
基于django的工作流引擎,工单(a workflow engine base on django python)
Stars: ✭ 1,153 (+433.8%)
Mutual labels:  workflow-engine, workflow
Theflow
Workflow automation library for .NET
Stars: ✭ 72 (-66.67%)
Mutual labels:  workflow-engine, workflow
Zeebe
Distributed Workflow Engine for Microservices Orchestration
Stars: ✭ 2,165 (+902.31%)
Mutual labels:  workflow-engine, workflow
Workflow core
[Deprecated, use flor_core instead] A Rails engine which providing essential infrastructure of workflow. It's based on Workflow Nets.
Stars: ✭ 171 (-20.83%)
Mutual labels:  workflow-engine, workflow

Pallets

Build Status

Simple and reliable workflow engine, written in Ruby

It is plain simple!

# my_workflow.rb
require 'pallets'

class MyWorkflow < Pallets::Workflow
  task 'Foo'
  task 'Bar' => 'Foo'
  task 'Baz' => 'Foo'
  task 'Qux' => ['Bar', 'Baz']
end

class Foo < Pallets::Task
  def run
    puts 'I love Pallets! <3'
  end
end
# [other task definitions are ommited, for now]

MyWorkflow.new.run

That's basically it! Curious for more? Read on or check the examples!

Don't forget to run pallets, so it can process your tasks: bundle exec pallets -r ./my_workflow

Features

  • faaast!
  • reliable
  • retries failed tasks
  • Redis backend out of the box
  • JSON and msgpack serializers out of the box
  • Rails support
  • beautiful DSL
  • convention over configuration
  • thoroughly tested

Installation

# Gemfile
gem 'pallets'

# or

gem install pallets

Configuration

Pallets.configure do |c|
  # How many workers to process incoming jobs?
  c.concurrency = 2

  c.backend = :redis
  c.serializer = :json

  c.backend_args = { db: 1 }

  # What's the maximum allowed time to process a job?
  c.job_timeout = 1800
  # How many times should a job be retried?
  c.max_failures = 3
end

For the complete set of options, see pallets/configuration.rb

Cookbook

DSL

Pallets is designed for developers' happiness. Its DSL aims to be as beautiful and readable as possible, while still enabling complex scenarios to be performed.

# All workflows must subclass Pallets::Workflow
class WashClothes < Pallets::Workflow
  # The simplest task
  task BuyDetergent

  # Another task; since it has no dependencies, it will be executed in parallel
  # with BuyDetergent
  # TIP: Use a String argument when task is not _yet_ loaded
  task 'BuySoftener'

  # We're not doing it in real life, but we use it to showcase our first dependency!
  task DilluteDetergent => BuyDetergent

  # We're getting more complex here! This is the alternate way of defining
  # dependencies (which can be several, by the way!). Choose the style that fits
  # you best
  task TurnOnWashingMachine, depends_on: [BuyDetergent, 'BuySoftener']

  # Specify how many times a task is allowed to fail. If max_failures is reached
  # the task is given up
  task SelectProgram => TurnOnWashingMachine, max_failures: 2
end

# Every task must be a subclass of Pallets::Task
class BuyDetergent < Pallets::Task
  # Tasks must implement this method; here you can define whatever rocket science
  # your task needs to perform!
  def run
    # ...do whatever...
  end
end

# We're omitting the other task definitions for now; you shouldn't!

Motivation

The main reason for Pallets' existence was the need of a fast, simple and reliable workflow engine, one that is easily extensible with various backends and serializer, one that does not lose your data and one that is intelligent enough to concurrently schedule a workflow's tasks.

Status

Pallets is under active development and it is not yet production-ready.

How to contribute?

Any contribution is highly appreciated! See CONTRIBUTING.md for more details.

License

See LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].