Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top