mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-14 04:59:03 +00:00
English | 简体中文
Ⅰ. Introduction
- event The event bus is used to decouple different modules and improve the quality of the code. The core idea is the observer design pattern
Ⅱ. Event bus at the hardware level
1. Between devices communication
2. Reduced complexity with the bus
3. Multiple Architectures of Hardware Buses
The core of the design idea of the bus is to reduce the complexity and coupling degree of interaction between multiple modules.
At the actual hardware level, a bus is actually a set of wires connecting circuits. Because of the differences in speed between different devices, there are often multiple buses in a computer.
In fact, the design idea of the bus is often used in our software development process. The event bus is a common design pattern. Usually, the event bus will also be combined with the subscriber-publisher mode to become a main mode of interaction between loosely coupled modules of a large-scale system.
Ⅲ. Event bus at software level
- The event bus is called the observer mode from the design mode
- There is no fixed way to write the design pattern, zfoo event implements the event bus with the simplest annotation
- zfoo event uses Javassist bytecode enhancement technology to dynamically proxy event receivers, avoiding reflection and no performance loss








