locked
Sync from local storage to azure blob - how to push only deltas RRS feed

  • Question

  • I have about 300GB data on local storage that gets synced to azure blob storage. Lately if any new files are posted it takes days before those files are uploaded to the blob. Is there a way i can do only deltas? Files only the local storage don't change often, but when new files are posted i want them to be uploaded soon.

    I am using MS syncframework 2.0. Here is my code:

    // Setup Store and Provider
                  
                    string accountName = ConfigurationManager.AppSettings.Get("AccountName");
                    string accountKey = ConfigurationManager.AppSettings.Get("AccountSharedKey");
                    string storageURL = ConfigurationManager.AppSettings.Get("AccountStorageURL");
                    CloudStorageAccount storageAccount = new CloudStorageAccount(new StorageCredentialsAccountAndKey(accountName, accountKey), false);
                  
                    AzureBlobStore blobStore = new AzureBlobStore(_containerName, storageAccount);
                    Info("Successfully created/attached to container " + _containerName + ".");
                    AzureBlobSyncProvider azureProvider = new AzureBlobSyncProvider(_containerName, blobStore);
                    azureProvider.ApplyingChange += new EventHandler<ApplyingBlobEventArgs>(UploadingFile);

                    FileSyncProvider fileSyncProvider = null;
                    try
                    {
                        fileSyncProvider = new FileSyncProvider(_localPathName);
                    }
                    catch (ArgumentException)
                    {
                        fileSyncProvider = new FileSyncProvider(Guid.NewGuid(), _localPathName);
                   
                    }
                    fileSyncProvider.ApplyingChange += new EventHandler<ApplyingChangeEventArgs>(DownloadingFile);

                    try
                    {
                        SyncOrchestrator orchestrator = new SyncOrchestrator();
                        orchestrator.LocalProvider = fileSyncProvider;
                        orchestrator.RemoteProvider = azureProvider;

                        orchestrator.Synchronize();
                    }
                    finally
                    {
                        fileSyncProvider.Dispose();
                    }

    Tuesday, May 14, 2013 8:28 PM

All replies

  • by deltas you mean only parts of the file that changed and not uploading the entire file?

    if you want new files to be uploaded soon, then do more frequent syncs.

    can you expound more about "it takes days", you mean it takes days from the time you start the sync until it finishes?

    Wednesday, May 15, 2013 1:23 PM
  • By deltas i mean only new files (entire files.) The sync doesn't recognize these new files as soon as they are uploaded. It takes 4 to 7 days for the sync to pick up these files. We have the sync running as a windows service, so it is constantly running.
    Monday, May 20, 2013 8:46 PM
  • if your windows service is constantly running, how does it check if it needs to fire the sync? file events?
    Tuesday, May 21, 2013 11:26 AM