When enterprises force their way into developing applications using serverless technology and scale quickly without the necessary scaffolding, they will soon create a tangled web of distributed monoliths, known as Ball of Serverless Mud (BoSM), as shown in figure 2-3. As an engineer, architect, technology advisor, or CTO, your responsibility is to prevent such calamities from unfolding in front of your eyes. Your focus should start somewhere else, away from serverless-first thinking, with an understanding of a few other first principles. Figure 2-3. Tangled event-driven ball of serverless mud. With first principles thinking, you look instead at the fundamentals of the problem space and think differently to build solutions to business problems your enterprise is trying to solve. In this space, serverless is just a technology enabler. The fundamental principles that are essential for your serverless adoption alongside the serverless-first principle are- Domain-first Team-first API-first Microservices-first Event-driven-first Serverless-first
The domain-first thinking is heavily influenced by the principles discussed by Eric Evans in his book Domain-Driven Design: Tackling Complexity in the Heart of Software. For an enterprise-scale serverless adoption, it is a forerunner for serverless-first thinking. Understanding the problem you are trying to solve with serverless is crucial. The business domain or problem can be clear and concise for start-ups or small-scale businesses. However, distinguishing between high-level and individual teams is essential for an enterprise with several operational areas. While most enterprises operate in one domain – retail, hospitality, insurance, gaming, toys, etc. – there are bigger enterprises that often have multiple domain areas. For example, Microsoft sells laptop computers and cloud computing services, and Amazon runs a retail business and Amazon Web Services.
Going deep into Domain-Driven Design is beyond the scope of this book. A good resource with practical examples is Learning Domain-Driven Design: Aligning Software Architecture and Business Strategy by Vlad Khononov (O’Reilly 2021).
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.