We have a requirement when we need to start many async background processes that access the database, Kafka queues, etc. Right now we are using the Spring package with Tomcat (exploded WAR) for the same. However, we encounter some problems that I cannot solve with Spring Batch. I was thinking of other frameworks to use, but could not find any that solves all my problems.
It would be great to know if there is a structure that solves the following problems:
- Since the Spring Package runs inside the same Tomcat container (1 java process), any small update in any task / step will restart the Tomcat server. This leads to a hard stop of all running tasks, which leads to incomplete / outdated data.
WHAT I WANT: Combine all the banks and start each work as a separate process. The structure must store the PID and must be able to manage (stop / force kill) work on demand. Thus, when we want to update the JAR, the existing process will not be difficult (however, we should be able to stop the existing process from the user interface), and no other work (working or not) will also be affected.
I looked at the hot-update JARs in Tomcat, but I am skeptical about using such a mechanism in production.
Subprocess: will OSGI integrate with Spring Batch? If so, is it possible to run each task as a separate container with all the JARs built into it?
- Spring Package does not have master-slave architecture.
: , . (), . , (, , ), . (// , ..), .
, , , , .
- Spring / .
: . -, (, ) , .