java - Can I run long tasks in a Spring Boot application? -


i have spring boot application, shows data mongodb on angularjs page , allows user change it.

now need create mechanism, allows me to

  1. run long (1-3 hours) java method,
  2. which produces files and
  3. observe state via web (does run, finished, did crash?).

can implement in scope of spring boot application? if yes, parts of spring can use that?

i argue it's not idea embed batch processing service exposing mongodb data store.

i create separate batch application. spring batch natural choice if using spring stack. need figure out how want host spring batch job , how want trigger , schedule it. spring batch needs sql storage it's metadata.

status of batch processing monitored 1 other application spring batch admin module running on servlet container. if point application sql storage of spring batch job application, monitoring of status via web ui out of box.

of course run each app spring boot.

if don't want handle operational complexity brings host there 3 applications, yous still can all 3 embed 1 , work fine spring boot. execute jobs parameters manually or restart them via spring batch admin configured have access spring batch job beans.

you explore using mongodb storage spring batch metadata. e.g. project may help. such mechanism need used spring batch application , spring batch admin module visualizing status of processing.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -