meshU Blog – Q&A with Ilya Grigorik from AideRSS
At meshU, AideRSS’s Ilya Grigorik will be talking about event-driven architectures, including XMPP/Jabber and AMQP protocols and the advantages of each over the commonly used HTTP request-response cycles. To get a better sense of what Ilya will be talking about, I fired off three questions:
1. So what are event-driven architectures and why are they important?
At its core, event-driven architecture is simply an implementation pattern that explicitly separates the roles of “event generators” and “consumers”, as opposed to building an application or service which is responsible for the entire cycle. A simple example might be an incoming request to generate an invoice for a new purchase. In an event-driven application, the service would record the request, notify the user that it is being processed, and then send out a message to a “consumer” process, which will then generate the actual invoice. By doing this, the user receives immediate feedback and the actual heavy processing is done in a standalone process. The end results is faster response times for the users, and easily scalable infrastructure for the developers.
Due to the inherent distributed nature of this event-driven pattern, these architectures are a perfect fit for the cloud-computing environments and applications in which the amount of work may fluctuate wildly due to time of day, number of visitors, or any other external factors.
2. What are some of the key trends/issues when people look at event-driven architectures?
The driving contributor behind the adoption of event-driven architectures has been the recent rise of distributed and cloud-computing platforms. The new-found ability to easily add and remove servers in these environments to scale to the required demand means higher efficiency and, if executed well, a perfectly ‘elastic’ service layer – you’re never paying for more resources than you need to, and your users are always receiving the optimal experience.
However, implicit to this type of architecture is a messaging layer that’s often a completely new component for most developers, especially in the Web-development world. Primarily relegated to large scale enterprise and real-time communication applications, protocols such as AMQP and XMPP are perfectly suited for this type of work but are poorly known – exactly the problem we’re going to tackle and explore with code examples at meshU!
3. Why are event-driven architectures such an important part of the development process?
Aside from the inherent scalability that this pattern provides it also encourages loose coupling between your components and services, which in turn, translates into more readable and maintanable code in the long run. Put together, a well executed event-driven architecture means better responsiviness, scalability, and maintanable code. What else could you ask for?