SOA - 如何颗粒服务应该是保持业绩? [英] SOA - How granular should services be to maintain performance?

查看:176
本文介绍了SOA - 如何颗粒服务应该是保持业绩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我接手一个项目,从地面更换一个古老的遗留系统。我来之前,公司聘请了顾问,谁放在一起系统的基本素描,并推动SOA严重。这导致实体服务的一个长长的名单,与他们的意图被组合成更复杂的服务组合。例如,用户想要的信息委员会会打委员会服务,然后调用人的服务来获得它的成员和会议的服务来获得它的会议,等等。

I am taking over a project to replace an ancient legacy system from the ground up. Before I came on, the company hired a consultant who put together a basic sketch of the system and pushed SOA heavily. This resulted in a long list of "entity services", with the intention of them being composed into more complex service combinations. For instance, a user wanting committee info would hit the "Committee" service, which then calls the "Person" service to get its members, and the "Meeting" service to get its meetings, and so on.

我明白这个灵活性涨幅,但我的担心是对性能。在我看来,随着粒度这样的精细程度建立其服务系统花费在翻译服务消息太多的资源,而且性能将是不可接受的。它还在我看来,灵活的收益仍然可以使用基本可重复使用的对象进行,虽然在这种情况下,一个技术无关的接口的好处是失去了获得更好的性能。

I understand the flexibility gains in this, but my concerns are about performance. It seems to me that a system built with such a fine level of granularity to its services spends too many resources on translating service messages, and the performance will be unacceptable. It also seems to me that the flexibility gains can still be made using basic reusable objects, although in that case the benefit of a technology-agnostic interface is lost to gain performance.

有关更多的背景:该组织要求该软件目前没有第三方的软件套件,需要整合稳定。该软件将取代所有的套房。还有目前没有以外的消费者谁需要访问该网站提供的界面以外的数据 - 所有的服务调用将从其他部分我们系统内部。 SOA在此情况下,选择似乎完全基于preparation的概念。

For more background: The organization requesting this software does not currently have a stable of third-party software suites that need integrating with. This software will replace all suites. There are also currently no outside consumers who need to access the data outside of the provided website interface -- all service calls will be from other pieces inside our system. The choice of SOA in this case seems entirely based on the concept of "preparation".

所以我的问题 - 什么级别的粒度是服务的稳定可以接受在不牺牲性能?我是不是太怀疑我们将实现我们所有的实体服务的性能命中?如果功能可作为Web服务时,才需要,用preparation重点不是进入了服务的后来被它的顶部下跌的概率设计业务层?

So my question -- what level of granularity is acceptable in a stable of services without sacrificing performance? Am I being too skeptical of the performance hits we'll take implementing all our entities as services? Should functionality be available as web services only when they are needed, with the "preparation" focus instead going into designing the business layer for the probability of services later being dropped on top of it?

推荐答案

首先,找到甜蜜点服务的数量难以肯定。太多的服务,和您的整合成本受苦,过少,你的执行成本受到影响。你必须找到一个很好的平衡。

First off, finding the "sweet spot" in the number of services is difficult for sure. Too many services, and your integration costs suffer, too few, and your implementation costs suffer. You have to find a good balance.

我给你的建议是按照 Juval洛伊的方法论中,你应该打破您的服务由波动的区域,或者改变的地方。这会给你你的粒度级别。你也应该读他的书WCF

My advice to you is to follow Juval Lowy's methodology in that you should break down your services by areas of volatility, or areas of change. This will give you your granularity level. You should also read his WCF book if you can.

至于性能,WCF本身将支持成千上万根据您的使用案例和硬件每秒调用。服务呼叫服务是没有问题的。该平台将支持它,如果你做你的一部分。例如,使用权为正确的方案(命名管道来调用服务在同一台机器和TCP上跨机器调用服务如果可能)的结合。你也应该实现应用程序的垂直切片和构建应用程序的其余部分之前做性能测试。这将验证您的架构。

As for the performance, WCF will inherently support many thousands of calls per second depending on your use cases and hardware. Services calling services is not a problem. The platform will support it if you do your part. For example, use the right binding for the right scenario (named pipes to call services on the same machine and TCP to call services across machine where possible). You should also implement a vertical slice of the application and do performance testing before building the rest of the application. This will verify your architecture.

这篇关于SOA - 如何颗粒服务应该是保持业绩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆