理解服务外的数据:SOA [英] Understanding Data Outside Of Service : SOA

查看:38
本文介绍了理解服务外的数据:SOA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意:服务外的数据是指服务返回并被客户端消费的消息.

Note: Data outside of service means the message returned by a service and consumed by the client.

我有一个名为 LastBuyer Service 的服务.当我向服务输入 bookID 时,这将返回一本书的最后一个买家姓名.当我为同一本书 ID 调用该服务时,它会返回不同的结果(如果一本书是由新买家购买的).所以我无法在客户端缓存服务的结果(对于特定的 BookID).

I have a service named LastBuyer Service. This will return the last buyer name of a book when I input the bookID to the service. When I call the service for the same book id, it will return different result (if a book is purchased by a new buyer). So I cannot cache the result of the service in the client (for a particular BookID).

在阅读内部数据 vs. 外部数据"一文时,它说可以缓存"——由于消息的 ID 返回相同的数据,因此可以缓存消息".

While reading the article "Data on the Inside vs. Data on the Outside" it says "Ok to Cache" – " Since the ID of the message returns the same data, it is OK to cache a message".

参考:http://msdn.microsoft.com/en-us/图书馆/ms954587.aspx

  1. 我的理解中缺少什么?

  1. What is the missing point in my understanding?

上面例子中的消息是不可变的吗?

Is the message immutable in above example?

上例中的版本相关标识符和版本无关标识符分别是什么?

What are the version-dependent and version-independent identifiers in above example?

这里是如何对消息进行版本控制的?

How is versioning of message done here?

哪本 WCF 书籍通过示例清楚地解释了 SOA 概念和模式?

Which is the WCF book that explains SOA concepts and patterns clearly with examples?

阅读

  1. 服务设计原则:服务模式和反模式

http://msdn.microsoft.com/en-us/library/ms954638.aspx

推荐答案

  1. 您忽略了一个事实,即(正如@Carsten-Konig 暗示的那样)任何给定快照时间的数据都是不可变的.除非您返回并填写旧订单,否则截至昨天下午 5:00 购买这本书的最后一个人总是相同的.从那时起有人购买了这本书(导致该数据的版本)这一事实与昨天的结果无关.这可能是也可能不是要缓存的有用数据,但在任何给定的时间点它都是不可变的.

  1. You are missing the fact that (as @Carsten-Konig implies) the data for any given snapshot time is immutable. Unless you go back and fill in old orders, then the last person to buy the book as of 5:00 PM yesterday is always going to be the same. The fact that since then someone has bought the book (resulting in a new version of that data) is irrelevant to yesterday's result. This may or may not be useful data to cache, but as of any given point in time it is immutable.

如果消息密钥的一部分是时间戳,则消息是不可变的.

The message is immutable if part of the message's key is it's timestamp.

与版本无关的标识符是书的 ID.与版本相关的标识符是快照时间戳.

The version-independent identifier is the ID of the book. The version-dependent identifier is the snapshot timestamp.

通过快照时间戳(同样,对于缓存目的可能有用也可能有用)

By snapshot timestamp (which again, may or not be useful for caching purposes)

至于这方面的好书,恐怕我无法给出建议.但我怀疑亚马逊或 bn.com 上的评论是一个不错的起点.

As for a good book on the subject, I'm afraid I can't give recommendations. But I suspect that the reviews on amazon or bn.com are a good place to start.

这篇关于理解服务外的数据:SOA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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