Clear Data Builder: data synchronization in a multi-user environment

Clear Data Builder is a part of the open source Flex framework Clear Toolkit, see This blog introduces data-sync feature of CDB.

When more than one client works with the same application and the same piece of data, Clear Data Builder offers auto-notification mechanism about data modifications.  TO see how it works, examine the code of the Java class that is used for generation of a sample CRUD application using Java DTO src\com\farata\test\
* @daoflex:java
*   transferType=com.farata.test.EmployeeDTO[]
*   keyColumns=emp_id
*   autoSyncEnabled=true
public List<EmployeeDTO> fill()

The attribute autoSyncEnabled allow possibility to turn on/poff auto-notification of changes.  Set  the attribute autoSyncEnabled to true and then rebuild the project.
Copy the generated sample application \test\rpc\com\farata\test\Employee_fill_GridTest.mxml into the folder flex_src. This file contains the following code (note the line collection.autoSyncEnabled=true):
private function onCreationComplete() : void {
collection = new DataCollection();
//fill_sync is the default for collection.syncMethod
log = new ArrayCollection();
collection.addEventListener( CollectionEvent.COLLECTION_CHANGE, logEvent);
collection.addEventListener(“fault”, logEvent);

Start the server and run the application as per CDB documentation.  When the application runs, open yet another browser instance pointing at the same url.

Modify some data in one browser and press the button Commit. The data grid in another browser window will reflect the latest changes.
This synchronization has been implemented using the data push via streaming AMF channel and has been tested with BlazeDS.