Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am wondering what you'll think the best option for this scenaro:

 

I have some software that needs access to the internet to send error reports and some other random stuff.

 

This software accesses a db (right now an access db) to get pricing info and availability (availability is updated upon item purchased) and the db does some other random stuff.

 

I really want this software to be able to use the internet connection to access an xml file on a websierver.. or an mysql server or ms sql server.. but my only problem is I am scared the internet might go down.. and if this happens, and no one can pull up pricing info and availability and there will be some pisses off people.

 

So I was just wondering what you'll do for something like this.. Do you'll cache the db once a day or something just incase something like this happens? or what.

 

I would just do something as simple as this:

If internet_connection = true then

use db at database.server.com

elseif internet_connection = false then

use db at C:\

end if

 

But, then all things would get out of sync if the internet connection goes down.. this is because I need to read and write to a db... so I would then need to be able to resync the db.. which this sounds way over my head (not sure if it is or not :/)

 

any ideas?

 

thanks! Lee

Posted

Do the users have a local server? If so, you could put a copy of the database there and use date/time stamps. Have a timer setup that wouldfire every so often to check if the Internet is available. If it available, use the date time stamps to update the newest information to the web database and update the pricelist. This would keep you from having multiple databases one on every users computer.

 

Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

Posted

well each client computer wouldn't have a lan to connect them. (they are going to be 50miles or more appart).

 

I was thinking about having a client side and server side sql server.. but I really don't want to have 2 db servers.. I was hoping there was some way of caching whole tables ina db server in vb.net so that if the client computer doesn't have access to the internet at the moment.. it still can query and get the info.. And the client computer could also update the cached db.. Also if the internet is ever discovered down.. there would be a timer that would fire every 5 minutes or whenever to try to connect to the db.. and if internet=true, update db with cached db info

 

thanks for the idea though :)

Posted

If you have a disconnected dataset in stored in memory, you can syncronize with the main db ever so often. However, what happens if you have a computer crash or power interruption? Whatever was in the dataset on that PC is now gone. So where will that leave your user if they have not syncronized in say 15-30 minutes and they for example had a huge order they took care of. That order is now gone. Dues to the fact that .net uses XML primarily when dealing with dbs, michael_hk's suggesting is actually a very good idea for when you can not sync up with the main db pver the internet. It is fast and efficient and if the pc crashes or anything, the file is right there on the pc so they can pick up right where they left off. :)

 

Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

Posted
If you have a disconnected dataset in stored in memory, you can syncronize with the main db ever so often. However, what happens if you have a computer crash or power interruption? Whatever was in the dataset on that PC is now gone. So where will that leave your user if they have not syncronized in say 15-30 minutes and they for example had a huge order they took care of. That order is now gone. Dues to the fact that .net uses XML primarily when dealing with dbs, michael_hk's suggesting is actually a very good idea for when you can not sync up with the main db pver the internet. It is fast and efficient and if the pc crashes or anything, the file is right there on the pc so they can pick up right where they left off. :)

 

Chester

Ahh I see now.. How hard it is syncronizing a xml file with a db?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...