locked
How to verify roaming data in live account

    Question

  • I am trying to understand how roaming works in background.

    I understand Windows does roaming data syncing automatically using live account, and last writer algorithm. 

    In a test scenario,  i have done multiple updates from multiple devices with slight time difference.

    I want to verify data by checking into live account data.

    How to verify live account data?


     

    mole on left eye

    Tuesday, April 24, 2012 11:32 AM

Answers

  • The roaming is explicitly not deterministic. See the Guidelines for roaming application data:

    Don't use roaming for instant syncing
    Windows roams app data opportunistically and doesn't guarantee an instant sync. In scenarios where a user is offline or on a high latency network, roaming can be delayed significantly. Don't build a UI that needs that sync to occur instantly. For example, don't create media apps that push up-to-the-second updates on a user’s position in a song that rely on roaming application data.
    --Rob
    Wednesday, April 25, 2012 6:40 AM
    Moderator

All replies

  • Hello,

    I want to store app settings in Roaming Folder. (Settings are very small ~2KB).

    I am storing in ApplicationData.Current.RoamingFolder folder. 

    The above is pointing to C:\Users\Tilak\AppData\Local\Packages\b5dea8e0-504c-4105-8b4c-6d2da32816f7_vbe7xwj32evkc\RoamingState

    I am surprised why the above location is pointing to User\Local folder and not User\Roaming. 

     ApplicationData.Current.LocalFolder is pointing to C:\Users\Tilak\AppData\Local\Packages\b5dea8e0-504c-4105-8b4c-6d2da32816f7_vbe7xwj32evkc\LocalState.

    Also, What additional steps needs to be followed for sync'ing  multiple device on same live account using Roaming storage.

    Thanks

    Tilak



    mole on left eye

    Monday, April 23, 2012 9:46 AM
  • I think that's right. Have you tried getting the data from a different Win8 machine running under the same live id? It should "just" work. No additional steps are needed.

    Monday, April 23, 2012 3:31 PM
  • Thanks for the response,

    I have tried, and now it is working intermittently in 3 devices after using save live id.

    I have gone through some build videos, and i understand syncing is not instant, there is latency.  I also understand this should be updated on logoff/lock (not updated until application has reference to handle).

    I want to understand the exact behavior on following parameters

    1. When does update takes place, on log off,lock , application close, 

    2. How to release handle on roaming settings/folders so that changes can be propagated while application is running

    3. Sync takes place per application or per live id login session. ( if application is closed, but session is not lock/logoff, whether settings will roam or not). 

    4. Where can i see the data on private cloud ( live id account)

    The roaming behavior is very inconsistent and unreliable as per current testing. Sceneario is same/similar to scenario in another post http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/519343db-2c3f-4a96-9271-f94406bd8be2 .

    scenario code

    for transmitter part, 
    public ApplicationData AppData = ApplicationData.Current;
    public ApplicationDataContainer roamingData = ApplicationData.Current.RoamingSettings;
    public main()
    {
    roamingData.Values["hello"] = "Hello? anyone there?";
    AppData.SignalDataChanged();
    }
    For receiver part, 
    public ApplicationDataContainer roamingData = ApplicationData.Current.RoamingSettings;
    public main()
    { ApplicationData.Current.DataChanged += new TypedEventHandler<ApplicationData, object>(DataChangeHandler);
    }
    void DataChangeHandler(ApplicationData appData, object o)
    {
                if (roamingData.Values.ContainsKey("hello"))
                {
                    Debug.WriteLine("!!!! App Roaming: {0}", roamingData.Values["hello"].ToString());
                }
    }

    Thank you.


    mole on left eye


    Tuesday, April 24, 2012 9:50 AM
  • You will need to sign into another machine with your Live ID and install your app.  They you will see the roaming data (after a short period of time).

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, April 24, 2012 12:21 PM
    Moderator
  • >>short period of time

    Short period of time is not deterministic. I was demonstrating the same to my colleague, and even after 10-15 min, roaming data was not propagated.

    As soon as i was signing out, roaming data was displayed.  As a result i know it is working fine, but very difficult to show to others.

    Can you suggest, how this functionality can be demonstrated with minimum time lag (guidelines/best practices/settings tweaks)?


    mole on left eye

    Wednesday, April 25, 2012 3:01 AM
  • The question is regarding usage of   ApplicationData.Current.RoamingFolder, and   ApplicationData.Current.RoamingSettings.

    How data synchronization takes place in the background for roaming settings? 

    Whether it is done periodically based on timer (if yes, what is the interval, and how to configure it)? 

    How to force the roaming data syncrhonization  (i have used ApplicationData.SignalDataChanged but still it is taking long time to propagate)?


    mole on left eye

    Wednesday, April 25, 2012 4:00 AM
  • The roaming is explicitly not deterministic. See the Guidelines for roaming application data:

    Don't use roaming for instant syncing
    Windows roams app data opportunistically and doesn't guarantee an instant sync. In scenarios where a user is offline or on a high latency network, roaming can be delayed significantly. Don't build a UI that needs that sync to occur instantly. For example, don't create media apps that push up-to-the-second updates on a user’s position in a song that rely on roaming application data.
    --Rob
    Wednesday, April 25, 2012 6:40 AM
    Moderator
  • You are correct.  However that is your only option.  You have no control over when the data is pushed to the cloud and when it gets retrieved.  You can hope to accelerate this by logging out of the machines and logging back in.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, April 25, 2012 11:49 AM
    Moderator
  • We're merging these threads since they are the same topic.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator


    Wednesday, April 25, 2012 1:34 PM
    Moderator
  • Please stop double posting.  You've already asked this question three times.  I'm merging with the other threads.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Wednesday, April 25, 2012 8:40 PM
    Moderator