Re: What is the optimum way to insert data into database every 10 seconds?
- From: "buran" <buran@xxxxxxxxx>
- Date: Fri, 12 Jun 2009 12:16:34 +0300
Thank you very much Rick.
I have only a Hyper-V Windows Web Server 2008 machine. So, your suggestion is appropirate for two machines solution, as far as I understand, right?
Burak
"Rick Sawtell" <r_sawtell@xxxxxxxxxxxxxxxxxx> wrote in message news:OgcETpp6JHA.1568@xxxxxxxxxxxxxxxxxxxxxxx
"buran" <buran@xxxxxxxxx> wrote in message news:eQgnoSp6JHA.1372@xxxxxxxxxxxxxxxxxxxxxxxHello,
I am working on a web application that is supposed to get data from a data source on the net and update the database on the server every 10 seconds 24/7. I had worked with ADO.NET years ago, and know a bit about the disconnected structure, but I'm not sure what technology and method to use for optimum performance. Any suggestions are welcome...
Burak
That is a pretty wide open set of requirements there.
If it were me, I would architect in a few more requirements like:
1. The gathering of the data from the web should not impact the insertion of the data into SQL Server
2. The insertion of data into SQL Server should not impact the gathering of data from the web.
That said, I would approach this application asynchronously rather than synchronously.
I would use .NET message queues and a couple of windows services.
WindowsService1 would get the data from wherever on the net and deposit that data into the .NET message queue. The advantage of .NET queues is that if you have machine that is hosting the message queue (that is separate from your windows service machine), the windows service machine gets it's own .NET queue as well. The synchronization between the service machine and the queue machine is handled for you and basically guarantees transactional integrity. That means if the queue machine is down, you can still gather your data from the net and deposit it to your local message queue. When the queue machine is back online, everything sync's back up.
The second Windows Service would read the queue and insert/update the database appropriately. Using this approach, if the database is down for a while, but your Service1 is running, then when the db is back online, it can catch back up without missing anything.
As for the database structure, it depends on the nature of the data you are gathering, that said, in general, a 3NF structure would probably work best and be the most efficient.
Just my $0.02
Rick Sawtell
MCT, MCSD, MCDBA, MCITPro
.
- Follow-Ups:
- Re: What is the optimum way to insert data into database every 10 seconds?
- From: Rick Sawtell
- Re: What is the optimum way to insert data into database every 10 seconds?
- References:
- Prev by Date: Re: Regarding case sensitivity of a database.
- Next by Date: stored procedure
- Previous by thread: Re: What is the optimum way to insert data into database every 10 seconds?
- Next by thread: Re: What is the optimum way to insert data into database every 10 seconds?
- Index(es):
Relevant Pages
|
Loading