Asynchronous Web Service

S

Scott M.

Am I wrong, or is invoking a web method via a different thread and making an
XmlHttp request both different ways of making asynchronous web requests.

One just uses the Web Service architecture and one uses a proprietary (but
widely implemented) client object, right?
 
A

Alvin Bruney [ASP.NET MVP]

Yup. At a high level yes. However, for a closer look, you actually have a
main thread firing a child thread which queues work to a thread pool for the
first scenario. For the second, you have a main thread queuing work to a
thread pool. Subtle difference?!

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
 
S

Scott M.

Thanks.


Alvin Bruney said:
Yup. At a high level yes. However, for a closer look, you actually have a
main thread firing a child thread which queues work to a thread pool for
the first scenario. For the second, you have a main thread queuing work to
a thread pool. Subtle difference?!

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


Scott M. said:
Am I wrong, or is invoking a web method via a different thread and making
an XmlHttp request both different ways of making asynchronous web
requests.

One just uses the Web Service architecture and one uses a proprietary
(but widely implemented) client object, right?
 
S

Scott M.

So, really the XmlHttp object is really just an API for performing HTTP
Post/Get operations in new threads?


Alvin Bruney said:
Yup. At a high level yes. However, for a closer look, you actually have a
main thread firing a child thread which queues work to a thread pool for
the first scenario. For the second, you have a main thread queuing work to
a thread pool. Subtle difference?!

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


Scott M. said:
Am I wrong, or is invoking a web method via a different thread and making
an XmlHttp request both different ways of making asynchronous web
requests.

One just uses the Web Service architecture and one uses a proprietary
(but widely implemented) client object, right?
 
A

Alvin Bruney [ASP.NET MVP]

That is how I think of it, the browser couldn't do it cleanly and easily in
a way that would scale (now it can with tabbed browsing support). Recall
before AJAX.NET came about, Microsoft actually had webservice behaviours
(htc files) that used the xmlhttp objects to fire of out of band calls to
the service. All that got rebranded and polished to Ajax.net. But the basic
principle remained the same.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


Scott M. said:
So, really the XmlHttp object is really just an API for performing HTTP
Post/Get operations in new threads?


Alvin Bruney said:
Yup. At a high level yes. However, for a closer look, you actually have a
main thread firing a child thread which queues work to a thread pool for
the first scenario. For the second, you have a main thread queuing work
to a thread pool. Subtle difference?!

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


Scott M. said:
Am I wrong, or is invoking a web method via a different thread and
making an XmlHttp request both different ways of making asynchronous web
requests.

One just uses the Web Service architecture and one uses a proprietary
(but widely implemented) client object, right?
 
S

Scott M.

Thank you!


Alvin Bruney said:
That is how I think of it, the browser couldn't do it cleanly and easily
in a way that would scale (now it can with tabbed browsing support).
Recall before AJAX.NET came about, Microsoft actually had webservice
behaviours (htc files) that used the xmlhttp objects to fire of out of
band calls to the service. All that got rebranded and polished to
Ajax.net. But the basic principle remained the same.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


Scott M. said:
So, really the XmlHttp object is really just an API for performing HTTP
Post/Get operations in new threads?


Alvin Bruney said:
Yup. At a high level yes. However, for a closer look, you actually have
a main thread firing a child thread which queues work to a thread pool
for the first scenario. For the second, you have a main thread queuing
work to a thread pool. Subtle difference?!

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


Am I wrong, or is invoking a web method via a different thread and
making an XmlHttp request both different ways of making asynchronous
web requests.

One just uses the Web Service architecture and one uses a proprietary
(but widely implemented) client object, right?
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top