views:

207

answers:

1

what technology can i use to manage unstable internet connection in a Server-Client App. i know mainly PHP (+Zend Framework), learning C# & ASP.NET MVC. i heard WCF/MSMQ is something that can help... but how ... is there something PHP (which i am more familiar) can do? but it is also good to know a .NET alternative if its better

the background:

client*s* will connect to server db to do CRUDs. but if the internet connection fails this will not be possible. so how do i fix this?

the solution used now was have localhost db's. at the end of the day, all clients will upload to server and morning download "consolidated" db from server. this is not foolproof as upload/download may still fail. and considering large amts of data transfered, it actually increases the chances.

UPDATE: is there a PHP/Zend Framework/MySQL replacement for MSMQ/WCF?

+1  A: 

WCF can help, because it supports various technologies for reliable message transfer.

One thing that might help you is to have the clients make their data changes locally, then upload those changes to a reliable message queue. You would not upload all changes in a single transaction. You might upload 10 at a time, possibly one at a time. As the uploaded messages are processed on the server, the server would write the transaction results to another queue, unique to each client. After the upload (or maybe at the same time), the client would check that queue to see what the result of each upload was. If the result was success, then the client can remove their local database. If the result was a failure, then the client should try uploading it again.

Of course, you should always be careful that your attempts at error recovery don't make things worse. Too much retry traffic on a bad link may very well cause more traffic, which may itself need recovery, etc.

And, of course, the ultimate solution is to move towards links that are more reliable. Not necessarily faster, but just more reliable.

John Saunders
thanks, for the xplaination for how i shld handle such things. abt moving reliable line is a good solution to me but seems like business ppl sometimes think otherwise...
iceangel89
Yes. "Been there, done that". Consider taking this opportunity to collect accurate statistics on network quality. Number of retries (and the time taken to retry) is a very interesting statistic for managers who wonder why things are so slow.
John Saunders
hmm... that said ... any recommendations on where to start? i am abit lost... reading msdn takes forever... and WCF is a big topic what will solve that issue? isit MSMQ?
iceangel89
Your solution will be in the area of MSMQ. I think that WCF would make that easier for you, but you'll have to invest some time in learning WCF. You might want to start in the WCF Developer Center at http://msdn.microsoft.com/wcf. You might want to try picking up one of the books that site will mention. Perhaps you'd find it easier to learn WCF if it were explained to you.
John Saunders