This document contains a tabular comparison of the Modulithic and Microservice Architecture approach under certain aspects. Many of them can be achieved or influenced in both styles, but to different degrees and using different means. No claims of exhaustiveness.
Instantly share code, notes, and snippets.
Oliver Drotbohm odrotbohm
-
Spring Open Source Engineering
- Dresden, Germany
-
18:27
(UTC +02:00) - www.odrotbohm.de
- @odrotbohm.de
- @odrotbohm@chaos.social
- odrotbohm
- in/odrotbohm
We would like to simplify the event-based module integration and make sure the default transactional setup is correct by introducing a custom @ModuleIntegrationListener annotation.
Classic Spring applications use bean references and invocations to orchestrate functionality, even if the functionality triggered resides in different application modules. In those cases, the default approach to consistency is a transaction that spans the original business method and all transitive functionality:
@Service @RequiredArgsConstructor
Spring RESTBucks uses Hibernate’s bytecode enhancement to avoid runtime overhead in favor of a build time step. This works fine on JDK 8. However, if the project is built on JDK 11, starting it fails with:
Caused by: java.lang.IllegalAccessError: Update to non-static final field org.springsource.restbucks.payment.Payment.order attempted from a different method ($$_hibernate_write_order) than the initializer method <init>
at org.springsource.restbucks.payment.Payment.$$_hibernate_write_order(Payment.java) ~[classes/:na]
When it comes to JVM based clients of REST / HTTP APIs, Android is the most dominant platform. There are a variety of HTTP client libraries available for Android, but none of them have dedicated support to work with hypermedia elements (like links and forms) or late binding of data. Using those elements is crucial to avoid strong coupling between client and server. See this presentation (slides, recording for details.