Frage

I have an application that uses cellphone data connection to communicate with a remote server over web services. However, due to the unreliability of the cell phone network the application doesn't work for as long as the cell network is down. So what I want to do is change the application to process orders directly on the device and upload the orders in the background (like a windows service) when internet is available.

Here's what I'm thinking:

2 Applications

App #1: Change the order taking application to connect to internet at application load to get all settings and save to a sdf DB. Once settings are saved locally the user can process orders and save to database.

App #2: Runs in the background constantly checking db (say every 3-5 mins) for orders and upload to remote server via WCF web service. Additionally after upload is completed updated settings are downloaded back to the device.

App #2 is what I need guidance on. On a desktop I could run a windows service however compact framework of windows mobiles doesn't appear to have a windows service type support.

Any advice?

War es hilfreich?

Lösung

Why run it as a separate app? In that case you'll have to do cross-process synchronization of data access to make sure that simultaneous access from both processes doesn't cause a problem. Why not create a background "service" thread inside the app itself to do data forwarding to the enterprise?

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top