March 2021 Meetup

May 27, 2021

This meetup was held Thursday March 25th.

This month we have a 2 part series for you on Rules Engines in Elixir:

  • Luke Galea presented on Rules Engines & Elixir
  • James MacAulay presented an Elixir based library to solve these very problems.  Ruler, is a package that lets you define business rules in Elixir using a familiar pattern-matching syntax, and to efficiently apply those rules to facts about the world.

Rules Engines & Elixir

Luke Galea presentation:

Abstract
Elixir is built on Erlang, which was originally built on Prolog. Joe Armstrong, creator of Erlang, wrote "had it not been for Prolog it is doubtful whether a language such as Erlang would have emerged."

  • What was it about Prolog (and logic programming) that led to Erlang's success?
  • What can we learn from Elixir's logic programming roots that we can apply to systems architecture today?

I'll be talking about the limits of elixir's pattern matching, the role of rules engines and how they can help manage complexity. Where are they best used and best avoided? How do they fit into Event Driven Architecture, Domain Driven Design and CQRS/ES? Where are they being used heavily today?

Ruler: a rules engine for Elixir applications

Then James MacAulay will presented an Elixir based library to solve these very problems.

Abstract
In this talk I will introduce Ruler, a package that lets you define business rules in Elixir using a familiar pattern-matching syntax, and to efficiently apply those rules to facts about the world. As requirements become more complex over time, Ruler can help you ensure that your application responds appropriately to every situation.

Under the hood, Ruler is built on an immutable version of the Rete algorithm which lets it efficiently scale to large sets of complex interacting rules. By leveraging Elixir's powerful macro system and immutable data structures, Ruler is able to provide compelling usability benefits compared with inference engines typically available on other platforms.