Hands-On Cloud:Native Microservices with Jakarta EE
上QQ阅读APP看书,第一时间看更新

Backing services

The fourth factor is related to services that your application uses. Those backing services might be file storage, a database, or a mail server. The application should just reference the need for such a service, but have the infrastructure (the new revolutionary cloud infrastructure) do the resource binding. This kind of separation of concern helps your application to attach and detach to different backing services, thanks to the third factor— without redeploying the application. This is also the basis for the circuit breaker pattern that we will describe in Chapter 8, Microservices Patterns.

Long story short, integrate your application with resources, not implementations.