" serverBlob"内容 [英] "serverBlob" content

查看:123
本文介绍了" serverBlob"内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

再次问好。关于ctp 4的另外一个问题。(我在CTP 4样本中使用了"ListService" 示例和"iphone"示例。)

Hello again.One more question about ctp 4. (I working with "ListService"  example and "iphone" example from CTP 4 samples.)

Iphone和服务器同步一个表。此表中的行具有不同的大小。我知道
近似 
 
该表中每一行的大小。

Iphone and server synchronize one table. Rows in this table have different size. I know approximate   size of each row in that table .

但在 同步
iphone和服务器我需要登录iphone
近似
size of服务器更新数据包并为iphone用户显示此大小。

But before synchronization iphone and server i need to get on iphone approximate size of server updates packet and show this size for iphone user.

并且用户可以开始同步或取消它。

如何在"iphone样本"中计算iphone当前同步的服务器更新数据的近似大小?

但我不知道如何获取参数值  sp_selectchanges(或基值
for calculated
这些参数) 在iphone同步之前  

but i don't know how i can get values of parameters  sp_selectchanges(or base values for calculate these parameters) on iphone before sync .

 


注意到
iphone和listService互相发送一些消息

I noticed that iphone and listService send each other some messages like that

" d":{" __ sync":{" moreChangesAvailable":false," serverBlob":" AAEAAAD \ /...& nbsp; "}," results":[...

"d":{"__sync":{"moreChangesAvailable":false,"serverBlob":"AAEAAAD\/...  "},"results":[...

  i think 在"serverBlob"里面strore有关上次同步会话参数的信息,我可以使用它来执行我的sp用于计算服务器更新数据包大小。
我是对的 ?或者在同步之前还有另一种方法可以在iphone服务器上更新大小


 i think  that inside "serverBlob" strore information about last sync session parameters and i can use that for exec my sp for calculation server updates packet size. Am I right? Or may be there is another way for gettin on iphone server update size before synchronization?



推荐答案

serverBlob不存储上次同步会话的统计信息,因此该方法不适用于您。有一个名为SyncStatistics的属性,但可以在客户端的Microsoft平台上使用,而不是在iPhone上,并且在同步完成后,该属性将填充
,而不是之前。由于另一个客户端可以同时更改服务器上的项目,因此Sync技术很难预测会发送多少更改。

The serverBlob does not store statistics from last sync session, so that approach would not work for you. There is a property called SyncStatistics but that's available on Microsoft platforms on the client side, not on the iPhone, and that property is populated after the sync is completed, not before. It is hard for Sync technology to predict how many changes are beind sent since another client could be simultaneously changing items on the server.

可以有一个解决方法,我没有尝试并且还需要一些工作:由于在服务器端是WCF服务,您可以在服务上添加另一种方法并调用此方法来确定要从服务器下载的数据量。
当然,在您开始下载后需要调用此方法。在服务器端,有一些业务逻辑扩展点,称为拦截器,可用于计算下载批次中的行数或行数。这是
的链接:
http:/ /msdn.microsoft.com/en-us/library/gg299068(v=sql.110).aspx

There can be a work around, which I haven't tried and would also require some work: Since on the server side is a WCF service, you could add another method on the service and call this method to determine amount of data to be downloaded from the server. Ofcourse, this method needs to be called after you initiate the download. On the server side, there are business logic extensibility points, called interceptors, which you can use to count the size or the number of rows in a download batch. Here's the link for this: http://msdn.microsoft.com/en-us/library/gg299068(v=sql.110).aspx

 

希望这会有所帮助。

Sameer

 

 

 


这篇关于" serverBlob"内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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