isayme / blog

https://blog.isayme.org
MIT License
10 stars 2 forks source link

一张图看懂 发布(Pub)/订阅模式(Sub) 与 观察者(Observer)模式 #23

Open isayme opened 5 years ago

isayme commented 5 years ago

图解

image 图片来源: Observer vs Pub-Sub pattern

两者的区别

两者的区别的根源都在于 发布/订阅 模式中的 Event Channel(更多的叫法是 BrokerEvent Bus) 模块.

参考资料