This presentation delves into the mathematical principles underpinning microservices, drawing inspiration from historical numeral systems to illustrate the significance of adopting efficient mental models in software architecture. By contrasting the complexities of Roman numerals with the streamlined Indian numerical system, the talk sets the stage for rethinking software design through an algebraic lens, where microservices are seen as algebraic functions transforming inputs to outputs, akin to CRUD operations.
The core idea revolves around conceptualizing microservices as operations on messages, ensuring seamless service integration within complex systems through transport independence and pattern matching. This approach fosters a loosely coupled architecture where services communicate based on message content rather than direct identities, enhancing system flexibility and scalability.
Practical examples, including the development of a Node.js module search engine, demonstrate the application of these concepts, showcasing the ease of system expansion and modification when services are designed to interact through a message-driven paradigm. The presentation concludes by underscoring the benefits of this methodology, such as increased system adaptability, easier management of technical debt, and a more granular approach to system evolution, advocating for a shift towards viewing microservices as integral components of a coherent and scalable system architecture.
7. 1. Normalize: XXIV → XXIIII
2. Eliminate: XXIIII - XV → XIIII - V
3. Expand: XIIII - V → VIIIIIIIII - V
4. Repeat 2 and 3 until no moves left
5. Reduce: IIIIIIIII → IX
XXIV - XV = ?
35. component model interface dimensionality
command line •stream of bytes
HTTP REST
•verbs (GET, POST, ...)
•headers (mini-formats)
Functions
•arguments
•types (scalar and complex)
Objects
•methods (instance and static)
•properties (instance and static)
•interfaces and class hierarchy
Plugins
•configuration
•lifecycle
•shared data structures
36. component model identity
command line none
HTTP REST network location and URL path
Functions reference or pointer
Objects reference or pointer
Plugins integration hooks
37. Command line pipes are a
highly effective component
model because:
a) no concept of identity
b) low dimension interface
38. The need to identify
components to each other is
bad because you:
•lose the ability to swap
•require static configuration
•get an hidden extra
dimension
39. A component interface with
many dimensions is bad
because you:
•get combinatorial explosion
•need "design patterns"
•have a weak human brain
40. You can use microservices as
a component model if you:
•remove the need for identity
•use schema-free messages
44. You can use microservices as
a component model if you
have two properties:
•Transport Independence
•removes identity
•Pattern matching
•one schema-free dimension
60. Requirements
๏ a) capture user details
๏ b) send confirmation email
Messages
๏ a) register-user: {name: ..., email: ...}
๏ b) confirm-email: {email: ...}
61. 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
71. 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
72.
73.
74. Requirements
๏ a) search for Node.js modules
Messages
๏ role:search,cmd:search (sync+consume)
Services
๏ web sends role:search,cmd:search to
search
76. Requirements
๏ b) index published Node.js modules
Messages
๏ role:search,cmd:insert (async+observe)
Services
๏ npm sends role:search,cmd:insert to
search
80. 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