Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm having trouble understanding what you're <em>really</em> asking in your question. You give an example of a simple event bus which is actually just <code>Observable</code> with a different name, then you say;</p> <blockquote> <p>For these reasons I think, that for most software, Observer pattern is better than event bus. What do you think about event bus, does it make any good sense for typical applications?</p> </blockquote> <p>..but given your example, they are the same. This makes me wonder if you have ever used something like a Enterprise Service Bus. At a base level an ESB logically does the same thing as the observer pattern, but commercial products add much, much more. Its like an event bus on steroids. They are complicated software products and offer;</p> <p><strong>Message pickup</strong><br> Generate events by listening to various endpoints. The endpoint can be a listener (such as a HTTP server), a messaging system (such as JMS), a database or pretty much anything else you want.</p> <p><strong>Message routing</strong><br> Take your event and send it to one/many endpoint. Routing can be pretty smart, the bus might route the message depending on the message type, the message contents or any other criteria. Routing can be intelligent and dynamic.</p> <p><strong>Message Transformation</strong><br> Transforms your message into another format, this can be as simnple as from XML to JSON or from a row on a database table to a HTTP request. Transformation can occur within the data itself, for example swapping date formats.</p> <p><strong>Data Enrichment</strong><br> Adds or modifies data in your message by calling services along the way. For example if a message has a postcode in it the bus might use a postcode lookup service to add in address data.</p> <p>..and lots, lots more. When you start looking into the details you can really start to see <em>why</em> people use these things.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload