upload batch size RRS feed

  • Question

  • I see that the DbServerSyncProvider has a BatchSize property but the client provider does not.  I would like to be able to be able to specify the max. size of uploads (in bytes or records) to avoid bumping up against protocol message size limits (i.e. maxReceivedMessageSize property of WCF wsHttpBinding) .  Is there a way to accomplish this with sync services as it exists today or in the RTM?

    • Moved by Max Wang_1983 Friday, April 22, 2011 9:56 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, October 26, 2007 4:30 PM

All replies

  • Hi Zac,


    Unfortunately, the batching is only for downloading (from server to client) and not for uplaod.



    Friday, October 26, 2007 5:03 PM

    Hey Rafik,


    I have been trying to implement the batching feature and can't tell if it is actually doing anything.  Is all that is needed is to set the "BatchSize" property of the server provider?  I tried this and then tried to monitor the progress by handling the syncAgent.SessionProgress and getting the values from the BatchProgress class.  In that, the BatchCount is always zero and the BatchNumber is either 0 or 1.  Can you give a brief explanation on how batching works in Sync Services?




    Friday, October 26, 2007 5:10 PM
  • Hi Daniel,


    I need post more clarification on how to use batching with sync services. I've a demo implemented to show off this feature but did not get a chance to publish it yet. Will try to do that in the next few days.


    So let me give you quick overview here. Batching can be really challenging but to keep things simple, sync services have a simple approach that enable developer to batch payloads when downloading changes to the client. If you recall, when a download request is received at the server, the sync runtime uses the last received anchor from the client (low anchor) request and query the server database for a new anchor (high anchor). Changes between low and high points are then enumerated. Batching is all about tweaking the high anchor point such that the window will be small enough to have the batch size. This approach leaves the door open for developers to implements a wide spectrum of ideas to deliver batched content to the client. The sample demo should show you a simple approach.




    Monday, October 29, 2007 5:27 PM