Asynchronous Web Service

  • Thread starter Thread starter Scott M.
  • Start date Start date
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?
 
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
 
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?
 
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?
 
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?
 
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?
 
Back
Top