DEV Community

Discussion on: Architecturing Spring services

denday04 profile image
Andreas Stensig

This is a good article for displaying a nice clean architectural structure and separation of concerns within your deployable application, but I think it's misleading to compare this with the microservice concept you introduce at the beginning.

The services you implement in these examples are domain services within your deployable unit, not external microservices that are separately deployed and maintained. Doing so would require each microservice to have the necessary infrastructure to facilitate distributed communication between other external microservices, whether through REST, RPC, event queues, or other communication paradigms.

This could be presented as one example of a deployable microservice within the context of a shopping cart system. But in that case I think it would be misleading to name the REST resource class ShoppingCartResource since its a resource entry for the specific domain of product listings, not the shopping cart as a whole.