Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Architectural Patterns

You're reading from   Architectural Patterns Uncover essential patterns in the most indispensable realm of enterprise architecture

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781787287495
Length 468 pages
Edition 1st Edition
Arrow right icon
Authors (4):
Arrow left icon
Pethuru Raj Chelliah Pethuru Raj Chelliah
Author Profile Icon Pethuru Raj Chelliah
Pethuru Raj Chelliah
Harihara Subramanian J Harihara Subramanian J
Author Profile Icon Harihara Subramanian J
Harihara Subramanian J
Pethuru Raj Pethuru Raj
Author Profile Icon Pethuru Raj
Pethuru Raj
Anupama Murali Anupama Murali
Author Profile Icon Anupama Murali
Anupama Murali
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Demystifying Software Architecture Patterns FREE CHAPTER 2. Client/Server Multi-Tier Architectural Patterns 3. Object-Oriented Software Engineering Patterns 4. Enterprise Integration Patterns 5. Domain-Driven Design (DDD) Principles and Patterns 6. Enterprise Architecture Platforms and Tools 7. Service-Oriented Architecture (SOA) 8. Event-Driven Architectural Patterns 9. Microservices Architecture Patterns 10. Patterns for Containerized and Reliable Applications 11. Software-Defined Clouds - the Architecture and Design Patterns 12. Big Data Architecture and Design Patterns

Event-driven microservices patterns

As mentioned, the microservice architectural style is an approach for developing an application as a suite of discrete yet self-sufficient services built around specific business capabilities. Microservices-centric applications are being enabled to be event-driven. There are a few interesting architectural patterns quickly emerging and evolving. In this section, we will look at the event stream pattern.

Like polyglot and decentralized persistence, the decentralized polyglot messaging method should be a key to achieving the intended success in microservices architectures. This allows different groups of services to be developed in their own cadence. Furthermore, it minimizes the need for highly coordinated and risky big-bang releases. The microservices approach gives more flexibility to developers for choosing the optimal messaging middleware solution. Every use case will have its own specific needs mandating different messaging technologies such as Apache Kafka, RabbitMQ, or even event-driven NoSQL data grids, such as Apache Geode / Pivotal GemFire.

In the MSA approach, a common architecture pattern is event sourcing using an append-only event stream such as Kafka or MapR Streams, which implements Kafka. With MapR Streams, events are grouped into logical collections of events called topics. Topics are partitioned for parallel processing. We can think of a partitioned topic as a queue. Events are delivered in the order they are received. Unlike a queue, events are persisted, even after they are delivered they remain on the partition, available to other consumers. Older messages are automatically deleted based on the stream's time-to-live setting; if the setting is zero, then they will never be deleted. Messages are not deleted from topics when read, and topics can have multiple different consumers. This allows processing of the same messages by different consumers for different purposes.

Pipelining is also possible where a consumer enriches an event and publishes it to another topic:

With the faster proliferation, penetration, and participation of the microservices architecture, there will be fresh patterns to address its growing and prevailing issues and limitations. Furthermore, existing patterns can be seamlessly combined to come out with bigger and better patterns for enabling the realization of microservices-centric applications. We have detailed the architecture and design patterns in Chapter 9, Microservices Architecture Patterns.

You have been reading a chapter from
Architectural Patterns
Published in: Dec 2017
Publisher: Packt
ISBN-13: 9781787287495
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image