Learning Serverless
Kindle Highlights
Sam Newman described them best in Building Microservices as “small, autonomous services that work together.”
“disagree, but commit.” Once the team has come to a decision, detractors’ concerns can be documented, but they must no longer be detractors; they must commit to the plan.
Streams are generally meant to be immutable, with new messages only being added to the end. Consumers are meant to keep track of their place in processing the queue (or an integration may handle this for them).
A stream is a sequence of events, messages, or data that can be processed after they have occurred, but in the same sequence as their occurrence, which can be repeated and distributed to multiple consumers or subscribers.
Conway’s Law: organizations that design systems are constrained to produce designs that are copies of the communication structures of these organizations. And it is just as true now as it was when Melvin Conway stated his theory in 1967.
However, it would be unwise to try and reprocess failures by the original function that the message failed, as this will cause recursion and other unintended side effects. You can instead use an integration to inspect failures to aggregate and report data about them to a human user.
Architectural decision records (ADRs) are artifacts that document the architectural choices made throughout the natural evolution of a project. By utilizing ADRs, your team will leave a useful, searchable record of changes being made, along with the rationale and reasoning that went along with them.
What happens if your task-queuing system becomes full and no longer accepts new tasks, and now your users can’t sign up? This is how issues compound, or cascade, to cause other issues. In this example, when one system (sending mail) failed long and hard enough, the outage caused another system to fail. When your system is composed of dominoes, space them to avoid a chain reaction when one falls. No matter how slow it is (it could have been an entire weekend before the queue filled up), a resilient system will be engineered to avoid this issue. You may not be able to afford such resilience in your current project, but you must be mindful of it.