接口映射和中介模块有什么区别?
就 IBM WID 而言,接口映射和中介模块有什么区别?
What is the difference between Interface Map and Mediation Module in terms of IBM WID?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
就 IBM WID 而言,接口映射和中介模块有什么区别?
What is the difference between Interface Map and Mediation Module in terms of IBM WID?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
接口映射只是将两个接口连接在一起。本质上,这允许您从不同的接口映射数据类型,并且还可以允许您“映射”(尽管这是在幕后完成的)它们之间的协议。但是,如果在此映射之间的任何位置出现错误,则无法(自动)处理它,并且无法映射回返回错误(至少很容易)。另外,您无法进行服务路由/中介。这只是两者之间的简单映射。
中介模块可以让您做更多的事情。如果您需要将消息路由到多个服务,或者需要根据消息内容或消息标头中的元数据路由到不同的服务,那么您需要中介模块。如果您需要对安全性、审计或日志记录进行任何操作,则需要一个中介模块。如果您打算创建一个服务网关模式或连接到您的服务所在的 UDDI 注册表(同样,动态服务查找),您需要一个中介模块。您还可以在错误处理方面获得更多收益(重试、存储和转发、路由到不同的服务、映射回服务故障并返回它、对失败事务进行补偿等)。
简而言之,接口映射用于更简单的事情,你不做任何错误处理并且无法恢复。当您需要在服务请求者和服务提供者之间处理更多事情时,可以使用中介模块。
An Interface Map just joins together two interfaces. In essence this allows you to map data types from the different interfaces and it also can allow you to "map" (though this is done under the covers) the protocols between them. However if you have an error anywhere in between this mapping you cannot (automatically) handle it, and you cannot map back to the return fault (at least easily). Plus you cannot do service routing/mediation. It is just a simple map between the two.
A Mediation Module allows you to do so much more. If you need to route a message to more than one service, or if you need to route to different services based on message content or metadata in the message headers, then you want a mediation module. If you need to do anything with security or auditing or logging, you want a mediation module. If you intend to create a service gateway pattern or hook up to a UDDI registry where your services are located (again, dynamic service lookup) you want a mediation module. You can also gain more on the side of error handling (retries, store and forward, route to a different service, map back to the service fault and return it, compensation for failed transaction, etc.)
In short, an interface map is for something more simple where you do not do any error handling and cannot recover. A mediation module is for when you need to handle a few more things between the service requester an the service provider.