Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
292 views
in Technique[技术] by (71.8m points)

c# - Understanding Data Outside Of Service : SOA

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

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).

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”.

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

  1. What is the missing point in my understanding?

  2. Is the message immutable in above example?

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

  4. How is versioning of message done here?

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

READING

  1. Principles of Service Design: Service Patterns and Anti-Patterns

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  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.

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

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

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

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...