Hacker News new | ask | show | jobs
by pphysch 1102 days ago
Event-driven communication is appropriate for implementing hooks for external consumers.

"Firing an event" is roughly equivalent to "running an undefined set of procedures in an undefined order".

That's useful, because consumer behavior is usually undefined, or at least far outside the scope of a single software system.

Your system firing the events should assume the size of that set is 0. That is, it should not rely on its own events for its internal control flow, why introduce what is essentially UB? That would be like a webserver querying its own HTTP endpoints instead of its local database for the same data. Abusing external interfaces for internal purposes. Wasteful and difficult to trace.