I'm starting a Web Application project in Java and I've been doing some research on which architecture to take.
It's going to have n services (Billing, Reporting, Sales, CRM, etc) which depending on the service, may or may not work as standalone webapp.
I really like the Domain-Event-Driven approach. Thing is, I've never done such a big project before and I would appreciate a lot hearing some thoughts and tips on which way to go.
With the Domain-Event-Driven Architecture, my main doubts are:
If I need some data from other service, is it right to create a Web Service for it and access all data from there? I would be generating deeper coupling here and that's kind of what I want to avoid. Which other approches are there?
How is persistence done? Has each service it's own DB? No relations between services' DBs?
What if a service fails? It will loose all messages and therefore won't be able to take the corresponding actions, right? Any workarounds?
What if ActiveMQ fails?
Thanks a lot in advance!
If I need some data from other service, is it right to create a Web Service for it and access all data from there?
Yes.
I would be generating deeper coupling here and that's kind of what I want to avoid.
False. You should explain what coupling you think is going to happen here.
Which other approches are there?
Service Oriented Architectures do this all the time. The alternatives are more tightly coupled.
How is persistence done? Has each service it's own DB?
Yes. Services stand alone. Often services are part of large packaged applications.
No relations between services' DBs?
Correct.
What if a service fails?
Bummer. Requests back up in the queues until you restart the service.
It will loose all messages and therefore won't be able to take the corresponding actions, right? Any workarounds?
False. Totally false. You can use persistent, reliable message queues.
What if ActiveMQ fails?
Then the world as we know it ends. What do you mean by "fail"? It's a fairly loosely-coupled system that allows lots of problems to happen and get resolved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With