Reputation: 967
I am new learner in SOA ( Service Oriented Architecture ) I have one question for below scenario:
In a company (Mycompany), Sales Team is there ( which is a technical authority for business capability –here sales is the business capability). That company decided to create 2 products say Mycompany.Photos.com and Mycompany.Grocery.com. For both websites they need sales capability i.e. order acceptance capability.
Hence Sales team has to work for both websites. Because, both website needs sales capability.
Now the question is should sales team create 2 different databases for each websites and 2 different endpoints also ?
for example:
If Sales team initially had one queue "Mycompany.Sales.Endpoint" and it receives CreateOrderCommand. It handles CreateOrderCommand, creates order in sales DB and publishes OrderAcceptedEvent. When they were supporting just one website. If they start supporting both website with same endpoint then how would Sales differentiate weather this order is for Mycompany.Grocery.com or Mycompany.Photos ? Should we split Mycompany.Sales.Endpoint into 2 ? should sales team has to be aware of Photo website orders and Grocery Website orders ?
One answer I can think of is:
Sales will have 2 Endpoints say "Mycompany.Grocery.Sales.Endpoint" for Mycompany.Grocery.com BusinessComponent and "Mycompany.Photos.Sales.Endpoint" for MycompanyPhotos.
Even though they are under same Sales Bounded context, can it have 2 Business Components (BCs) ? Am I correct, Is this the way we scale sales team will support both products for the sales capability ?
I am sorry for the long message. I could not find any shortcut way to explain this.
Upvotes: 0
Views: 104
Reputation: 2178
A service is the technical authority of a business capability.
If you should be able to differentiate between an order from either system, but you can't, you're probably building a 'technical authority' for multiple business capabilities.
Other than that, a service can have many components. Instead of focusing on technical issues, focus on the business issue and see if you can explain that. But a platform like Stackoverflow, with a 1-to-1 ratio on question & answer probably isn't the correct medium for questions like this.
Upvotes: 2
Reputation: 12067
I think the better way to think about this situations that you effectively have two companies - one in the grocery business, with all the corresponding capabilities that make that up, and the other in the photo business. Even if the two "companies" happen to share the same incorporation documents, you really shouldn't view this as a single entity.
Upvotes: 2