Web服务版本控制:ESB是否过大? [英] Web Services Versioning: Is ESB overkill?

查看:75
本文介绍了Web服务版本控制:ESB是否过大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在生产中有多个版本的Web服务(REST和SOAP),并且每个版本的数量都在不断增加。



在两个版本之间,可以对请求和响应进行微小的更改(通常是添加新字段)。



如果我们要淘汰旧版本,我们如何继续为旧版本的请求服务?



一个可能的解决方案的一个方面涉及创建虚拟端点,以将对先前版本的请求路由到相同服务的新版本。因此,对/ v1 / customer / 1的请求映射到/ v2 / customer / 1。我们正在使用Mashery,可以很容易地做到这一点。



我们还希望对请求和响应应用转换规则,以生成符合旧合同的XML和JSON响应。



总而言之,我们需要将路由和转换规则都应用于所有传入的消息和响应。 ESB是否为此过度?我们的标准不太符合 http:// blogs中概述的标准.mulesoft.org / to-esb-or-not-to-esb / 。有没有更简单的解决方案来解决这个问题?

解决方案

该工具是否适合...

不需要修改我们的代码以实现请求和响应的版本控制? / p>

如果您要查看的ESB可以满足您的版本和转换需求,请继续使用它。



您不想要的是哦,这是我们的ESB在监听我们的一个Web服务的一个端点。



在我看来,ESB可能非常适合您的需求。您无需勾选所有复选框。实际上,您唯一需要检查的框是此工具是否值得在我们的环境中学习,利用,支持和部署,而不是与我们更喜欢的东西一起学习,利用,支持和部署?



因为ESB之类的软件存在一个问题,即它们可能附带很多东西,因此很多文档对于平台的新手来说都是很困难的



我抓住了ESB并进行了试验,然后进行了一些性能测试。如果您不花大量时间在飞行员身上,而且似乎可以解决问题,那就顺其自然。


We have multiple versions of our web services (both REST and SOAP) in production, and the number keeps getting bigger with every release.

Between versions, there can be minor changes (usually additions of new fields) to requests and responses.

If we were to retire old versions, how could we continue to service requests for old versions?

One aspect of a possible solution involves creating "virtual endpoints" to route requests for previous versions to the new versions of the same services. Thus, requests for /v1/customer/1 maps to /v2/customer/1. We are using Mashery through which this can easily be done.

We also want to apply transformation rules on requests and responses to generate XML and JSON responses that conform to the old contracts.

To summarize, we have a need for both routing and transformation rules to be applied to all incoming messages and responses. Is an ESB overkill for this? Our criteria don't quite fit the criteria outlined in http://blogs.mulesoft.org/to-esb-or-not-to-esb/. Is there a simpler solution to this problem? One that doesn't require modifying our code to implement versioning of requests and responses?

解决方案

If the tool fits...

If the ESB that you're looking at it going to give satisfy your versioning and transformation needs, then go ahead and use it.

What you don't want is "Oh, here's our ESB listening to our one endpoint for our one web service". That's simply insane.

Seems to me an ESB may well fit your needs quite well. You don't have to check off all of the boxes. In fact, the only box you need to check off is the "Is this tool worth the resources and time to learn, leverage, support and deploy in our environment vs working with something we're more comfortable with" box.

Because one problem with software like ESBs is that they can come with a lot of stuff, and thus a lot of documentation that can be difficult for a novice in the platform to wade through and pick what it appropriate, and how to configure it.

I'd grab an ESB and do a pilot, and then do some performance tests. If you don't burn a huge amount of time on the pilot, and it seems to work out, then roll with it.

这篇关于Web服务版本控制:ESB是否过大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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