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:
- Uncle Bob's Clean Code: Agile Software Craftsmanship (in London on 1st - 3rd November 2017)
- Whole Team Approach to Agile Testing (in London on 6th - 8th November 2017)
- Gojko Adzic's Specification by Example: From User Stories to Acceptance Tests (in London on 7th - 8th November 2017)
- Agile Testing & BDD eXchange 2017 (in London on 9th - 10th November 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.