mudasobwa
Creator of Cure
Wrote some rant on Business Process Driven Development with Finite Automata (and Finitomata library in particular.)
Trending in Blog Posts
Hey everyone! :waving_hand:
I’ve published Part 7 of the Building Distributed Systems in Elixir series, where we build core distributed ...
New
So, instead of wasting my afternoon arguing with anonymous handles on X, I turned to my trusty, soulless assistant and said: “Listen, ple...
New
New article: Elixir Project Structure — From mix new to a Growing Codebase
I’ve published a new article in my Elixir learning series on d...
New
An educational side project in Elixir, Phoenix, and Tauri. I share what I learned while wiring Automerge into the BEAM, including how I s...
New
Wrote about how to safely run a globally unique process in an Elixir cluster, and a scary story from the past!
Learn about :global for r...
New
The way Phoenix is set up adding a CDN sub-domain for serving static assets, without worrying about the main dynamic content, is incredib...
New
What happens when an AI agent reaches its limit because the required tool isn’t in its catalog? Normally, you get a polite refusal.
I wa...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
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
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
D4no0
It would be interesting to see a real world example with ecto, because while using FSM seems like a great idea, in the real world we have to deal with server restart, migrations and other things, and a FSM doesn’t seem to be most flexible approach in this case.
In general we kind of use this concept in practice with phoenix by using the contexts pattern, having some well defined functions that interact with database in a controlled manner, and we use them to abstract actions that might change data across multiple tables with respect to business logic, the only thing of course is to enforce the developer to use them instead of direct operations to database.
mudasobwa
Technically, there is a [contrived] real-world example mentioned in the post, but it might be treated as a proof of concept only.
Server restarts are handled with loading all the entities in the intermediate states (in the middle of their lifecycle) as processes upon server restarts, and the migrations are handled in the same way as hot code upgrades in OTP itself.
This sounds as a great step towards data consistency, the only difference would be FSM does indeed prove the data is consistent.
That would not be so hard once using them is simpler and cleaner compared to direct calls, and our experience shows
Finitomatagives that to developers. Also, a couple of weeks of using it makes people feel why it makes total sense, it reminds me of a mind shift required when one start using OTP (actor model) instead of, say, JDK (pure OOP.)And yes, of course, I am working on the real-world example to be published.
D4no0
Definitely sounds very interesting, I will give it a try when I will have some time.
ChrisYammine
Taken from the blog post you shared. I’m sure you have lots of insightful things to say, but I don’t think you need to try and negatively characterize a group of people to say them.
RudManusachi
This reminded me of CQRS pattern, where “commands” are used to create/modify data (usually not directly to the DB schema but to some sort of an “event store”) and queries are “read only”.
mudasobwa
Yes, it is somewhat similar, oldie but goldie, and FSM are proven to keep a consistent state.