StatesLanguage - Declaratively design state machines that compile to Elixir based :gen_statem processes with the States Language JSON specification

A few other notable achievements with the library. I’ve built a WAMP Client and Router that utilizes StatesLanguage for the protocol negotiation, also a distributed ephemeral KV store. If you’re interested in the implementation you can check them out here.

WAMPexClient -> https://gitlab.com/entropealabs/wampex_client
WAMPexRouter -> https://gitlab.com/entropealabs/wampex_router
ClusterKV -> https://gitlab.com/entropealabs/cluster_kv

4 Likes

Hi @entone Just found out about your library. Looks very cool!

I’m curious if it’s possible to use it for my case. We want to let users design their state machines and be able to run them. Is it something StatesLanguage is able to help with? Or how would you go about the problem that state machines need to be created at runtime?

1 Like

It’s definitely possible, and I should probably work up an example that I can show.

There’s an issue here that goes over the basic idea, Dynamic definition and evaluation of states machine · Issue #9 · entropealabs/states_language · GitHub

2 Likes

An example would help me a lot! Please do it :heart:

Ok, did it!

Here’s an example of configuring, compiling and running a StatesLanguage module and process at runtime

Enjoy!

5 Likes

Thank you for taking time for it. I really appreciate it! I’ll try it out at work.