axelson

axelson

Scenic Core Team

15) ElixirConf 2017 - Perhap: Applying Domain Driven Design and Reactive Architectures to Functional Programming - Rob Martin

ElixirConf 2017 - Perhap: Applying Domain Driven Design and Reactive Architectures to Functional Programming - by @Version2beta

Perhap is a framework for building reactive applications in a Domain Driven Design (DDD) context, which makes it both opinionated in how you design your system, and highly efficient in how you implement it.

  • As an event store, Perhap receives events, persists them to Riak, Cassandra, or DynamoDB, and delivers them to consumers over HTTP or a message bus.
  • As a DDD application framework, Perhap extends that event store to route events to registered domain services implemented as pure functions (reducers), receive back domain models, and answer queries about entities or allow clients to subscribe to changes in an entity model.

Between these two use cases, Perhap provides a foundation for application development that focuses our attention on domain modeling and our development efforts on the front end and business logic only. We use the core concepts from Domain Driven Design to model our bounded context, entities, events, and models, all enforced by the framework. We get the benefits of a fully reactive architecture for free. Perhap fits extremely well with the Redux store, event, action pattern, or with the Elm model, update, view, subscribe architecture.

This talk focuses on why and how we’ve used Domain Driven Design to improve our design and architecture in a functional programming environment (specifically using Elixir), how the Reactive Manifesto influenced our choices, and how the product of that work, Perhap, can be used to quickly develop applications using those patterns. We’ll walk through a simple application built on Perhap.

As of May 28th, we’ve built three versions of Perhap - two proofs of concept, and an implementation as a production app that doesn’t break a sweat supporting 17,000 users generating a hundred thousand events a day for a Fortune 250 sportswear giant. The open source refactor is not production ready, but will be either ready or close to ready by ElixirConf.

Audience: Beginner-Intermediate

Links/References

All talks are available in the Elixir Conf 2017 Talks List or via the elixirconf2017 tag

Most Liked

JEG2

JEG2

Author of Designing Elixir Systems with OTP

Two thoughts:

  1. I love DDD talks
  2. I always wish DDD talks wouldn’t explain DDD via some libraries
Version2beta

Version2beta

I think Domain Modeling Made Functional does a good job of using F# for examples, but describing a functional approach to applying domain driven design. He describes DDD well, and then lays out a process, somewhat generically first and then implemented in code.

I reviewed Perhap with Scott a few weeks before this presentation and his feedback was generally positive in using Perhap according to the techniques he describes in the book.

lessless

lessless

How applicable is “Domain Modeling Made Functional”? I have a Functional and Reactive Domain Modeling from Manning and author relies heavily on a ADT to model domain data and except that almost nothing interesting for the Elixir developer there - all the same stuff that one will do normally: function composition and using OTP.

So the Elixir developer that book is half non-applicable, half trivial. I would say that biggest take away was from non-technical chapters :slight_smile:

Looking at the “Domain Modeling Made Functional” ToC I have a feeling that it’s can be the same situation with it.

Where Next?

Popular in Talks Top

axelson
ElixirConf US 2018 – Architecting Flow in Elixir - From Leveraging Pipes to Designing Token APIs – René Föhring (@rrrene) ...
New
axelson
by @SophieDeBenedetto LiveView’s reliance on server-rendered HTML and leveraging of bi-directional communication over WebSockets means ...
New
axelson
ElixirConf US 2018 Opening Keynote - The Next Five Years – José Valim (@josevalim) All talks thread:
New
LostKobrakai
After having watched the talk I'm wondering if this would also be a good opportunity to gather examples / tips about how to prevent or mi...
New
axelson
ElixirConf 2017 - Building Realtime Mobile Apps with React Native and Elixir - Osayame Gaius Obaseki Buildin...
New
New
axelson
ElixirConf 2017 - Closing Keynote - @chrismccord All talks are available in the Elixir Conf 2017 Talks List...
New
CodeSync
Code Sync: Keynote: The Road To LiveView 1.0 by Chris McCord | ElixirConf EU 2023 Comments welcome! View the #code-sync and #elixirconf-...
New
TwistingTwists
I am in middle of watching this. I have to stop every minute and think over what Chris just said. The amount of info he sends over that ...
New
axelson
by @jola Can you write a performant string processing scripts in Elixir? This talk attempts to answer that question while incrementally...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
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