Please log in to watch this conference skillscast.
Finch is a purely-functional library for building composable REST APIs on top of Finagle.
It's well known and widely adopted in Finagle that "Your Server as a Function" uses
Request => Response. In a REST API setting this function may be viewed as
Request =1=> (A =2=> B) =3=> Response, where transformation 1 is request decoding (deserialization), transformation 2 -is business logic and transformation, and transformation 3 is- response encoding (serialization).
The only interesting part here is transformation 2 (i.e.,
A => B). Since it's usually a challenge to deal with pure functions in real-world problems, we wrap this into a monad M[_], so that a transformation (i.e,
flatMap) M[A] => M[B] encodes the business logic of a REST API server.
This and other ideas are implemented in Finch, a purely-functional library for building composable REST APIs on top of Finagle.
Read about Your Server as a Function here.
YOU MAY ALSO LIKE:
- DDD eXchange 2017 (in London on 27th - 28th April 2017)
- Building Evolutionary Architectures (in London on 16th May 2017)
- Greg Young's CQRS, Domain Events, Event Sourcing and how to apply DDD (in Stockholm on 22nd - 24th May 2017)
- Alberto Brandolini's DDD Modelling Workshop (in London on 26th - 28th June 2017)
Finch: Your REST API as a Monad
Vladimir started his software engineering career working on compilers and virtual machines at Intel. After several years of writing C++, he decided to switch camps and joined the Finagle team at Twitter.