none
best way to Sync Emails and Calendar items RRS feed

  • Question

  • Hi,

    What's the best way to sync calendar items and emails using EWS API , for 100+ mailboxes, to a third party app.

    Is notification services good for it, or we should connect to each mailbox one by one, and get all items based on current datetime etc, and then sync to our third party app?

    Your help would be greatly appreciated.



    Regards, David Johnson

    Tuesday, January 21, 2014 4:26 PM

Answers

  • The methods do different things

    Push notifications just tell you an Item has been updated and will give you the ItemId of that item. You then need to get that item and work out the changes

    SyncFolderItems and Pull Notifications are very simular in that they provide a list of updates the underlying Sync mech is a little different Watermarks vs SyncState. In comparison to Push notifications these will consume more bandwidth and require more requests to the server.

    >Using Filter and FindItems

    Would just require more requests to the server to do the same thing. However no matter the method you use it will still require you bind to the Item that is modified using GetItem to work out what's changed etc and all these method have challenges around getting deleted items. The underlying code for Pull notifications and SyncFolderItems is petty simple my suggestion would be you write a test application yourself to see.

    Saying which is better really depends on what your trying to achieve. Eg if need to make the most minimalistic number of requests to the server then push notifications would be best to track changes see http://msdn.microsoft.com/en-us/library/office/dn458791(v=exchg.150).aspx which lists the differences in bandwidth.

    Other things you need to consider are throttling which maybe not a problem OnPremise but will be if you move into the cloud or Office365.

    Cheers
    Glen

    • Marked as answer by Cyber Friend Friday, June 27, 2014 1:22 PM
    Friday, January 24, 2014 3:11 AM

All replies

  • Notifications will just tell you (asynchronously) that a particular store item has changed, the watermarks in push/pull notifications will allow you to track the state of synchronization (the SyncFolderitems operation have the SyncState to do this).  

    Calendaring data is a lot more complex in that you need to cater for recurrence, so to support this you will always need to make an expansion query using a DateRange and a CalendarVeiw to expands these recurring appointment. (Unless where you syncing the data to can understand the MAPI recurrence patterns, if you don't need to support recurrence than it make the process a lot simpler).

    Cheers
    Glen

    Wednesday, January 22, 2014 4:25 AM
  • Hi Glen,

    Thanks for your reply, and also telling about recurrent appointments complexity. I am trying to understand best method to use in this type of sync.

    As I understnad there are 3 methods

    Push\Pull notifications 

    Using SyncFolderItems with SyncState (this would be one mailbox at a time)

    Using Filter and FindItems, keeping last sync time somewhere (this would be one mailbox at a time)

    I was just curious about knowing pros and cons of using these methods for Appointment and Email Items sync for 100+ mailboxes. Which one is the best?


    Regards, David Johnson

    Thursday, January 23, 2014 2:22 PM
  • The methods do different things

    Push notifications just tell you an Item has been updated and will give you the ItemId of that item. You then need to get that item and work out the changes

    SyncFolderItems and Pull Notifications are very simular in that they provide a list of updates the underlying Sync mech is a little different Watermarks vs SyncState. In comparison to Push notifications these will consume more bandwidth and require more requests to the server.

    >Using Filter and FindItems

    Would just require more requests to the server to do the same thing. However no matter the method you use it will still require you bind to the Item that is modified using GetItem to work out what's changed etc and all these method have challenges around getting deleted items. The underlying code for Pull notifications and SyncFolderItems is petty simple my suggestion would be you write a test application yourself to see.

    Saying which is better really depends on what your trying to achieve. Eg if need to make the most minimalistic number of requests to the server then push notifications would be best to track changes see http://msdn.microsoft.com/en-us/library/office/dn458791(v=exchg.150).aspx which lists the differences in bandwidth.

    Other things you need to consider are throttling which maybe not a problem OnPremise but will be if you move into the cloud or Office365.

    Cheers
    Glen

    • Marked as answer by Cyber Friend Friday, June 27, 2014 1:22 PM
    Friday, January 24, 2014 3:11 AM