What is the Event-driven Architecture that people are talking about?

Event-driven architecture has been a hot topic for backend and system developers in recent years. Instead of designing a service that has input and output coming in and out from different places, we centralize the I/O data delivery into channels. We call those data the event.
In my opinion, the event-driven system is extremely versatile. When using it along with GraphQL, you just have two of the most powerful tools for data delivery. It helps us stop thinking about how to transfer data efficiently, but instead focus that energy on delivering core business values.
Today, I am gonna show you how to quickly build a simple event-driven system with Python and Google Pub/Sub that I design myself from my experience working at my company. I promise it only takes you 3 mins to have an almost production-ready system. You could also find my source code at:
Typically, my system consists of 3 main components: Consumer, Producer, and Core. I will go over each of them and explain what they do in detail.
Consumer
Consumer classes pull any messages from the event channel or generate events from system files.

Producer
Producer classes publish messages to the event channel after being processed by the core system or write to system files or printers.

Core
Core classes are the most important classes in the project. They take care of business logic.

Integration
Now, we put everything together in main.py and run it.

Here is the result from the terminal and Google Pub/Sub.
Terminal

Pub/Sub:

Congratulations! You just successfully built your first event-driven system. I hope you enjoy this small exercise.
To conclude, the event-driven system is a fantastic architecture to have in your arsenal. If you like my content, please don’t forget to give me claps and follow me to my next post. Also, consider supporting me via:
