Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

1 Answer

  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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...