Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Can't get request stream in increments - only after all sent from client

Reply
Thread Tools

Can't get request stream in increments - only after all sent from client

 
 
Steve Schuler
Guest
Posts: n/a
 
      07-14-2003
Hello all - I'm working an a SoapExtension to implement the SOAP with
Attachments protocol.



Here's a Google thread from the MS newsgroups from two years ago that frames
the design issue mentioned in the Subject:



http://groups.google.com/groups?hl=e...readm=caac10d6
..0109130806.269529df%40posting.google.com&rnum=2& prev=/groups%3Fq%3Dhttpinpu
tstream%2Bmicrosoft%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Dcaa
c10d6.0109130806.269529df%2540posting.google.com%2 6rnum%3D2



Basically, my goal is as follows... I'm basing my design on this MSDN
sample:
http://msdn.microsoft.com/msdnmag/is...s/default.aspx.
However, rather than rewrite the SOAP stream as this sample does, I wanted a
more scalable solution that could defer the processing of the attachment
portions of the stream until later, letting the WebMethod process almost
immediately. The attachments might be very large, and be streaming in over
a slow link, thus if I use the approach in the sample, I'll be tying up an
ASP.NET thread for an extended interval. Instead, I would ideally read only
enough of the stream to get the initial MIME portion (the SOAP envelope) on
the ASP.NET thread, and spawn a separate thread to read the attachments (of
course, this only helps if the WebMethod doesn't need to report on correct
receipt of the attachments, but many of the apps that would use my
SoapExtension are going to be OK with that caveat).



But experimentation shows that the ChainStream method of my SoapExtension is
not called until the input is completely received. I've contrived a client
test harness to demonstrate this - I split the request in two, and the
ChainStream method will not be called until after the very last byte has
been sent from the client.



This strikes me as a potential performance problem for a large class of
applications, not just my rather esoteric app... Does anyone know of
something I'm missing here to allow me to get the initial portion of the
incoming request immediately?

--
Steve Schuler
Application Consulting, ITOps
Safeco Insurance Companies
To reply with email, remove the "NOSPAM"


 
Reply With Quote
 
 
 
 
Sean Kelly
Guest
Posts: n/a
 
      08-12-2003
Hi Steve, I was researching a problem I'm having with
soapextensions and I came across your message. Sorry I
don't have an answer for yours. Maybe you can help me.
I'm debugging my extension and it enters the chainstream
method twice before it goes into process message. Then
when it re-enters chainstream before it goes into
afterserialize, it loses the stream???? I saw some other
guy having the same problem, but he had no luck getting
answer. Anyway...talk to ya soon. Thanks.


>-----Original Message-----
>Hello all - I'm working an a SoapExtension to implement

the SOAP with
>Attachments protocol.
>
>
>
>Here's a Google thread from the MS newsgroups from two

years ago that frames
>the design issue mentioned in the Subject:
>
>
>
>http://groups.google.com/groups?hl=e...=UTF-8&oe=UTF-

8&threadm=caac10d6
>..0109130806.269529df%

40posting.google.com&rnum=2&prev=/groups%3Fq%3Dhttpinpu
>tstream%2Bmicrosoft%26hl%3Den%26lr%3D%26ie%3DUT F-8%26oe%

3DUTF-8%26selm%3Dcaa
>c10d6.0109130806.269529df%2540posting.google.com% 26rnum%

3D2
>
>
>
>Basically, my goal is as follows... I'm basing my design

on this MSDN
>sample:
>http://msdn.microsoft.com/msdnmag/is...03/WebMethods/

default.aspx.
>However, rather than rewrite the SOAP stream as this

sample does, I wanted a
>more scalable solution that could defer the processing of

the attachment
>portions of the stream until later, letting the WebMethod

process almost
>immediately. The attachments might be very large, and be

streaming in over
>a slow link, thus if I use the approach in the sample,

I'll be tying up an
>ASP.NET thread for an extended interval. Instead, I

would ideally read only
>enough of the stream to get the initial MIME portion (the

SOAP envelope) on
>the ASP.NET thread, and spawn a separate thread to read

the attachments (of
>course, this only helps if the WebMethod doesn't need to

report on correct
>receipt of the attachments, but many of the apps that

would use my
>SoapExtension are going to be OK with that caveat).
>
>
>
>But experimentation shows that the ChainStream method of

my SoapExtension is
>not called until the input is completely received. I've

contrived a client
>test harness to demonstrate this - I split the request in

two, and the
>ChainStream method will not be called until after the

very last byte has
>been sent from the client.
>
>
>
>This strikes me as a potential performance problem for a

large class of
>applications, not just my rather esoteric app... Does

anyone know of
>something I'm missing here to allow me to get the initial

portion of the
>incoming request immediately?
>
>--
>Steve Schuler
>Application Consulting, ITOps
>Safeco Insurance Companies
>To reply with email, remove the "NOSPAM"
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the response sent to a client for every request Ilyas ASP .Net 2 11-12-2008 03:42 PM
Possible to control increments of font re-sizing? M HTML 6 07-27-2007 12:02 AM
Loop with float increments (frange)? forum@anton.e4ward.com Python 3 04-14-2006 03:34 PM
How does one write a function that increments a number? anonymousnerd@gmail.com Python 10 06-25-2005 11:06 PM
Rows: display a pattern that increments in each row Nicolla MacPherson C++ 4 08-13-2003 09:02 AM



Advertisments