Presentation from Serverless Days Hamburg 2019 (https://hamburg.serverlessdays.io).
The main idea of hexagonal architecture is to allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases. On the other side, it is not trivial to run and test serverless applications locally. But what if we apply hexagonal architecture to serverless functions?
It seems they are natural fit!
With hexagonal architecture, your can design beautiful serverless functions, that can be run and tested locally or in the serverless environment. It also allows you to write unit tests without complex mocks, and as many integration tests as you need. As a bonus, your code looks clean and it’s easy to maintain, and hexagonal architecture helps you fighting vendor lock-in.
The main goal of this talk is to show you how to design testable serverless functions. It starts with explanation of hexagonal architecture and it’s importance for serverless apps, and it ends with real-world examples using Node.js.