Design – High performance application with asynchronous persistence.

Web application with large amount of data (SQL REL DB) (it is not big in terms of memory <2GB)

order:

  • Quick calculation of the figures from the data (it was already saved in the database cache and updated with any changes made by the person who made it)
  • Creating a scenario (test zone) from current data or from an existing scenario (duplicating data in DB – takes a long time)
  • Scenarios persist, updates in scenarios.
  • The data is the same for all instances (Currently 2 servers)

I am looking for solution as follows:

2 separate data sources> one in memory and one in database

  • Users work with the data in memory (calculation, changes, duplicate for the scenario)
  • after the change in memory, the persistence in the database is done asynchronously
  • The user can store the scenario (in the database) and load it on demand in the memory

Pros:

  • Operating speed
  • Without limitation from the user's perspective.

Cons:

  • If the server fails or if an error appears, some data will not be preserved.
  • Synchronization of data in memory between servers.

Do you know any third-party software (Java EE) that solves this problem with persistent asynchronous database?

Do you see any problem with the proposed solution in general?