Archived

This forum has been archived. Please start a new discussion on GitHub.

A mobile device application by using Ice-E

Hi,

currently i am working on a research project that runs on the mobile device as an client. But a problem is that the mobile device may disconnect from the network. If the repliacted object on the mobile device is then updated by the client application, upon reconnection there will need to be a synchronisation activity so that all replica objects are brought back to consistency. So is that could be done by using Ice-E? if so can anyone here help me out and give me a starting point or some relevant reading materials.

cheers

Jin

Comments

  • If I understand your description correctly, you have several mobile clients that are occassionally connected and you need to re-establish them in your distributed system whenever they reconnect. Assuming that this means that network addressing is frequently changing, Ice-E doesn't provide a mechanism to do this automatically. However, designing the required bits into your application may not be too difficult. It really depends on the the actual operating environment and how your application works.

    As always, the Ice manual is an excellent place to start for information on Ice. Without knowing more details about what you are doing, I cannot recommend a specific newsletter so I'll recommend going to our newsletter page, scanning the titles and picking what seems relevant.
  • Oh yeah, you are perfectly correct. Because i think the mobile devices can be voluntarily disconnected from the network, how to bring objects back to be consistency is an interesting topic to me for my research project at uni. I am on the stage of looking for those relevant solutions of this issue.Also i am looking for some interesting applications, and the application will be used for conceptually demonstrating my research outcomes so i havent decided yet (well , maybe a personal calender, to-do-list or diary by using Java and...what do you think? :p). I hope finally the application can be used in my cell phone which is a sony ericsson m608 smart phone. As a very experienced Software engineer, what do you think from my decription.

    Kind regards

    Jin
  • FWIW, this is an exceedingly tricky task to accomplish. If your clients need to work offline, then the only possible solution is to track changes on both the clients and the centralized server, and replicate those changes while connected. Replication winds up being a very difficult task to get right because you have to deal with conflict resolution, cancelled replications, changes to metadata, and on and on and on.

    I am in my fourth generation with an in-house product that does bidirectional replication of datasets, and I've been through dozens of architectures that attempt replication. My current iteration uses a trigger on each table to track and store insert, update, and delete DML statements, both on the client and the server. The trigger also stores a "system change number" and the current timestamp. Clients are each assigned a unique ID on first replication. Then replication itself consists of sending changes to the server for all SCN's greater than the last replication SCN, and retrieving changes from the server greater than the last replication SCN. These two tasks happen simultaneously since you don't want the changes to propogate back down that you just sent up. In addition to this, I store an integer field that uses individual bits to indicate which fields in the row have actually changed so that I only need to replicate fields that have changed.

    Ice will be perfectly content to send and receive the changes, but the majority of your task will be in getting the architecture absolutely correct before you write one line of code.