Wrox Programmer Forums
|
BOOK: Patterns, Principles and Practices of Domain-Driven Design
This is the forum to discuss the Wrox book Patterns, Principles and Practices of Domain-Driven Design by Scott Millett; ISBN: 978-1-118-71470-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Patterns, Principles and Practices of Domain-Driven Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 30th, 2015, 07:58 AM
Authorized User
 
Join Date: May 2015
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reactive Bounded Context

In Part II of the book, you talk about different ways to communicate between the Bounded Contexts. As I understand the poller makes the REST API services reactive. On top of that you need an event store. This is a deployment headache because you have to install the services, pollers and the event store too.

1. Do you suggest a poller per BC? Or a single poller that handles any message arriving in the event store?

2. In the poller that you have shown in the book, there is a Thread.Sleep. Are pollers resource hungry? In a long term, is it economical to use a message bus instead of a solution of REST + ES + Pollers? Think about running this system in Azure environment.

3. Do you suggest one Event Store for many Bounded Contexts?

4. Is message ordering a still problem in Event Store (ES) too? You describe this problem in page 224?

Last edited by varghesep; May 30th, 2015 at 08:00 AM..
 
Old May 30th, 2015, 09:34 AM
Wrox Author
 
Join Date: May 2015
Posts: 59
Thanks: 1
Thanked 5 Times in 5 Posts
Default

1. I would recommend 1 poller for each message that is polled. Each poller is a small component (aka microservice). Our guideline in the book is not to share anything between bounded contexts to avoid technical and team dependencies.

2. We use Thread.sleep to show that the poller has some delay in-between each time it polls. In a production system, you would run the service that is scheduled to run at regular intervals. You could either put the application to sleep in code, but it might be more efficient to shutdown and restart the application every time you want it to run. On Azure you could use the Task Scheduler maybe? http://azure.microsoft.com/en-gb/services/scheduler/

Pollers don't need to be resource hungry. REST and atom can be used to scale as as far as a message bus can.

3. I would recommend that each bounded context has its own event streams. Now, you could have one big event store cluster shared by multiple bounded contexts, or you could have one small ES cluster inside each bounded context. The main constraint is that the bounded contexts do not share data.

This is probably an issue that most developers will discuss with their ops teams - 1 big cluster, or lots of smaller clusters.

4. Messages of the same kind will never be out-of-order because they will be listed on the same atom feed in sequential order. It is possible that messages between bounded contexts may still be out order though.





Similar Threads
Thread Thread Starter Forum Replies Last Post
List box bounded with dataset ganeshkuppuswamy General .NET 0 November 23rd, 2007 10:34 AM
How to design a query for this bounded form method Access 0 June 24th, 2005 05:47 AM
Problem with bounded form query method Access 0 June 23rd, 2005 12:01 PM
Error updating record in bounded form method Access 0 June 19th, 2005 05:31 PM
How to delete current record in bounded form? method Access 0 June 19th, 2005 04:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.