mudasobwa

mudasobwa

Creator of Cure

Wrote some rant on Business Process Driven Development with Finite Automata (and Finitomata library in particular.)

Showing Posts 6 to 1

mudasobwa

mudasobwa OP

Creator of Cure

Yes, it is somewhat similar, oldie but goldie, and FSM are proven to keep a consistent state.

RudManusachi

RudManusachi

Instead of random requests, modifying the internal data of the application directly (as every single protocol known to me allows in a nutshell,) the endpoints in the web application should expose transition handlers only. The outmost world should not be allowed (and therefore even have an access) to modify data directly. It should be permitted to initiate transitions only.

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”.

ChrisYammine

ChrisYammine

There is even the brand new wording invented by people who had most likely never been to the university.

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.

D4no0

D4no0

Definitely sounds very interesting, I will give it a try when I will have some time.

mudasobwa

mudasobwa OP

Creator of Cure

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 Finitomata gives 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

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.

— All posts loaded —

Where Next? Top

Trending in Blog Posts Top

ryanzidago
Up until then, I found it very hard to communicate to LLMs that I specifically do not want to handle X case because maybe it has never ha...
New
UlfAnger
Hi all, I’ve built a small demo app to understand what an “AI agent” actually is under the hood, and to show it with Elixir’s own tools ...
New
pckrishnadas88
In Elixir, send/2 is non-blocking, which means an eager producer can easily flood a slow consumer’s mailbox. Because BEAM process mailbox...
New
tomazbracic
Secure boot and a verified root filesystem on an STM32MP157F-DK2 - with Nerves of course Four links of an authenticated boot chain on an ...
New
lawik
The words are insufficient to describe what transpired. What we tried to do met what the people wanted it to be. It became beautiful. Th...
New

Other Trending Topics Top

GenericJam
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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews