Skip to content
Code and materials for book "Functional Design and Architecture"
Haskell Scala HTML
Branch: master
Clone or download
Latest commit 985b897 Jul 21, 2019

README.md

Functional Design and Architecture

Code and materials for book "Functional Design and Architecture"

Book page

Support the book!

What this book is about?

The book is focusing on these topics:

  • Architecture modelling, requirements analysis, subsystems design from FP point of view;
  • Embedded and external DSLs in domain modelling;
  • Monads as subsystems with effects;
  • Free monads as functional interfaces;
  • Other types of functional interfaces;
  • Inversion of Control in FP (using Free monadic eDSLs);
  • Applicability of mainstream techniques and approaches such as UML, SOLID, GRASP;
  • Interaction with impure subsystems.

The book is 50% done. 5 chapters are published online:

Additional materials

References list

References List

Andromeda

This is the first project created specially for the book. It demonstrates the ideas from the book in a standalone application simulating a SCADA system for spaceships.

Andromeda SCADA-like system

Hydra

This is the second project created for the book. It's a framework similar to the Node framework for building multithreaded and concurrent applications in Haskell using the approaches and patterns from the book. It's interesting that the project has three different engines: Final Tagless, Free Monad and Church Encoded Free Monad, - and you can see the differences between these approaches by checking the different implementations of the same application.

Node project

The Node is the most advanced production code in Haskell based the ideas of this book.

The Node Framework makes building of network acting nodes simple. It allows to handle concurrent state (with STM), work with KV database, host TCP, UDP and JSON-RPC servers, write network clients, interactible CLIs and more. The code of the nodes will be testable, safe and well-maintainable.

This framework can be a reasonable replacement for Cloud Haskell. I've wrote a detailed post about framework usage and architecture:

Building network actors with Node Framework

Juspay PureScript Presto Framework

I also was working for Juspay (India, Bangalore). In there, we have created two big projects in PureScript with the same central ideas of Free monads and architecture. The Presto framework for building mobile apps was published. The most of code (including Free eDSL and runtime) is designed and written by me:

PureScript Presto

Another project I was working on with some other great India developers was about distributed persistable resumable workflows, in PureScript, Node.JS and RabbitMQ. This project is not published yet, but it also based on Free monad architecture. Moreover, persistency of workflows and ability to pause them at any time is achieved due to special interpreters utilizing a RecorderT transformer.

You can’t perform that action at this time.