This presentation introduces a systematic approach to designing microservices using a visual language, beginning with the identification of requirements and distillation into messages that dictate service interactions. The methodology is illustrated through the process of developing a user registration system, breaking down the requirements into discrete messages like 'register-user' and 'confirm-email', which in turn inform the design of specific services handling registration and email confirmation.
The discussion extends to the temporal and functional dynamics of microservice interactions, differentiating between synchronous and asynchronous, as well as consumed and observed messages, using a unique visual lexicon where hexagons represent microservices, solid and dashed lines denote synchronous and asynchronous communications, and arrow styles distinguish between message consumption and observation.
The narrative further concretizes these concepts by outlining the design of a Node.js module search engine, showcasing how business requirements translate into a network of microservices handling search, indexing, and module detail presentation. The intricate web of service interactions is depicted through the visual language, demonstrating how services like 'web', 'search', 'npm', and 'github' collaborate through well-defined message patterns.
By the conclusion, attendees are equipped with a versatile framework for microservice design, capable of transforming complex system requirements into clear, manageable service components, as exemplified by the 'nodezoo' search engine project. This methodological approach not only clarifies the architecture of microservices systems but also facilitates their scalability, maintainability, and evolution over time.
6. Requirements
๏ a) capture user details
๏ b) send confirmation email
Messages
๏ a) register-user: {name: ..., email: ...}
๏ b) confirm-email: {email: ...}
7. Requirements
๏ a) capture user details
๏ b) send confirmation email
Messages
๏ a) register-user: {name: ..., email: ...}
๏ b) confirm-email: {email: ...}
Services
๏ registration sends register-user to user
๏ user sends confirm-email to mailer
17. Let's build a Search Engine
for Node.js modules...
Business Requirements:
๏ a) search for Node.js modules
๏ b) index published Node.js modules
๏ c) show Node.js module details
18.
19.
20. Requirements
๏ a) search for Node.js modules
Messages
๏ role:search,cmd:search (sync+consume)
Services
๏ web sends role:search,cmd:search to
search
22. Requirements
๏ b) index published Node.js modules
Messages
๏ role:search,cmd:insert (async+observe)
Services
๏ npm sends role:search,cmd:insert to
search
26. Requirements
๏ c) show Node.js module details
Messages
๏ role:info,need:part (async+observe)
๏ role:info,collect:part (async+observe)
Services
๏ info sends role:info,need:part to npm,
github
๏ npm, github send role:info,collect:part to
info