chbla

chbla

Advice needed: IoT Streams with Elixir: Rules engines?

Hi there,

We are running an internal platform for IoT sensors. Elixir is perfect for this especially with projects like genstage/flow/broadway.

However, we would like to integrate a rules engine for our data streams that can trigger actions like alerts, notifications based on thresholds, change over time, etc.

I’m therefore looking for options and frameworks that already exist and that we could a) easily plug in (e.g. using queues) and b) allow for seamless integration in our Phoenix application.

It’s quite difficult to find out what to search for, so far Influx Capacitor (TICK stack) sounds very promising. Besides that we could probably also use something like white labeled Node-Red (WYSIWYG) or parts of the ELK stack.

Does anyone have experience here or can share some recommendations/suggestions?

Thank you very much,
Christoph

Most Liked

chasers

chasers

Are pipelines not enough?

event
|> rule_a()
|> rule_b()
|> rule_c()

Or like you want to have a file that defines rules dynamically?

chasers

chasers

I think you could even have your rule modules, then a list of rule names that mapped to those modules and then dynamically built that pipeline based on the input of rule names from somewhere (a file, a database record, etc).

StefanHoutzager

StefanHoutzager

I have used a camunda rules modeler to create executable xml’s within a bpms. The interpreter for the rules I wrote in elixir (for one of the ruletypes). But camunda has it’s own interpreter written in java also. I never tried it, but here is a link https://camunda.com/products/dmn-engine/

StefanHoutzager

StefanHoutzager

Here is an intro to camunda dmn https://camunda.com/dmn/
The wysiwyg modeler is easy to integrate in your phoenix application.
There is drools also https://www.drools.org/ (eclipse ide plugin for development so no webfrontent I suspect), less lightweight (but mind you: “Drools Fusion (complex event processing features)”!), I do not know if it’s easy to integrate.
About different rules languages: https://stackoverflow.com/questions/52299097/drools-with-dmn-vs-drl

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement