locked
Does batchmode need sync_batch_count? RRS feed

  • Question

  • Hello,

    I am testing the SyncFramework in combination with a Firebird-Database. I can sync between to Firebird-Databases. Now I want to implement the batchmode.
    For this I have written a stored-procedure sp_GetnewBatchAnchor like in this example: http://msdn.microsoft.com/en-us/library/bb902828.aspx . But just in Firebird.

    The problem by the Firebird-Database is, that it can't use InputOutput-parameter as far as I know. So I have a problem with sync_batch_count.
    Is sync_batch_cont relevant for syncing or can I abandon of it.

    What does the SyncFramework with sync_batch_count when it get it from the procedure and what does SyncFramework send back to the procedure in sync_batch_count?

    Thanks for your answers


    best regards

    Boris
    • Moved by Hengzhe Li Friday, April 22, 2011 3:29 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, April 1, 2009 3:08 PM

Answers

  • Hey Boris,

    Here's what I have found out:
    sync_batch_count is relevant for batch processing and is required to be InputOutput parameter to be used by SyncServices for ADO.NET .
    When it is sent to SyncFramework, it contains the maximum number of changes that SyncFramework should pack in a change batch. When it comes back from SyncFramework, it contains the actual number of changes that are present in the batch. E.g. in case of last change batch, the input value can be greater than the ouput values that's sent back - signifying no more changes and hence this is the last change batch.

    That said, there could be couple of things you could look into:

    1. Do frequent syncs - without batch processing. This would ensure when all the changes are returned, they don't overwhelm the app and are manageable even without batching. 
    2. You could calculate the batch in you App and provide it as a session level variable to the server command(s).  This requires more thinking when you implement the Change Enumeration and Change Application commands on the server side ( and can be more error prone).


    Hope this helps.

    Thanks,
    Sameer

    Thursday, April 2, 2009 9:18 PM

All replies

  • Hey Boris,

    Here's what I have found out:
    sync_batch_count is relevant for batch processing and is required to be InputOutput parameter to be used by SyncServices for ADO.NET .
    When it is sent to SyncFramework, it contains the maximum number of changes that SyncFramework should pack in a change batch. When it comes back from SyncFramework, it contains the actual number of changes that are present in the batch. E.g. in case of last change batch, the input value can be greater than the ouput values that's sent back - signifying no more changes and hence this is the last change batch.

    That said, there could be couple of things you could look into:

    1. Do frequent syncs - without batch processing. This would ensure when all the changes are returned, they don't overwhelm the app and are manageable even without batching. 
    2. You could calculate the batch in you App and provide it as a session level variable to the server command(s).  This requires more thinking when you implement the Change Enumeration and Change Application commands on the server side ( and can be more error prone).


    Hope this helps.

    Thanks,
    Sameer

    Thursday, April 2, 2009 9:18 PM
  • Hello Sameer,

    thanks for your answer, this will help me to find a way to batchmode in my application.

    best regards


    Boris
    Friday, April 3, 2009 6:05 AM