Created
July 4, 2024 10:52
-
-
Save sjmog/a96f2dccbae1c25dce54a20ef8f38f98 to your computer and use it in GitHub Desktop.
A Blocknote-encoded article about Event-Driven Systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"[{\"id\":\"f2722cbf-c819-4844-81ee-1cc9816d89a2\",\"type\":\"heading\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"level\":1},\"content\":[{\"type\":\"text\",\"text\":\"Event-Driven Systems\",\"styles\":{}}],\"children\":[]},{\"id\":\"c8f5a658-5e3a-42dc-8d41-6efcc3794909\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"The most advanced scaled systems in the world are \",\"styles\":{}},{\"type\":\"text\",\"text\":\"Event-Driven systems\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\".\",\"styles\":{}}],\"children\":[]},{\"id\":\"1fe99a7c-966f-4c32-ab0d-f1e8795eece5\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"In this article, we'll explore:\",\"styles\":{}}],\"children\":[]},{\"id\":\"092a9214-936a-459f-aa5b-7f73469f2cb6\",\"type\":\"numberedListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"What an Event-Driven system is,\",\"styles\":{}}],\"children\":[]},{\"id\":\"57a1ceaf-eb74-4bc4-85ba-baef4aa56550\",\"type\":\"numberedListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"How they tend to be architected,\",\"styles\":{}}],\"children\":[]},{\"id\":\"5c6917ca-bfd3-4223-9de6-63ecd20ed583\",\"type\":\"numberedListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Why they're so popular, and\",\"styles\":{}}],\"children\":[]},{\"id\":\"d72f1877-d64e-4ea4-9845-d7dcc1d6d360\",\"type\":\"numberedListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"How they influence the structure of tech organisations.\",\"styles\":{}}],\"children\":[]},{\"id\":\"1f676ac6-47a6-45fd-b273-371b07ed615b\",\"type\":\"heading\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"What's an Event-Driven system?\",\"styles\":{}}],\"children\":[]},{\"id\":\"704b1767-b27a-4e35-a0a2-f9b898e91f86\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Let's think back to the simple, non-distributed system we started with:\",\"styles\":{}}],\"children\":[]},{\"id\":\"3d725de7-9fbb-45a4-8b31-5653d9b9f284\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/2cYBVYv/Screenshot-2024-06-28-at-15-05-26.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"b0a73190-9180-4bd0-a56d-a165bd91f7a5\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Aahh.\",\"styles\":{\"italic\":true}},{\"type\":\"text\",\"text\":\" That takes me back.\",\"styles\":{}}],\"children\":[]},{\"id\":\"87b06d6c-e05b-4496-ba3f-541c7a0fe1b0\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"When things are simple, it's easiest to design systems that behave \",\"styles\":{}},{\"type\":\"text\",\"text\":\"synchronously\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\": they take in a request, spend time thinking about that request, and then return a response.\",\"styles\":{}}],\"children\":[]},{\"id\":\"51bdb0bb-c5b5-482d-81ad-75486d7be736\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"But as we've complicated the picture, perhaps by adding \",\"styles\":{}},{\"type\":\"text\",\"text\":\"horizontal scaling\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\":\",\"styles\":{}}],\"children\":[]},{\"id\":\"5286fb8d-9e18-40cc-95db-562d5357fed7\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/F7zzm1r/Screenshot-2024-06-28-at-15-59-42.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"2ce647a3-aaf9-4a6a-a554-e445b74a3412\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Then made it more complicated by splitting servers into \",\"styles\":{}},{\"type\":\"text\",\"text\":\"services and microservices\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\":\",\"styles\":{}}],\"children\":[]},{\"id\":\"a036adc2-4252-414f-bd3d-f7dea2737464\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/bBtz2BM/Screenshot-2024-06-28-at-16-03-40.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"bb3fb990-18f4-495e-ab63-8c2553867b5e\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And then more complicated by having our systems communicate with other sub-systems:\",\"styles\":{}}],\"children\":[]},{\"id\":\"f2c14f43-eb76-4783-a1e8-8bfdff61fc7f\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/HzTjmnT/Screenshot-2024-06-28-at-16-07-34.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"785d76e4-6542-4e04-b62e-8ef092faca57\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And perhaps a logging and monitoring sub-system too:\",\"styles\":{}}],\"children\":[]},{\"id\":\"ef8d9359-424d-4643-b7cc-013f68e482dc\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/bXmWmjw/Screenshot-2024-06-28-at-16-10-17.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"3e59adb9-828b-4f9d-8218-9989be51f5ec\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"...when we add all this complexity – this necessary complexity – we end up with quite a lot of long, tangled requests and responses.\",\"styles\":{}}],\"children\":[]},{\"id\":\"3bfc8782-2d2c-4ea5-a07e-da2d36aabcd3\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Just look at all those black arrows! Each of those requests and responses takes time to generate, to send, to receive, and to respond to. The more of them there are, the longer the system response time.\",\"styles\":{}}],\"children\":[]},{\"id\":\"77bb85d1-b013-4a93-99b7-84f99b80ef9e\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And perhaps more importantly – the more requests and responses within a system, the more complex it is to make sure every component can speak to every other component properly. In other words, the \",\"styles\":{}},{\"type\":\"text\",\"text\":\"system APIs\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\" become extremely complex.\",\"styles\":{}}],\"children\":[]},{\"id\":\"63b2c312-02e9-431a-a5ec-79121a871e97\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Event-Driven architecture is a way to solve these long chains of requests and responses, and the messiness of systems that rely on them.\",\"styles\":{}}],\"children\":[]},{\"id\":\"1c1efb2f-50d1-4347-9c8c-93c1b90ecf43\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Here's how an Event-Driven system works.\",\"styles\":{}}],\"children\":[]},{\"id\":\"e6378edf-e69d-4b33-ba1e-fa550869136d\",\"type\":\"heading\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"How does an Event-Driven system work?\",\"styles\":{}}],\"children\":[]},{\"id\":\"733babaf-558c-44b9-bd1e-d9b6ea90dc76\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"At the center of an Event-Driven system is a \",\"styles\":{}},{\"type\":\"text\",\"text\":\"queue\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\".\",\"styles\":{}}],\"children\":[]},{\"id\":\"31246321-bd0d-481a-b043-e7758a3dd56d\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/gJRNPYh/Screenshot-2024-06-28-at-16-43-30.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"b681acd4-3b7c-425e-b344-f17d8bb4f756\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Services \\\"publish\\\" \",\"styles\":{}},{\"type\":\"text\",\"text\":\"events\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\" onto this queue:\",\"styles\":{}}],\"children\":[]},{\"id\":\"c2d7b45e-c0fc-4f63-a526-b69ae8f00cbd\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/SwrLTBH/Screenshot-2024-06-28-at-16-29-55.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"5b3f3d2d-e303-4953-b475-3c5322b19d9a\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And other services watch the queue for events they know they can process. We say they are \",\"styles\":{}},{\"type\":\"text\",\"text\":\"subscribed\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\" to the queue.\",\"styles\":{}}],\"children\":[]},{\"id\":\"a135a2d8-e4e9-43f5-bc8b-0b7d7135384e\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"When a subscribed service sees an event, it picks it up off the queue and processes it:\",\"styles\":{}}],\"children\":[]},{\"id\":\"e12d1620-c6a1-4f06-b4cd-6e4619f698d6\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/mJGmBbR/Screenshot-2024-06-28-at-16-32-19.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"f2d7371c-6c8e-4be1-969c-93ecaa2919d7\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"...and may publish its result back on to the queue as a \",\"styles\":{}},{\"type\":\"text\",\"text\":\"new event\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\":\",\"styles\":{}}],\"children\":[]},{\"id\":\"c200d74a-e11a-47b6-a984-072a0c6c8be1\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/8dNQMSm/Screenshot-2024-06-28-at-16-33-18.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"08cb5591-8251-4d41-9890-01d0fc012a02\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Then, any other subscribed service capable of processing \",\"styles\":{}},{\"type\":\"text\",\"text\":\"that \",\"styles\":{\"italic\":true}},{\"type\":\"text\",\"text\":\"event that happens to be watching the queue – i.e. not currently processing – can pick up that event and process it:\",\"styles\":{}}],\"children\":[]},{\"id\":\"1510dc9c-3dff-4891-ba07-86284dd282b8\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/cNs8vkg/Screenshot-2024-06-28-at-16-34-22.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"8fcc12c9-c66a-4015-b983-05ee2387dccb\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"The event may trigger various other services to process and publish their own events.\",\"styles\":{}}],\"children\":[]},{\"id\":\"eb0130b7-05c1-4963-a54a-dafaee229d95\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Eventually, the service that submitted the first request spots a response event:\",\"styles\":{}}],\"children\":[]},{\"id\":\"08138c8c-703f-47d5-b694-4c23f2661bd3\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/mGnYDb7/Screenshot-2024-06-28-at-16-39-26.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"9b1cb0db-5713-46fc-8e09-3bd637431533\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"...uses it to generate a response, and responds to the client:\",\"styles\":{}}],\"children\":[]},{\"id\":\"05f3333c-9a69-43ff-983d-f0d08fdb243f\",\"type\":\"image\",\"props\":{\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"url\":\"https://i.ibb.co/nmfZjDW/Screenshot-2024-06-28-at-16-40-44.png\",\"caption\":\"\",\"width\":512},\"children\":[]},{\"id\":\"fb75544a-66e8-4c51-90ab-b805d3464f01\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And that's how it works!\",\"styles\":{}}],\"children\":[]},{\"id\":\"550be027-151a-4a0c-8512-2489068146b8\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"(This model is sometimes called a \",\"styles\":{}},{\"type\":\"text\",\"text\":\"Pub/Sub\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\" model, to reflect all the publishing and subscribing the services are doing.)\",\"styles\":{}}],\"children\":[]},{\"id\":\"8d0c7ab7-8aa0-4abe-a618-48fb2819baec\",\"type\":\"heading\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"Why Event-Driven systems?\",\"styles\":{}}],\"children\":[]},{\"id\":\"66cce746-acc3-4bb2-bc90-a738eb66c556\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Like all technologies, Event-Driven systems exist to solve problems. The main problems that they tackle are \",\"styles\":{}},{\"type\":\"text\",\"text\":\"system complexity\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\" and \",\"styles\":{}},{\"type\":\"text\",\"text\":\"organisational complexity\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\".\",\"styles\":{}}],\"children\":[]},{\"id\":\"3f91e65e-deea-4b71-b9be-8e465f3bc76c\",\"type\":\"heading\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"level\":3},\"content\":[{\"type\":\"text\",\"text\":\"How do Event-Driven systems reduce system complexity?\",\"styles\":{}}],\"children\":[]},{\"id\":\"3a4987e1-5f6d-42ce-b19f-70b016fa17d3\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"They're simpler.\",\"styles\":{\"bold\":true}}],\"children\":[]},{\"id\":\"fbb4d10d-40f5-461d-ae79-7afeac2c44d7\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Compare the Event-Driven architecture we showed above with the long-chain synchronous architecture we looked at to begin with.\",\"styles\":{}}],\"children\":[]},{\"id\":\"bea31a02-f0f4-4a92-ad59-a518f75a7718\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"There are far fewer of those long request-response chains. The Event-Driven system is \",\"styles\":{}},{\"type\":\"text\",\"text\":\"simpler\",\"styles\":{\"italic\":true}},{\"type\":\"text\",\"text\":\".\",\"styles\":{}}],\"children\":[]},{\"id\":\"1eb1bf81-107c-44cc-9b9d-0cccb7b2f64c\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And because components aren't communicating directly with one another – they're mostly interacting with events on the queue – their APIs can be less complex.\",\"styles\":{}}],\"children\":[]},{\"id\":\"e50ef493-cf07-48af-af3f-ab1e74f1e159\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"(Instead, it's important that the events are always written in precisely the right way: something a whole organisation can agree on.)\",\"styles\":{}}],\"children\":[]},{\"id\":\"2a6239fa-6274-414b-a15d-c508da68c1bb\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Simpler systems are easier to communicate, easier to reason about, easier to debug, and easier to build products on top of. Simpler is almost always better.\",\"styles\":{}}],\"children\":[]},{\"id\":\"fdc2c728-033a-4d04-a6b4-fdb942934661\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Concurrency.\",\"styles\":{\"bold\":true}}],\"children\":[]},{\"id\":\"b2ba3551-f827-42f3-9fa8-25efd731a8c9\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Event-Driven systems make it simpler to do \",\"styles\":{}},{\"type\":\"text\",\"text\":\"concurrency\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\". That is: it's an architecture purpose-built for \",\"styles\":{}},{\"type\":\"text\",\"text\":\"many things to happen at once\",\"styles\":{\"bold\":true}},{\"type\":\"text\",\"text\":\".\",\"styles\":{}}],\"children\":[]},{\"id\":\"05a63bd3-d3a5-4f86-9bdf-54d496b604ab\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"If you're operating a complex system with lots of steps, this can keep system response time down.\",\"styles\":{}}],\"children\":[]},{\"id\":\"c805f08b-5c68-4dff-8ef6-a98bfcd8abb3\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Here's an example: imagine you're leading Spotify, the music player. When a user plays a track, you want to:\",\"styles\":{}}],\"children\":[]},{\"id\":\"10c99ff0-e7ad-41ad-b9ec-932375bcbd00\",\"type\":\"bulletListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Start streaming that track from a file storage to that user's client.\",\"styles\":{}}],\"children\":[]},{\"id\":\"17a42f81-5dfd-4ec9-9271-5296d10da376\",\"type\":\"bulletListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Update the user's other devices that the song is currently playing.\",\"styles\":{}}],\"children\":[]},{\"id\":\"67047ca1-e605-498a-80e5-5bb862b13155\",\"type\":\"bulletListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Update the user's recommendation algorithm based on the song.\",\"styles\":{}}],\"children\":[]},{\"id\":\"5534903a-da8e-4e55-abe6-5dbda8d9eeb9\",\"type\":\"bulletListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Update the user's friends that they are now listening to the song.\",\"styles\":{}}],\"children\":[]},{\"id\":\"2f80767d-2a69-4c03-b05d-360ece44ae69\",\"type\":\"bulletListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Pay the artist a little money.\",\"styles\":{}}],\"children\":[]},{\"id\":\"e2132721-6d74-4f2f-85a3-82e82850752e\",\"type\":\"bulletListItem\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Probably many other things.\",\"styles\":{}}],\"children\":[]},{\"id\":\"071551d0-811c-45af-a1b2-c32accc1ee90\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"In a traditional system, we would need to send a request to the API of every service to trigger each feature.\",\"styles\":{}}],\"children\":[]},{\"id\":\"f2aa6474-f753-4532-88d3-a48db9c603c1\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"In an Event-Driven system, a service can publish a \\\"play song\\\" event onto the central queue, thereby triggering other services to do all the other things concurrently.\",\"styles\":{}}],\"children\":[]},{\"id\":\"ccebc23b-9e05-4f00-82c9-b5a3a64c4739\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"The subscribed services will see the \\\"play song\\\" event, and trigger themselves. Much simpler.\",\"styles\":{}}],\"children\":[]},{\"id\":\"5308771f-b8e9-46f4-b50e-4932e2f6994a\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Resilience.\",\"styles\":{\"bold\":true}}],\"children\":[]},{\"id\":\"dc1f406c-b797-4f14-bd9d-9d68b16d329f\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Another big benefit is how resilient Event-Driven systems are. If any part of the system throws an error, well, it can just put an error event onto the queue, or maybe a \\\"retry\\\" event, to have another go later.\",\"styles\":{}}],\"children\":[]},{\"id\":\"47fb3f79-68ab-491b-a9a9-0d3063aa77d9\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Centralised logging.\",\"styles\":{\"bold\":true}}],\"children\":[]},{\"id\":\"f1c9fa64-2df2-4de7-9a8a-26b86ecf82f5\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"And yet another nice thing about this kind of system is that it doesn't really need centralised logging. The central queue already stores the history of every event that happened in the system.\",\"styles\":{}}],\"children\":[]},{\"id\":\"2ed4b832-b1d0-42d8-b80a-b152cef73c99\",\"type\":\"heading\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\",\"level\":3},\"content\":[{\"type\":\"text\",\"text\":\"How do Event-Driven systems reduce organisational complexity?\",\"styles\":{}}],\"children\":[]},{\"id\":\"eb5f23bf-aa09-43b2-abca-f1a1e3d7ff43\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Because services in Event-Driven systems don't need to talk to each other as much, their APIs can be much simpler.\",\"styles\":{}}],\"children\":[]},{\"id\":\"c5f3866d-abea-4fb4-b0f1-809cc698164f\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"A simpler API means that services can be better-defined. \",\"styles\":{}},{\"type\":\"text\",\"text\":\"This\",\"styles\":{\"italic\":true}},{\"type\":\"text\",\"text\":\" is a payment system; \",\"styles\":{}},{\"type\":\"text\",\"text\":\"that\",\"styles\":{\"italic\":true}},{\"type\":\"text\",\"text\":\" is a booking system. The two are well-separated.\",\"styles\":{}}],\"children\":[]},{\"id\":\"0b1bef73-c89d-43ca-8955-1e7b616773b7\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Better-defined services are easier to write new features for, hence easier to specify requirements and projects for – and hence to hire for.\",\"styles\":{}}],\"children\":[]},{\"id\":\"cc0009bf-5b20-44bc-bfdc-8d927232930f\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Services can be independently deployed and maintained by teams, without needing to coordinate with other parts of the organisation. And they can be scaled rapidly, as they're small, granular components.\",\"styles\":{}}],\"children\":[]},{\"id\":\"e60ff6c3-8d2e-4a76-9c39-50ed39286558\",\"type\":\"paragraph\",\"props\":{\"textColor\":\"default\",\"backgroundColor\":\"default\",\"textAlignment\":\"left\"},\"content\":[],\"children\":[]}]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment