ISSUE : Roundtripping original values RRS feed

  • Question

  • Just came across this in RIA RC breaking changes

    "Roundtripping original values

    In the previous release, the entire original entity was sent to the server for concurrency checks. This implementation had a negative impact on performance when the entity included fields with original values that were not relevant to the application. In the RC release, you can specify which members are sent to the server by marking them with the RoundtripOriginal attribute. In addition to members marked with the RoundtripOriginal attribute, any members that are marked with the ConcurrencyCheck attribute or the TimeStamp attribute are automatically sent to the server."

    ok, fair enough, but my understanding of WHY we used to send original values was quite different

    Let me share my logic flow here

    1. We send data to client to being able to see it and modify it

    2. We send changes back to the server to modify data store accordingly and we need old values to construct correct UPDATE statement (we want to update only fields that were changed!!!)

    3. We send properties we use for concurrency checks server->client->server and WE NEVER modify those! we use those values to check concurency on server side only against data store. Those errors are propogated to client to let user decide what to do.

    so the bottom line is - we always need old values if we changed entity, we don't care about old values for [ConcurrencyCheck] properties

    If you guys have perf issue with sending old values for EVERY entity in changeset, just don't send old values for Unchanged entities which you happily used to do ;)

    and now you are forcing devs to annotate all fileds explicitly with [RoundtripOriginal]??? very nice of you!

    Cheers, Sergey




    Monday, March 22, 2010 12:44 AM