473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Better way to call the web service ?

Hi Experts:

I have a web service which retrieves user profile from Active Directory and
a Database. Just wonder, which one is better way to use the web service if I
need to retrieve 100 users profile:

Choice-1: call the web service and retrieve all 100 users profile (with a
single thread);
Choice-2: start 100 thread, each thread retrieve one user profile.

What are your opinions on the Pros and Cons on the 2 methods above?

Thanks in advance !

Polaris

Nov 23 '05 #1
2 1425
"Polaris" <et*******@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi Experts:

I have a web service which retrieves user profile from Active Directory
and
a Database. Just wonder, which one is better way to use the web service if
I
need to retrieve 100 users profile:

Choice-1: call the web service and retrieve all 100 users profile (with a
single thread);
Choice-2: start 100 thread, each thread retrieve one user profile.

What are your opinions on the Pros and Cons on the 2 methods above?


Hi Polaris,
You should prefer the first method if you are calling web service. In
general when calling a web service use 'chunky' (that returns big chunk of
data) calls instead of 'chatty' ones. In the second method you will have a
great delay caused by round trips to the web service. Nevertheless be aware
that you should find the optimal size of returned data, for example a 100 MB
of xml response could choke on the Internet.

Best regards,
--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
Nov 23 '05 #2
Hi,

you could also consider (for performance, maintenance, layering) to
build a small NT-Service which does these 'retrievals of profiles' and
caches some. You're webservice will always use this service to do it's
requests and the service contact's AD and caches the results.

The NT-Service can now be made to accept "ranges", "entries", "dynamic
queries" etc etc.

Hope this helps,

Marvin Smit.

On Wed, 9 Nov 2005 03:16:46 +0200, "Martin Kulov"
<ku***@bezbokluk.abv.bg> wrote:
"Polaris" <et*******@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi Experts:

I have a web service which retrieves user profile from Active Directory
and
a Database. Just wonder, which one is better way to use the web service if
I
need to retrieve 100 users profile:

Choice-1: call the web service and retrieve all 100 users profile (with a
single thread);
Choice-2: start 100 thread, each thread retrieve one user profile.

What are your opinions on the Pros and Cons on the 2 methods above?


Hi Polaris,
You should prefer the first method if you are calling web service. In
general when calling a web service use 'chunky' (that returns big chunk of
data) calls instead of 'chatty' ones. In the second method you will have a
great delay caused by round trips to the web service. Nevertheless be aware
that you should find the optimal size of returned data, for example a 100 MB
of xml response could choke on the Internet.

Best regards,

Nov 23 '05 #3

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

Similar topics

3
by: Sai Kit Tong | last post by:
I posted for help on legacy code interface 2 days ago. Probably I didn't make it clear in my original mail. I got a couple of answers but none of them address my issues directly (See attached...
8
by: SDS | last post by:
VS 2005 / .NET 2.0.50727 (Sept. CTP) I've got a Windows Service application that I've pushed out to a few other workstations. There is an unhandled except occurring somewhere in the application...
3
by: Marshall | last post by:
Hello, I am wondering if it is possible to call a remote web service using ATLAS and if so, how. I have read several docs which show how to call a web service that is within the same project as...
0
by: Griff | last post by:
Overview When the first call to our Web Service causes an exception, the Web Service caches that user's credentials for its life time. Details We have a Web Service which uses Windows...
6
by: alho | last post by:
The web service is called by a program running on pocket pc. When to call the web service, the first call is still ok, but for the second or later calls, it will throw "403 Forbidden" WebException....
6
by: plork | last post by:
hi all i'm calling a web service method and can get it's results just fine however i want to grab the repsonse message from the call is anyone able to tell me how i do this? results =...
2
by: jojoba | last post by:
Hello to all! I have a fairly simple webservice running in asp.net ajax under c# (vs 2008). I built the service and it runs just dandy when i test it by itself in visual studio. However, to...
2
by: Nexstar | last post by:
What is the fastest way to access the database for performance point of view? Should a .Net application call a stored procedure directly or should a .Net application call a web service, or use WCF,...
2
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.