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:
- Fast Track to RESTful Microservices (in London on 11th - 13th November 2019)
- Modern development with Java (in London on 9th - 11th December 2019)
- This Ain't Your Daddy's Probability Monad - Modelling Probabilistic Time in Haskell (SkillsCast recorded in October 2019)
- GraphQL: May the Best API Win! (SkillsCast recorded in July 2019)
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.