473,651 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

High Performance Web Services with ADO.NET


Suppose I were designing a web service to accept many data transactions
per second and put them into a sql server database.

What design recommendations would you make ?
For examply, should I use the Context.Util transaction binding?

What about SOAPMethod in the WebMethod? Should I go with the default,
or add extra code here?

How about the SqlConnection ?

Should I establish a global SqlConnection in global.asax and use that
for all transactions?

Should I open and close a SqlConnection for each call of the web method?

If I am inserting all these records into a Sql table, is there a way to
pool them up somehow so there are not a million SqlConnections opening
and closing?

Is there a way to combine the INSERTS so that there are not a million
INSERT statements on the SQL server ?
--
incognito @ http://kentpsychedelic.blogspot.com
Nov 21 '05 #1
2 2033
> Should I open and close a SqlConnection for each call of the web method?

It is always a good idea to only keep the connection open for just the
minimal amount of time necessary. If you use a DataAdapter, it will take
care of opening and closing the connection for you.
If I am inserting all these records into a Sql table, is there a way to
pool them up somehow so there are not a million SqlConnections opening
and closing?
ADO .NET uses connection pooling by default so even when you are done with
your connection object, it will go back into the pool for reuse.

Is there a way to combine the INSERTS so that there are not a million
INSERT statements on the SQL server ?


Using the Disconnected paradigm of DataSets, you would make your changes to
the disconnected copy of the data and then do one update.
Nov 21 '05 #2
Scott M. wrote:
Should I open and close a SqlConnection for each call of the web method?


It is always a good idea to only keep the connection open for just the
minimal amount of time necessary. If you use a DataAdapter, it will take
care of opening and closing the connection for you.
If I am inserting all these records into a Sql table, is there a way to
pool them up somehow so there are not a million SqlConnections opening
and closing?


ADO .NET uses connection pooling by default so even when you are done with
your connection object, it will go back into the pool for reuse.

Is there a way to combine the INSERTS so that there are not a million
INSERT statements on the SQL server ?


Using the Disconnected paradigm of DataSets, you would make your changes
to the disconnected copy of the data and then do one update.


Maybe I wasn't clear.

This is a one way web service for a client to post data to on a per record
basis.

The only operation will be them, consuming the web service and sending data,
which will then be inserted into a sql table...

--
http://kentpsychedelic.blogspot.com
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1957
by: Shawn Brock | last post by:
This is a wildly broad question, so apologies in advance. I developed a very traditional app architecture in Visual Studio 5-6. The basic structure looked like this: GUI >> MTS >> Database The basic idea here was Users talk to the object, the object logs in to the database as itself and does some work. Perhaps I'm being overly dense, but I cannot seem to find a good writeup on the preferred way to implement this in .Net. Can someone...
0
2393
by: Jindrich Prchal | last post by:
Hi there. We are running DB2 v7.2 for Win NT on Windows 2000 SP3 machine with poor configuration AMD 1800+, 512MB RAM and usual IDE harddisk. During tests of migration our batch programmes written in Visual Age Generator by IBM from OS390 to Win2000 was this machine our test machine and migrated programmes ran quick enough there. Batch programmes are generated into C++ code from VaGen 3.1, compiled by MSVC++ and run on the machine with...
9
2807
by: bluedolphin | last post by:
Hello All: I have been brought onboard to help on a project that had some performance problems last year. I have taken some steps to address the issues in question, but a huge question mark remains. Last year, all of the tables and reports were stored in Access. The database was put online so that end users could access the reports online using Snapshot Viewer. The reports were aggregated on the fly, and the selection criteria...
14
2490
by: DraguVaso | last post by:
Hi, I'm new to WebServices, and I'm doing some tests (with a small VB.NET-application) to know the performance-difference between a WebService and the 'normal'-way of getting data (just connecting directly with a SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet back, and does exactly the same actions as the normal-Method does. The difference are enormous in my opinion: 1 record:
52
5776
by: frankgerlach | last post by:
>From my simple performance tests of SOAP it seems that it is about ten times slower than binary object request protocols such as RMI, IIOP or SimpleORB. Is this also YOUR experience ?
1
1976
by: sp_who2 | last post by:
i have high cpu problem. i don't know why many .net sqlclinet data provider and IIS hold so much cpu resource. by the way, memery condition is normal. when i restart sqlserver, from windows task manager, i see the cpu time of sqlserver.exe process is low, but it grows gradually, and in two days, it can grow to as high as 2:xx:xx. any one can tell me why .net sqlclinet data provider and IIS hold so much cpu resource? and why cpu time...
1
1797
by: Tommaso Caldarola | last post by:
I need to transfer big files (up to 10 Gb), now I'm using IIS via Remoting with chunk of bytes (up to 500Kb). In the following article: Middle-Tier Hosting: Enterprise Services, IIS, DCOM, Web Services, and Remoting By Rockford Lhotka http://www.15seconds.com/issue/040812.htm
6
1559
by: robin9876 | last post by:
In Microsoft Knowledgebase article 821268 (http:// support.microsoft.com/?id=821268 ) there are some configuration settings for .net v1.1 Are these the same in v2 or are their additional options? For an application which has a .Net v2 windows form application on client pc's and connects to .Net v2 web services. Which level (web server of client) would these changes need to be made at and in what config file?
1
1834
by: | last post by:
weve installed our asp.net 11. (32 bit) web app on windows 2002 64 bit server running under 32 bit emulation mode. should work ok, but were seeing cpu at 100%, but the server is a qaud dual core brand new server! old server running better. what to look for? thanks steph
0
991
by: Kiran | last post by:
All, I am currently in SOA based platform Services developement team. Could any one of you lead me into books on "Programming C++ (Design/Coding) for high performance systems." Many Thanks in advance, Regards, kiran
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.