Coherence is part of the Fusion Middleware infrastructure. It provides an in-memory multi-node grid that can be accessed through a Java API, RESTful APIs and the JCA Coherence adapter. Additionally, Coherence is the foundation for the out-of-the-box Result Cache feature on Service Bus business services.
Coherence can be used as the (shared, cross cluster) memory for services. A service can easily store a result on the Coherence grid and reuse that result for more quickly handling a future request, provided the stored result is still deemed valid and fresh enough. Values that do not have to be recalculated or retrieved again from back end systems can be made available much faster for service consumers and obviously reduce the load on the enterprise resources that would otherwise have had to cough them up.
This chapter shows how Coherence can be integrated into SOA composites through the Coherence adapter. Using the example of the flight status, it shows a typical pattern emerges: put data in the cache when first queried and either expire the cache after a set time or refresh the cache when the value changes in the underlying system. With Service Bus, we will see that the first approach is available declaratively for any business service using Result Caching.
Parts in this chapter:
- Introducing cross instance Shared Memory using Coherence
- Performance and availability boost: add some Coherence powered memory to the FlightService
- Leverage Service Bus Result Cache
This figure illustrates the components to be developed in this chapter.
Sources for this chapter can be found on Github: Chapter 9 sources.