Untitled Document
Editor's note: ebizQ readers can save 30% on any version of Event
Processing in Action (print edition or ebook) from www.manning.com.
Simply use the promotion code "ebizq30" when checking out.

To read an excerpt from Chapter 1, click
here!
Event-driven applications
In chapter 1 we defined the concepts of event, event producer and event consumer,
and in this chapter we have examined in some detail the ways in which events
are passed between producers and consumers. It is now time to take a step back
and talk about how you use these ideas to build event-driven applications. We
also look at the question of Event-driven Architecture and its relation to Service
Oriented Architecture (SOA).
Benefits of using the event-driven approach
One immediate question you might have is why you might want to use an event-driven
approach in the first place. Here are some reasons:
- Your application might be naturally centered on events. They involve some
kind of sensor that detects and reports events and the purpose of the application
is to analyze and react to these events.
- Your application might need to identify and react to certain situations
(either good or bad) as they occur. An event-driven approach, where changes
in state are monitored as they happen lets an application respond in a much
more timely fashion than a batch approach where the detection process runs
only intermittently.
- Your application might involve analysis of a large amount of data in order
to provide some output to be delivered to a human user or some other application.
By treating the input data as events you can use an event-driven approach
to distribute this analysis across multiple computing nodes.
- The event-driven approach can give you a way of extending an existing application
in a flexible, non-invasive manner. Rather than changing the original application
to add the extra function it's sometimes possible to instrument the original
application by adding event producers to it (for example by processing the
log files that it produces). The additional functionality can then be implemented
by processing the events generated by these event producers.
-1-