webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Data synchronization

  • 1.  Data synchronization

    Posted Mon February 20, 2012 04:19 PM

    Hi all,
    We have a very typical problem. There’s a model that can be updated from a thread and in the same time this model is displayed on the screen (in the UI thread). So the question is how to syncronize the common state (in this case the model. As far as we see the synchonized blocks are commented after cross-compilation to Objective C and we are not sure whether volatile is supported either. Can you point us to techniques for syncronization using MobileDesigner?

    Thanks,
    Nenko


    #webMethods-General
    #webMethods
    #mobile
    #Integration-Server-and-ESB


  • 2.  RE: Data synchronization

    Posted Mon February 20, 2012 05:10 PM

    Hi Nenko,

    Volatile is not currently supported, however standard synchronization should work. Whilst you do indeed see a commented out block of the form

    //synchronized(my_obj)
    

    in the converting C++ code, this is simply preserved for informational purposes. You should also see a line or so later something of the form:

    MS_START_SYNC_LOCK(my_obj)
    

    This does result in synchronisation.

    Please note though that it’s best not to drip-feed information into the UI in small changes - a number of computational calculations must be performed each time the general UI layout is changed. Whilst changing this repeatedly should work, you may notice a performance degradation as a side effect if done too frequently. Instead, it might be better to display a ‘progress’ animation to the user to show data is being retrieved from a server / updated on the device, and then update the UI in one block when ready.

    Regards,

    Nick.


    #webMethods
    #webMethods-General
    #mobile
    #Integration-Server-and-ESB


  • 3.  RE: Data synchronization

    Posted Tue February 21, 2012 09:58 AM