eBay开源SOA-Turmeric架构

标签: 转载文章 | 发表时间:2012-06-20 14:17 | 作者:人月神话
出处:http://blog.sina.com.cn/cmmi
参考: https://www.ebayopensource.org/wiki/display/TURMERICDOC/Turmeric+Documentation+Overview

Turmeric是一个综合的、由策略驱动的SOA平台,提供了对SOA服务及其消费者的开发、部署、保护、运行和监控等方面的支持。该平台基于Java语言开发;遵循(SOAP、XML、JSON、XACML等)标准;支持WSDL(Doc/Lit模式的SOAP风格以及REST风格);支持多种协议和数据格式。

该平台包括设计时及运行时工具。运行时工具包括核心组件,策略、服务、监控子系统及管理控制台。存储服务、Eclipse开发者工具以及WSDL文档工具则列在设计时工具箱之中。Turmeric的一个独特的功能是,用户可以选择本地绑定(local binding),从而完全省去序列化及反序列化的工作。

核心组件是服务、消费者以及代码生成等组件的运行时平台。它为其他的协议处理器提供了集成点(Integration Point)。服务端(SPF,Service Provider Framework)和客户端(SIF,Service Invocation Framework)平台可通过配置文件及请求/响应处理器进行扩展。

存储(repository)的职责是维护服务及数据资产类型的生命周期并管理它们的变更。它还通过安全的服务暴露出来,用户可使用任何受支持的协议访问它。除设计时服务发现和治理之外,存储(repository)还可用于运行时查找和发现。

策略管理工具提供了对认证、授权、流量控制、限流策略等运行时策略的配置功能。它们通过一个称为“PolicyEnforcement服务”的运行时代理服务执行。

Eclipse插件主要用于类型库创建、浏览、查找及管理。一般来说,所有的Java类型都存在类型库存储中,这些类型是通过XML模式文件和Eclipse插件自动生成的。依赖关系管理以及类型治理并不在此构建系统的功能范围之列,所以必须通过外部的人工流程来完成。

Turmeric is a comprehensive, policy-driven SOA platform that you can use to develop, deploy, secure, run and monitor SOA services and consumers. It is a Java based platform, and follows the standards (WSDL, SOAP, XML, JSON, XACML,  etc.). Eclipse plugins help with the development of services and consumers. Other important features include:

  • Various Quality of Service (QoS) features such as authentication, authorization, and rate limiting, which you control by defining respective policies.
  • Monitoring capabilities.
  • A Repository Service that enables service registration and governance.
  • The Type Library, which provides the ability to define and manage reusable schema type definitions across services, and hierarchically organizes them.
  • The Error Library, another useful capability that lets you define and re-use error definitions across services.
  • Local binding, which lets you locally bind services to consumers as a deployment time option, for optimization, without loss of any generality or changing code.

The Turmeric platform is highly extensible and customizable. For example, you can easily plug in additional protocol processors, data formats, handlers and various other capabilities. The platform is also highly optimized for large-scale environments. eBay uses this platform internally. Most parts of it are now open source, replacing functionality dependent on commercial products with equivalent, open-source implementations. It also has new package names to match the open-source spirit. This is the first version of the open-source release of Turmeric, and might have some rough edges, so please provide feedback and contribute as you see fit.
What does the Turmeric platform include?

Service Provider Framework (SPF) Architecture



SOA Service Server-side processing starts from the Framework Servlet.

  • The Framework Servlet (SPFServlet) is the servlet entry point for the  Turmeric Service Provider Framework.
  • SPFServlet constructs the MessageContext for the request.  (1)
  • It then passes the context to the controller of the provider framework, Server Message Processor.  (2)
  • The Server Message Processor manages the provider framework flow by first executing the inbound pipelines with all its attached handlers. (3). 
  • Then the control dispatches the call to the service implementation. (4)
  • The service implementation performs the business logic and returns the response object in message context. (5)
  • The Server Message Processor then passes the control to outbound pipeline line. (6)
  • HTTPServletResponseTransport sends the response back to the caller. (7, 8, and 9)
  • Both in the inbound flow and the outbound flow, appropriate protocol processors, if any, intercept the handle the message protocol- specific aspects.

备注:可以看到对于入口的消息,出口的消息分别会被in pipeline和out pipeline接管。接管作用类似对整个消息流的AOP横切。在pipeline上可以进行日志和实例记录,访问控制盒授权等相关工作。由Proxy服务转到原生服务在Server Message Processor完成。

Service Invocation Framework (SIF) Architecture

Service Invocation Framework (SIF) provides APIs and the client-side runtime  for invoking SOA Services that publish their interface through a WSDL (Web Services Description Language):

  •     Primarily available as Java API.
  •     Supports XML over SOAP (the standard protocol to access WSDL based services).
  •     You can use other data-bindings such as JSON, NV, Fast Infoset for better performance.

The following diagram and the subsequent explanation provides an overview of SIF: 




  • SIF API is exposed through the framework class Service, which for a client represents an instance of access to a given service.
  • When you invoke a service operation either through Service.invoke(...) or  through Service.createDispatch(...).invoke(), (1) the request call flow is routed through the Client Message Processor. (2)
  • The Client Message Processor first runs the outbound pipelines by executing all configured handlers. (3)
  • It then forwards the request to the Request Dispatcher. (4)
  • The Request Dispatcher typically passes the request to the Transport. (5)
  • The Transport, based on the type of transport, now calls the appropriate serializer if serialization is required, and then routes the request to the appropriate service endpoint. (6)
  • When the response is received, Client Message Processor again runs the inbound pipelines and the response is then routed back to the client that invoked the request. (7, 8, 9, 10)
  • Both in the inbound flow and the outbound flow, appropriate protocol processors, if any, intercept the handle the message protocol-specific aspects.

备注:可以看到Transport factory在末端,实现序列号和反序列号相关操作。并实现相应的路由和Proxy代理操作。对于序列化和反序列化相关架构参考下面。

Serialization and Deserialization Architecture

  • The Turmeric Serialization/Deserialization module is highly customizable and extensible.
  • Using the Serialization Factory and Deserialization Factory, you can plugin any data format.
  • The interactions to the core runtime itself are preformed through these uniform interfaces.
  • Tumeric uses the JAXB interface for many data formats, but format-specific stream readers and writers are plugged in underneath.
  • Using JAXB for your interface is not mandatory; that logic is completely self-contained in the respective factories.
  • Many formats like XML, JSON, NV, and FastInfoSet are supported, and you can easily add more, such as Avro or ProtoBuf.





备注:Turmeric的序列化和反序列化模块具有高度的可定制性和可扩展性。Turmeric使用序列化工厂类,可以插件式的加入对任何数据格式的支持。Turmeric使用JAXB接口支持XML, JSON, NV, and FastInfoSet等多种数据格式。

   青春就应该这样绽放   游戏测试:三国时期谁是你最好的兄弟!!   你不得不信的星座秘密

相关 [ebay 开源 soa] 推荐:

eBay开源SOA-Turmeric架构

- - 人月神话的BLOG
参考: https://www.ebayopensource.org/wiki/display/TURMERICDOC/Turmeric+Documentation+Overview. Turmeric是一个综合的、由策略驱动的SOA平台,提供了对SOA服务及其消费者的开发、部署、保护、运行和监控等方面的支持.

eBay将其JavaScript IDE开源 — eBay Tech Blog

- 競 - J道jdon.com
eBay Open Sourced its JavaScript IDE — eBay Tech Blog VJET优点: 1.Javascript编程更快,有代码自动完成 代码模板和导向.

Elasticsearch Performance Tuning Practice at eBay

- -
Elasticsearch is an open source search and analytic engine based on Apache Lucene that allows users to store, search, analyze data in near real time. This document summarizes the challenges as well as the process and tools that the Pronto team builds to address the challenges in a strategic way.

SOA资料学习

- - 人月神话的BLOG
从对象到组件,首先可以把对象理解为更细粒度东西,而组件是更加粗粒度的模块,对象更多关注技术,而组件应该更加关注业务. 前面我们谈过技术组件和业务组件,在SOA思想下业务组件化的思想就更加重要. 组件本身而言很简单,南向接口和北向接口,或者再有底座平台支撑. 接口通过服务方式来实现,组件通过OSGI等技术实现高度的解耦和可热插拔性.

SOA架构咨询

- - 人月神话的BLOG
对于SOA架构咨询,其核心还是在于组件化和服务化,然后才是服务管控和治理,基于服务化思想对传统软件开发生命周期过程的改进. SOA架构大家刚接触时候很容易将其理解为一种单纯的技术架构,或者更多的人仅仅是将SOA理解为service服务接口,这些都是对SOA方法论很大的误解. SOA咨询一个重点就是业务驱动IT,而非单纯的IT架构咨询,SOA咨询一般都会结合企业架构和云的思想,结合组件化架构和领域服务的思想,高层结合BPM端到端流程整合目标,并对这些内容进行有效的融合.

从流水程序到SOA

- Allen - 阿朱=行业趋势+开发管理+架构
咱就从函数代码开始谈起,更史前的Goto和汇编代码咱就不谈了. 函数和变量写多了,自然也就发现有些函数和变量互相粘在一起很高耦合,而与其它的一些却没多达关系,于是为了显性化让其他的开发人员知道哪些函数和变量确实关联性很紧密,于是创造了类. 面向对象在80年代的国外代码开发界颇为流行. 但接口思想的风潮在90年代刮起了.

SOA面向服务架构

- - 人月神话的BLOG
今年在这点上谈的比较多,也逐步开始落地实施,将SOA咨询和实施方法论从系统间真正的引入到系统内,将面向对象的需求分析方法和SOA思想进一步融合,从业务建模到系统用例建模,从流程分析到服务识别和分析,从业务组件化到系统模块化,这些工作都逐步开始落地实施. 这样做的好处就是进一步的体现SOA可复用组件的价值,真正的做到业务组件化和组件能力化.

[SOA] Mule ESB Linux 部署

- - CSDN博客架构设计推荐文章
本文介绍如何在 Linux 上部署 Mule ESB. Mule 是一个以Java为核心的轻量级的消息框架和整合平台,基于EIP(Enterprise Integeration Patterns,由Hohpe和Woolf编写的一本书)而实现的. Mule的核心组件是UMO(Universal Message Objects,从Mule2.0开始UMO这一概念已经被组件Componse所代替),UMO实现整合逻辑.

集成ESB实现SOA

- - 企业架构 - ITeye博客
  服务消费者,服务提供者, 服务注册中心(UDDI模型). 由于UDDI模型过于复杂,而服务提供者与消费者点对点的进行协作依赖性大大增强,因此产生演变.    服务代理 -- ESB.    基于ESB总线,使得服务请求者统一入口,而ESB管理服务,使得耦合降低,由ESB来应对提供者提供的服务的改变而服务请求者不需要进行任何的修改.

SOA实施收益分析

- - 人月神话的BLOG
远行科技自2007年开始即参加了中国移动集团SOA接口平台的建设和实施工作,在SOA规划咨询,建设实施方面有丰富的实践经验积累. 对于SOA实施收益,先以某客户的一个真正业务背景进行分析:. 业务场景:我们现在的工程项目管理,其规划,立项和工程实施计划在项目管理相关系统;工程物资采购在采购管理系统;审批在 OA系统,财务的信息又在ERP核心系统.