Oracle Coherence 3.5 读书笔记之2 - 序

题外话,前面已经有了foreword, 这里又来了个preface。foreword一般不是作者本人写的,而preface是作者写的.

A foreword is generally written by someone other than the author, and to my mind are like an extended blurb by someone with sufficient gravitas to positively influence marketing efforts.
A preface is a short, preliminary section in which the author sets the stage or establishes the context for the book or story that follows.

作为大型,业务关键性系统的架构师,必须解决3个非功能性需求:
1. 性能 - 定义为操作完成的时间(the amount of time that an operation takes to complete),性能关乎用户体验。对于Web应用,通常用 “time to last byte” (TTLB)衡量。即web服务器接收到请求到发送完最后一个字节响应为止。
2. 可扩展性 - 负载增加时,仍保证可接受的性能。

is the ability of the system to maintain acceptable performance as the load increases, or to support additional load by adding hardware resources.
3. 可用性 - 系统可用时间(percentage of time an application is available to the users)。

对于高并发访问系统,以上3个需求很难保证,特别是很难全部同时保证。

Oracle Coherence简介

Coherence属于内存计算领域的In-Memory Data Grid。

allows you to eliminate single points of failure and single points of bottleneck in your application by distributing your application’s objects and related processing across multiple physical servers.

有几个关键点:
* Coherence 管理的是应用对象

This eliminates the need for repeated, and often expensive, loading and transformation of the raw data into objects
* Coherence 将对象分布于多个物理服务器,并保存一致性(coherence)。应用无论访问哪个物理服务器,看到的都是Single System Image (SSI)
* 通过复制和冗余实现数据保护
* 存储对象于内存以保证性能和降低延迟
* Coherence不仅分布式存储对象,也支持分布式处理。

分布式缓存

提升应用性能的最简单的方法就是让数据靠近应用,并以应用易于访问的形式存放。

数据通常存在于数据库,是表格形式。应用使用数据通常是对象形式,如Java, C#等。由于格式不一致,就需要转换,而在应用层将对象缓存可以减少转换的性能开销。
分布式存储则可以提高可扩展性和高可用性。

It is much more powerful to use Coherence as a logical persistence layer of your application, which sits between the application logic and the physical data store. Whenever the application needs data, it asks Coherence for it. If the data is not already in the cache, Coherence will transparently load it from the data store, cache it, and return it to the application. Similarly, when the application needs to store data, it simply puts objects into the cache, and Coherence updates the underlying data store automatically.

coherence在物理数据存储和应用逻辑间嵌入了一层,即逻辑持久化层。实现了应用和数据库的松耦合。

看一下coherence支持的API,支持Java, .Net和C++,全是对象的形式。

分布式查询和汇总

这其实是coherence一个很强大的功能,也是In-Memory Data Grid和普通的集群型缓存如memcached的一个重要区别。

find data not just by the primary key, but also by executing queries and aggregations against the cache.

有点类似Oracle数据库的Parallel Execution

In-Place并行处理

In-Place Processing是就地处理的意思。在数据所在地直接处理比将数据取回处理要简单和有效得多。这也反应了计算模式的一种变化,即以前的将数据传送到处理端变为将处理逻辑下放到数据的。

数据库的存储过程是典型的就地处理,Coherence支持并行的就地处理,如:
* entry processor — a class that encapsulates the logic you want to execute for each object in a target dataset
* CommonJ Work Manager

缓存事件

可以注册感兴趣的缓存数据内容,当相关数据更新时,可以通知应用采取特定的操作。

Coherence 在Oracle生态系统中的位置

Coherence属于Oracle的中间件产品,可以独立使用,但更多的是作为Oracle WebLogic Application Grid,Complex Event Processing,SOA grid的基础。

Coherence 使用场景

  • 作为数据库,大机系统的前端
    这些后端系统较昂贵,难以扩展。将处理前移到Coherence可提升性能,降低费用(如减少大机的MIPS)。
  • 极限交易处理(XTP)
    由于数据分区后,可以并行计算。同时可以通过添加节点轻松扩展。
  • 高性能计算网格
    并行+内存计算
  • 集成平台
    这点和TimesTen是一样的
  • 使用事件驱动架构应用的基础
    可以很方便的与消息队列,服务总线和Complex Event Processing (CEP)集成

Oracle Coherence 版本

分为3个版本,Standard, Enterprise, Grid Editions,但软件包没有区别的,是商业限制。
客户端有2个版本,Data Client, Real-Time Client

详见Fusion Middleware Licensing Information中的 Application Server Products|Section 1.6, “Oracle Coherence”

简单来说,Grid Edition 和 Real-Time Client 包含所有的Coherence的功能,也是最常用的。

本书适合的读者

最主要为关注于设计和实现高性能,可扩展系统的架构师和开发组
其次是与SOA和EDA等应用的结合

需要有一点面向对象设计,Java和XML的基础

示例代码

http://www.packtpub.com/files/code/6125_Code.zip

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值