4 ms·
Replacing SQL and stored procedure to develop business logic in Java in the microservices system can indeed gain framework advantages, but the development compl
by followSPL 3y ago
Replacing SQL and stored procedure to develop business logic in Java in the microservices system can indeed gain framework advantages, but the development complexity is not “micro” at all. Java lacks the computational capability of structured datasets, and the code is much longer than SQL. Even with the help of technologies such as Stream and Kotlin, when faced with slightly more complex computational requirements, from the perspective of code length, its “micro” level is still far from comparable to SQL (stored procedures).
Even in terms of frameworks, microservices are not necessarily “micro” enough. Java is a compiled language, and when code changes, it needs to be recompiled and deployed, which is tedious and may force unrelated parts of the entire application to be compiled together and deployed. To make each service independent, it is necessary to use a heavy mechanism like Docker. Unable to achieve lightweight hot swap, which is very unfriendly for microservices that originally wanted to adapt to frequent business changes.