views:

391

answers:

2

if a mobile application needs to get data from multiple servers, is it better to call each server from the mobile device, or call one server which then talks to all the other servers?

"should synchronization be initiated by the server or the mobile client?" to what degree does client do the book keeping.

Say if the application is mobile email or voicemail client in both cases.

A: 

Very vague question, but I would say both could be necessary. Your servers should coordinate as much as they need to make sure the data stored between them stays consistent. A buggy or malicious client should not be able to cause corruption or inconsistencies in the data stored on the server. The client should do whatever synchronization it needs to make sure that the local copy of the data is consistent and that it is not uploading garbage to the servers.

sk
+3  A: 

Some of the main issues with mobile synchronization of personal information are the battery life of the handset and the temporary loss of connectivity.

That's why the usual way of doing what you describe is to have a server handle most of the complicated logic and multiple data sources to create the set of data to be synchronized and then have a proprietary protocol between the server and the client to mirror just that set of data.

In effect, connection to the server will always be initiated by the client, no matter how much people talk about "push" e-mail. Your client application can have a user option to make the phone stay online as much as the network conditions allow. The server can react to a connection being established by automatically sending the latest data it needs synchronized with the client.

QuickRecipesOnSymbianOS
push email isn't actually server inited anyway... it's a client poll using long lived http requests.e.g. http://en.wikipedia.org/wiki/Comet_(programming)
Shane Powell