Database Reference
In-Depth Information
buckets/entry from the local cache and distributing them between the partitions. Thus, Co-
herence in general is a distributed implementation of java.util.hashmap .
How do we distribute objects? We had this technique long before SOA was developed
(CORBA and RMI; look at the classic Java Distributed Computing , Jim Farley, O'Reilly
Media ), and this is the serialization we mentioned here a countless number of times. Well,
you can say that serialization is quite a heavy process, and actually, we have confirmed it
many times as well. It is slow and serialized objects can be large; how can we optimize
memory utilization, especially considering the problems associated with the already men-
tioned MapMessage interface?
In addition to classic serialization, Coherence provides two additional extensions for ob-
ject distribution:
• The ExternalizableLite interface with two main methods, readEx-
ternal and writeExternal . It performs a bit of data compression to optim-
ize memory utilization.
• The other is Portable Object Format (POF) , which is a more advanced Ex-
ternalizableLite implementation.
Of course, compression comes with a cost; it requires some more processing power, and
the implementation is not always simple; however, it is worth all the effort:
• POF supports the ability to automatically apply indexes to the classes. This ability
solves one-third of the generic distributed cache tasks which includes indexing,
Partitioning, and replication.
• POF supports interoperability between multiple languages, that is, it's not just
Java anymore; you can use C# and some other languages, including .NET and
C++. That's a really big advantage of Coherence.
• What's even bigger about Coherence POF is that it allows you to version data. It
is hard to overstress this feature. If data grid is the fabric, stretched around at least
three products (OSB, SOA Suite, and Oracle EP) and three frameworks (EBS,
EBF, and ABCS), then we expect it to run 24/7 and not jeopardize but support our
new deployments. POF supports multiple versions of the same object in the
memory, and most importantly, these versions will be used by the same service
without data conflicts.
The last advantage is possible because of the key-value nature of HashMap. Imagine that
Version 1 of App1 uses Object Version 1 with tree fields/properties and App1 Version 2
has the same Object with four fields. When Object Version 2 is serialized, it will be
Search WWH ::




Custom Search