Share data with multiple spring application -


i have 1 main spring boot application , 2 dependent spring boot applications. dependent app load data(settings, , on) main app on start. external service may change data in main app , dependent app should reload data. there library or framework.

there 3 solutions:

  1. always retrieve data every requests. don't think case since have loaded them on beginning avoid solution.
  2. refresh initial data after amount of time (cron job).
  3. main application acts micro-service orchestrators , inform dependant application cache may invalid. every dependant application answer request refreshing cache.

for solution number 2 take @ spring boot @scheduled annotation. example can refresh data every 5 minutes @scheduled(fixedrate = 300000).


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -