Flux varies from Publish-Subscribe in a Couple Ways

I post on this blog less than I’d like to and it’s not because I don’t write things down. It’s because I overthink my writing. A quick thought turns into a major research project with interviews and citations, and I spend time reviewing and editing and, to be frank, slowing things down. Now, that’s not a bad thing – learning to teach is more than half the purpose of having a technical blog. However, my personal notes stash is getting long and I think I need to worry less and share more. With that in mind, I am challenging myself to post a daily¬† “Today I Learned (TIL)” micropost. I will share a few imperfect words, a screenshot, a code snippet, etc.

Starting…………. now!

Today I learned that the Flux pattern is very similar to the Publish-Subscribe pattern, with two key differences:

  1. In Flux, every payload is dispatched to all registered callbacks, whereas in Pub-Sub, payloads are dispatched only to subscribers.
  2. In Flux, callbacks can wait for other callbacks to complete. This doesn’t seem to be the case in Pub-Sub.

There you go! You get no more context than that. Yay microposts! Thanks for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.