bluzky
Hi folks,
I’m working to build a workflow engine for my company project. We would like to build something dynamic and easy to add new integration with 3rd party services because we are building a kind of centralized hub for e-commerce.
I don’t have much experiences with building something so dynamic like that.
I would like to ask for advices on the system component, how an engine should be, which patterns I can apply. I started this project a couple of weeks ago, and with the help of AI I build and refactor and repeat. But not sure if I’m on the right direction.
Here is my work in progress GitHub - bluzky/prana · GitHub
Please give me some insight, that’ll be great help.
Thank you
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
gtcode
Useful project.
Suggestions/inquiries:
Can you create
examples/README.mdand/or ref it in the mainREADME.md?Are there external integrations, either with mocks or disabled by default when running
mix testwith clear tags?Are you doing static analysis with
dialyzer?Perhaps consider adding a runner for
githubto show the green check, indicating all default tests pass?bluzky
Thanks @gtcode, external integrations are implemented at main application.
I’m working to test integrating to our main application. Keep back and ford to refactor to adapt to application needs. Lots of unknown here.
madclaws
Glific is a graph-based chatbot creation platform. The backend is in Elixir which handles the floweditor engine, like executing a graph of nodes. Maybe you can check this out.
https://github.com/glific/glific
bluzky
Thank you, I’m looking into it
nerdyworm
I went through the codebase, everything I would expect of a workflow engine is there. Very nice implementation, good work.
What I would expect from an engine is the ability to recover from:
When i start my elixir cluster again, absolutely nothing should be lost and the system should eventually return to my 10000 workflows to a running state as if nothing happened.
That is one of the hard parts about these things.
There a few open source examples for your examination:
https://github.com/cadence-workflow/cadence
temporal.io · GitHub (more programmer focused)
Oban Pro has the ability to do run workflows, however it’s closed source (possibly wrong here)
^ those are like end game solutions, it’s not actually too hard to track workflow execution state using postgres or similar to get durability. The simple solution works just as well at a normal scale
I’d also look at business process engines, same idea, but just different style of implementation.
Awesome work though
Looking forward to seeing how it progresses over time.
gtcode
While reading your post, postgres came to mind for durability, and then you mentioned it!
I’m working on related problems. Thanks to reading the posts, I just thought of these integration concerns related to durability and resiliency:
Step Recovery
Pure Deterministic (No Side Effects): Mathematical calculations, data transformations, pure functions. These are truly idempotent - same input always produces same output with no external impact. Retry freely without concern. Examples: JSON parsing, mathematical computations, string manipulations.
Deterministic with Side Effects: Database writes, file operations, REST API calls with predictable behavior. The logic is deterministic but external state matters. Implement conditional idempotency using techniques like: check-then-act patterns, unique transaction IDs, upserts over inserts, and proper state validation before retry. Examples: user registration, inventory updates, email notifications with deduplication keys.
Non-Deterministic without Side Effects: AI inference, random number generation, heuristic algorithms that don’t modify external state. Use semantic idempotency - ensure the intent/goal remains consistent even if exact outputs differ. Checkpoint based on meaningful progress rather than exact state. Examples: content generation, recommendation algorithms, data analysis with ML models.
Non-Deterministic with Side Effects: AI agents making API calls, LLM-powered workflows that interact with external systems, adaptive processes that learn from environment. The most complex category - combine semantic idempotency with careful side effect management. Implement context-aware checkpointing that captures both progress and environmental assumptions, validate external state on recovery, and design for graceful adaptation when conditions change. Examples: AI agents conducting research and filing reports, automated trading systems, dynamic workflow orchestration.
Workflow Management
Design Strategy: Structure your workflow engine with step classification at the core - each step declares its category (pure deterministic, deterministic+side effects, non-deterministic, non-deterministic+side effects) which drives the recovery logic. Store step definitions, execution state, and checkpoints in Postgres with proper transaction boundaries.
Implementation Approach: Use Postgres transactions to atomically update step status and checkpoint data. For deterministic steps, store minimal state (input/output hashes, completion flags). For non-deterministic steps, serialize rich checkpoint data including context, assumptions, and partial progress. Implement a recovery coordinator that reads the step type and applies the appropriate strategy: simple retry for pure functions, conditional retry with state validation for side-effect deterministic steps, checkpoint-based resumption for non-deterministic work. Leverage Postgres’s ACID properties to ensure your workflow state itself remains consistent even when individual steps fail, and use row-level locking to handle concurrent workflow executions safely.
Please share revisions/correction/enhancements based on your knowledge and experience.
bluzky
Thank @nerdyworm for your references.
Recovering workflow execution is what I’m stuck with. Thanks @gtcode for pointing out above, it’s very clear. your comments lighted up my mind. I’m currently overloaded by too many problems, so I decide to integrate with our main application first to test a real workflow. Then I’ll come back to add more improvement later. I know that will break lots of things and take much effort to refactor. But I think it’s better than get stuck of trying solving complicated problems and make no real progress
I’ll update progress later when I come back to play with these recovery strategies.
venkatd
Hi, we have an internal workflow engine that quite different from n8n (code-only). Two thoughts. The API may be easier to read if you take inspiration from Oban workflows: Oban.Pro.Workflow — Oban Pro v1.6.2. (Btw we are Oban Pro users and highly recommend!)
If you use a library like GitHub - bitwalker/libgraph: A graph data structure library for Elixir projects · GitHub validation/orchestration might be easier.
On another note, if you are interested in durable execution, we took a lot of inspiration from build systems and Nix. A lot of the same problems have been solved by compilers.
For example, imagine you need to compile a project and there is a compile error. What happens? A subset of the artifacts get stored and cached. Then you fix the error, recompile, and it picks up where you left off. Some of the compilation work is skipped over (no-op) and the ones for which you fixed the error are able to keep going.
Hope that helps, happy to discuss further ideas. Having something like n8n for Elixir would be amazing!
AndyL
I would look at (or use) Oban and Ash Reactor. Maybe someone in the Ash project would be interested in collaborating.
IMO gui workflow definition is optional. Kestra uses YAML files…
N8N has security/privacy/sustainability problems. An open-source Elixir-based workflow engine would be great.
felix-starman
We built something like this at Bridge Connector, before the company went under (bad mgmt).
Let me know what you’re struggling on at the moment and maybe I can help.
Take a look at OpenFn if you’re curious to see other approaches too
Questions:
Let me know, and I’d be happy to hop on a call sometime too