how to process data when internet connection broken?

S

sandra

Hi there

I want to delvelop a larger project and it should include some function as
follow:
1. Using SQL for the Center database
2. 1000 stores can retrive information from web server (web service)
3. When the internet connection broken, the store can still working with
their local data and save it on local manchine, until the internet
connection works, it can auto update the SQL database.

What I design is:
1. stores can retrive all information from web server (Web service) and save
it on local machine using XML
2. when stores run destop application, the application check the difference
between local XML data (load into DataSet) and SQL server data (load into
DataSet) and update the SQL server and local data with the difference.
3.When internet broken, the application will use local data and save it on
local machine.
4. When internet connection works, the application will check the difference
between local XML data and SQL server data and update both.

What I want to know is that my design is correct ?
if it is not correct, how can I design it?

The important things is when internet connection broken, the stores also can
works without SQL server Data.

Thanks in advance

Tony
 
G

Gerry O'Brien [MVP]

Before you go too far with designing something that might not work, take a
look at Message Queing. The whole purpose behind MQ is to hold transactions
in queue until a connection can be established.

By using ADO.NET, you will automatically have a local recordset in memory
when you connect to the DB and return the data. You canbe disconnected from
the datasource while you are working on this recordset. It is in XML format
already as well.
 
S

sandra

Hi Gerry O'Brien

Thanks for your information, I know that ADO.NET support discount to DB and
keep it in memory using DataSet, but my client don't want to keep recordset
in memory when internet disconnected and can't save it when they shut down
the cumputer.

So, looks that Microsoft Message Queing can solve this problem, am I right?

If so, I will have deep look about message queing, I am not family with MSMQ
very well, hope this can solve my problem.

Thanks

Tony
 
G

Gerry O'Brien [MVP]

That's the route I would take. Other options might be to open the
recordset, persist it to an XML file, then open the XML file locally as a
recordset and manipulate the data as required.

When a connection is available, you can then read the XML file again but
this time, upload the data to the database.

MSMQ may be the best choice for you though in your situation.

--
Gerry O'Brien
Visual Developer .NET MVP
 
T

tony

Hi Gerry

I also will have a look for the MSMQ and remoting function and see which way
is better for me.

Thanks
 
G

Gerry O'Brien [MVP]

I must admin, with down-turned head, I should have thought of this method as
well. I completely forgot about Web Services.

This article is a great starter but looks like you will have to locate other
samples for the completion of the project. It sounds like a very good
method to use.

--
Gerry O'Brien
Visual Developer .NET MVP
 
G

Gerry O'Brien [MVP]

Great! The Web Services method may be a better choice if you are not
familiar with MSMQ but either way will require some reading and learning.

You need to way the pros and cons of each as compared to your situation and
decide which is the better choice, not only from a programming standpoint
but from a performance and stability standpoint as well.

Have fun. ;-)

--
Gerry O'Brien
Visual Developer .NET MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top