Stateful microservices using the memory image pattern on Spring Boot

307

In a typical enterprise application data moves back and forth between the application and the database. And within your relational database data is moving back and forth between memory and disk. If the domain logic is complex there will be many database round trips for each business transaction, most often leading to serious performance problems.

The common approach to dealing with these problems is to use caching in the web or application tier. But caching adds to the complexity of the system and you now have to deal with cache invalidation and issues wth stale data.

Luckily there are smarter ways to utilize RAM than caching. With the memory image pattern, data stays in main memory enabling millions of ACID transactions per second. Persistence is based on command logging and snapshots. Besides 100-1000x performance there are many other benefits. No database means no database design, no schema migrations, no O/R-mapping, no sql and no caching. Developers can focus on writing business logic instead of boilerplate.

In this session you will learn about the memory image pattern, Prevayler, a mature, open-source implementation of the pattern and examples running stateful microservices on Spring Boot.

Architecture Java