`
seanwon
  • 浏览: 65719 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Oracle Coherence vs Gigaspaces XAP

阅读更多

Data Cache

Both systems support deploying a data grid on multiple machines and automatically manage routing, fault-tolerance and fail-over. Both grids support passive data caches and sending code to be executed on the node where a particular object resides rather than pulling the object from the cache and then running a command. Both grids support querying objects by their properties.

Both grids support event-driven notifications when objects are added or removed from the space. Coherence has notifications that go out to external clients (UI apps, for example) and supports continuous queries that will send updates without polling from the client. Gigaspaces only has notifications internally in the grid, meaning that you can set up a processor to receive events about new, updated and removed objects matched by a particular template.

Both systems have concepts of local caches for remote data partitions which automatically update when the remote data changes (Coherence calls this “near cache”). Coherence supports lots of caching topologies which can be flexibly configured, but Gigaspaces only supports a local partition, global space and local cache of the global space. Local caches in Gigaspaces are really for read-only access (reference data).

Both grids support .NET/Java interop to some level. Coherence does this by requiring you to specify a serializer implementation for your class on both ends, in which you basically just need to specify the order in which fields are serialized and deserialized. I haven’t tried out the Gigaspaces solution for interop. According to the documentation, if you follow a naming convention in both places (or override it with attributes and annotations), the grid will transform POJOs to POCOs and back fine. Again, without trying this myself I cannot actually tell you if it works or not.

Processing

Gigaspaces doesn’t just allow you to send code to the objects, it is actually designed around an event-driven processing model where objects are sent to processing code and the same processing code runs in each data partition. Events for processing are specified by example, matching templates on classes and non-null properties, and Gigaspaces manages thread pools and other execution aspects for you automatically. Events can be triggered by the state of entities in the grid, or by commands coming to be executed on the grid. It also has a fully transactional processing model, so if an exception gets thrown everything rolls back and another processor will pick up the command from the space again. It integrates with Spring transactions so transactional processing development is really easy.

Coherence has a reference command pattern implementation, not part of the basic deployment but as a library in the Coherence Incubator project. Its allows you to send commands as data grid objects to entities in the data grid but cannot directly invoke events based on entity properties in the grid. Coherence also has a very limited support for transactions – the JCA container gives you a last-logging-resource simulation but no real transactional guarantees.

Deployment

Gigaspaces is designed to replace application servers, so it has a nice deployment system that will automatically ship your application code across the network to relevant nodes, and cloud deployment scripts that will start up machines on EC2 as well. Until recently the scripts were a bit unreliable but version 6.6.4 fixed it. Coherence does clustering itself, but it was not intended to replace application server functionality. When it comes to deployment, you have to do it yourself. There is a JCA connector for application servers which I’ve tried with WebLogic (and version 3.3 of Coherence finally works out of the box with this), but there are lots of reasons why you do not want to run the whole grid inside WebLogic clusters or something similar, but have it as a separate cluster.

On the other hand, Coherence has a pluggable serialization mechanism (POF) which would theoretically allow us to run multiple versions of the same class in the grid and hotdeploy a new version of the application on nodes incrementally and without downtime (I haven’t tried this myself yet, though, so I don’t know whether it really works like that). Gigaspace applications (processing units) are split into two parts – a shared library distributed to all the applications and the processing unit specific code. Shared libraries cannot be redeployed after the grid starts, so a hot-deployment of processing unit specific code is fine, but not for any data that is actually stored in the grid. This is apparently going to be changed in version 7. Until then, the best bet for hot deployment on Gigaspaces is to split out the data format and business logic into separate classes and JARs. I’m not too happy about this, but once the class loading changes we might go back to nice object design.

Scaling

Both grids seem to scale enough to deal with problems which I am fighting with (order of magnitude 10 computers in a grid, haven’t tried them on deployments of hundreds). However, Coherence scales dynamically — you can add more nodes to the cluster on the fly, without stopping the application. This allows you to scale up and down on demand. Gigaspaces deploys data to a fixed number partitions and fixes it for the lifetime of the data space. If a machine goes down, a backup partition will take over and on clouds you can even have a new machine instance started up for you automatically, but you cannot increase or decrease the number of partitions after the grid has started.

Persistency

Both grids have read-through and write-through support. Gigaspaces comes with a Hibernate-based asynchronous persistency system with mirroring (allowing you to move database writes to a separate node) out of the box. Although the idea is nice, in the current incarnation it has quite a few rough edges so we ended up rolling out our own. For real read-through and write-through to work on Coherence you need to ensure that you configured and deployed persistency code to all the nodes, which might be a bit of a challenge if a part of the grid is running in an application server and a part of the grid is running outside of application servers (especially with non-coherence clients). Since Gigaspaces handles the deployment for you, it makes it a bit easier to run configurations such as these. Gigaspaces also has the concept of an initial load that will pre-populate the memory space with objects from the database and supports on-demand cleanup from the grid without deleting objects in the persistent store.

So when should you use what and why?

There is no clear winner in this comparison because these two products seem to be suited to different problems. Gigaspace is a heavyweight replacement for application servers and in my view best suitable for distributed transactional processing. Its processing model is much more flexible than the one in Coherence and has more features, not least proper transaction support. Coherence seems to be a much better solution for passive read-mostly data grids. It can grow and shrink dynamically. It supports much more flexible topologies and has more powerful libraries for client applications.

<script type="text/javascript"></script>

分享到:
评论

相关推荐

    Oracle Coherence_Getting Started

    ### Oracle Coherence:起步与关键技术解析 #### 一、Oracle Coherence简介 Oracle Coherence是一款高性能、可扩展的分布式数据网格平台,它主要用于在多个应用服务器之间共享数据,并提供一致性和高可用性保障。...

    cacheviewer:缓存系统(例如 Oracle Coherence 和 Gigaspaces)中的数据很难临时提取以用于调试目的。 该工具动态构造一个表示数据元素键的对象并显示匹配值

    Oracle Coherence和Gigaspaces是两个著名的分布式缓存解决方案,广泛应用于企业级应用中。然而,由于其复杂性和内部优化,当需要对缓存数据进行调试时,往往面临着提取数据的困难。为了解决这个问题,"CacheViewer...

    Oracle® Fusion Middleware Tutorial for Oracle Coherence12 c (12.1.2)

    Oracle Coherence是Oracle公司提供的一个可扩展的分布式缓存解决方案,旨在提供高性能的数据管理,适用于各种企业级应用。Oracle Coherence 12c (12.1.2)是该产品的一个版本,它将Oracle Coherence的优秀特性和...

    Oracle Coherence中文开发文档

    ### Oracle Coherence中文开发文档知识点解析 #### 一、引言 Oracle Coherence是一款高性能、分布式内存数据网格平台,主要用于解决大数据环境下对于实时数据处理的需求。该文档为Oracle Coherence的中文开发指南,...

    Oracle Coherence(Oracle 数据网格java包)coherence-java-3.7.1

    Oracle Coherence是一个企业级的分布式集群缓存框架。具有自管理,自恢复,高可用性,高扩展性等优良特点,在电信BOSS等项目中有很大的应用价值。本文对它的特点,架构,基本使用方法,JMX管理,调优等进行简要但...

    openfire集群用到的 Oracle Coherence

    Oracle Coherence 是一款由甲骨文公司开发的分布式数据网格解决方案,主要应用于企业级应用的高性能缓存和数据共享。在openfire集群中,Oracle Coherence扮演着关键角色,为集群提供高效的数据共享和一致性保证,...

    Oracle Coherence administrator's guide

    ### Oracle Coherence Administrator's Guide 知识点解析 #### 一、Oracle Coherence 简介 Oracle Coherence 是一款高性能、可扩展的企业级数据网格平台,主要用于在分布式环境中管理和缓存数据。它通过减少对...

    Oracle Coherence Getting Started

    ### Oracle Coherence基础知识与原理详解 #### 一、Oracle Coherence简介 Oracle Coherence是一款高性能、分布式、可扩展的内存数据网格(In-Memory Data Grid, IMDG)平台,旨在为现代应用程序提供快速、可靠的数据...

    oracle coherence

    Oracle Coherence 是一款由 Oracle 公司提供的分布式数据网格解决方案,它主要被用于提升应用程序的性能和可伸缩性。Coherence 提供了一个高度可配置的、基于内存的数据存储和缓存平台,允许应用程序在无需修改的...

    Oracle Coherence

    ### Oracle Coherence 系统架构详解 #### 一、引言 随着Web应用对高性能、高可用性的需求不断增加,如何优化应用服务器中的数据处理成为了一个关键问题。传统的做法是在应用服务器内部缓存数据,但这种方法容易导致...

    Tutorial for Oracle Coherence

    ### Oracle Coherence 教程知识点详解 #### 一、Oracle Coherence 概述 - **定义**:Oracle Coherence 是一款高性能、可扩展且具备容错能力的企业级数据网格(Data Grid)解决方案。它能够为应用程序提供分布式内存...

    oracle缓存工具coherence-java-3.7.1+中文资料

    Oracle Coherence是一个企业级的分布式集群缓存框架。具有自管理,自恢复,高可用性,高扩展性等优良特点,在电信BOSS等项目中有很大的应用价值。 压缩包里面有最新版Oracle Coherence 3.7.1,加上中文资料。

    Oracle Coherence Developer’s Guide.pdf

    ### Oracle Coherence 开发者指南知识点解析 #### 一、Oracle Coherence 概览 - **定义**:Oracle Coherence 是一款高性能、可扩展的内存数据网格(In-Memory Data Grid, IMDG)解决方案,旨在解决分布式环境中大...

    Oracle Coherence使用经验

    ### Oracle Coherence使用经验 #### 环境与背景 - **操作系统**: Windows 平台 - **中间件**: WebLogic Server (WLS) 11g/12c Oracle Coherence 是一款高性能的分布式数据网格解决方案,主要用于提高应用程序的可...

    Packtpub.Oracle.Coherence.3.5.Mar.2010.rar

    《Packtpub.Oracle.Coherence.3.5.Mar.2010》是关于Oracle Coherence 3.5版本的详细教程,旨在帮助读者深入理解并掌握这一强大的数据网格解决方案。Oracle Coherence是一款企业级的分布式数据管理平台,主要用于提供...

    最新版Oracle Coherence 3.6上市.pdf

    【Oracle Coherence 3.6】是Oracle公司发布的一款最新的分布式内存数据网格产品,它在业界享有领先地位。此版本带来了重大改进,特别是引入了Coherence Quorum特性,这个功能允许更精细地控制网格和云环境的容量以及...

    oracle_coherence_solution.pdf-中文

    从给定的文件信息中,我们可以提炼出关于Oracle Coherence解决方案的关键知识点,这些知识点涵盖了其在高性能分布式内存网格中的应用,以及如何满足企业级应用程序的伸缩性和性能需求。 ### Oracle Coherence概述 ...

    coherence.jar-coherence-work.jar-tangosol.jar-

    标题中的"coherence.jar-coherence-work.jar-tangosol.jar-"揭示了这是一组与Oracle Coherence相关的Java库文件。Coherence是Oracle公司提供的一种分布式数据管理解决方案,它主要用于实现高性能的数据缓存、数据...

Global site tag (gtag.js) - Google Analytics