简体   繁体   English

Azure Mobile中的乐观并发功能

[英]Optimistic concurrency features in Azure Mobile

I have a question regrading data synchronization in azure mobile services , in this article http://blogs.msdn.com/b/carlosfigueira/archive/2013/12/02/accessing-optimistic-concurrency-features-in-azure-mobile-services-client-sdks.aspx 我对在Azure移动服务中更新数据同步有疑问,在本文http://blogs.msdn.com/b/carlosfigueira/archive/2013/12/02/accessing-optimistic-concurrency-features-in-azure-mobile中-services-client-sdks.aspx

it's mentions azure uses 2 parameters for this _version and _updatedAt. 提到了azure为此_version和_updatedAt使用2个参数。 say I have 2 client one web and one mobile . 说我有2个客户1个网站和1个手机。 I have mobile client get data from server with version 1, and the client goes off line . 我有移动客户端从版本1的服务器获取数据,并且客户端脱机。 My web client updates the data now it's version at 2 . 我的Web客户端现在更新数据的版本为2。 my mobile client goes back on line tries to push it changes but it version is behind so the changes are reject . 我的移动客户端重新上线,尝试推送更改,但版本落后,因此更改被拒绝。 what is the use case for _updatedAt? _updatedAt的用例是什么?

The version column is all that is used by the OC feature, and drives the use of if-match headers. 版本列是OC功能使用的全部列,并推动if-match标头的使用。

UpdatedAt is used as part of an incremental sync process for creating a local cache of data. UpdatedAt用作创建本地数据缓存的增量同步过程的一部分。 So when you try to pull new changes down to your local cache, the client will only ask for records who's updatedAt is newer than the last time it ran. 因此,当您尝试将新更改拉入本地缓存时,客户端将只要求谁的updateAt记录比上次运行的记录新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM