Database Reference
In-Depth Information
is working with Node2 and holding the master object Obj2 ; at a certain moment Obj3
will be required. Coherence will transport Obj3 from its master node ( Node3 , for in-
stance) and put it into a smaller local cache (for example, MFU). If a service changes (in-
validate) Obj3 at its main location, its updated replica will be propagated to the local
cache of Node2 . Thus, the local cache keeps a local snapshot of the distributed informa-
tion. There are several cache invalidation strategies that are completely configurable:
• If your business can tolerate a proportion of the objects becoming temporarily out
of date, then you can use the fastest strategy known as Listen None strategy, ideal
for data with a slow rate of change.
• If your most recently used data is also the most frequently used one, that is, your
application is only interested in the data stored in the local cache, then Listen
Present is the best strategy.
• Listen All strategy is the heaviest, but it covers all the possible scenarios in
backend caches.
• If you do not know which of the last two strategies is best for you, choose Listen
Auto; it will dynamically switch between Listen Present and Listen All based on
the cache's statistics.
As you can see, Coherence provides a lot of functionalities and is probably the most ad-
vanced distributed cache system in the market. Apparently, just one SOA pattern men-
tioned in the catalog must be supported by a number of underlying patterns, actually im-
plement indexing, Partitioning, and replication in various forms, suitable for all possible
user scenarios.
Luckily, Coherence is not only one of the most complex Oracle products, but it is also ar-
guably the best documented one, thanks to the Coherence Incubator Project ( ht-
tps://java.net/projects/cohinc/ ) and to all who contributed to it, providing practical ex-
amples of various implementation patterns. We urge you to read and try the published ma-
terials. Here, we will just mention the basic patterns that are available for implementation,
as the title of this topic requires.
The following table includes Coherence Object Distribution patterns:
Pattern
Problem
Implementation
The Mes-
saging pat-
tern
We need an absolutely reliable SPOF and ultrafast
store-and-forward messaging network without a central
hub (as in Hub-and-Spoke) as a potential bottleneck.
Coherence from the moment of its creation has been a message distri-
bution system that is capable of supporting queues and topics.
Search WWH ::




Custom Search