Realtiming ajax?
am 26.06.2007 19:01:59 von deostroll
Suppose I have an asp page that has a response.write(something) in a
loop that would run for a considerable amount of time. Now, from my
client browser can I trap those server response messages (using ajax)
and print them on the browser?
(The thing is the asp page is still running over at the server...while
it is running I would want to monitor some variables that is part of
the program that is running over at the server)
--deostroll
Re: Realtiming ajax?
am 26.06.2007 20:58:40 von Jon Paal
To achieve what I think you are wanting , use response.flush to show interim values while the asp page is running.
"deostroll" wrote in message news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
> Suppose I have an asp page that has a response.write(something) in a
> loop that would run for a considerable amount of time. Now, from my
> client browser can I trap those server response messages (using ajax)
> and print them on the browser?
>
> (The thing is the asp page is still running over at the server...while
> it is running I would want to monitor some variables that is part of
> the program that is running over at the server)
>
> --deostroll
>
Re: Realtiming ajax?
am 27.06.2007 00:13:18 von Anthony Jones
"Jon Paal [MSMD]" wrote in message
news:1382oetmd5ubica@corp.supernews.com...
> To achieve what I think you are wanting , use response.flush to show
interim values while the asp page is running.
>
>
That'll send content to the client but the component on the client end needs
to be able to deliver that content via an event before the response is
complete.
The only component that can do that WinHTTP. I've never wired up it's
events in script to see if that can be done.
> "deostroll" wrote in message
news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
> > Suppose I have an asp page that has a response.write(something) in a
> > loop that would run for a considerable amount of time. Now, from my
> > client browser can I trap those server response messages (using ajax)
> > and print them on the browser?
> >
> > (The thing is the asp page is still running over at the server...while
> > it is running I would want to monitor some variables that is part of
> > the program that is running over at the server)
> >
> > --deostroll
> >
>
>
Re: Realtiming ajax?
am 27.06.2007 15:49:26 von Jon Paal
You can't check the progress of an ASP script from the client side.
"Anthony Jones" wrote in message news:OyrJ28DuHHA.484@TK2MSFTNGP06.phx.gbl...
>
> "Jon Paal [MSMD]" wrote in message
> news:1382oetmd5ubica@corp.supernews.com...
>> To achieve what I think you are wanting , use response.flush to show
> interim values while the asp page is running.
>>
>>
>
> That'll send content to the client but the component on the client end needs
> to be able to deliver that content via an event before the response is
> complete.
>
> The only component that can do that WinHTTP. I've never wired up it's
> events in script to see if that can be done.
>
>> "deostroll" wrote in message
> news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
>> > Suppose I have an asp page that has a response.write(something) in a
>> > loop that would run for a considerable amount of time. Now, from my
>> > client browser can I trap those server response messages (using ajax)
>> > and print them on the browser?
>> >
>> > (The thing is the asp page is still running over at the server...while
>> > it is running I would want to monitor some variables that is part of
>> > the program that is running over at the server)
>> >
>> > --deostroll
>> >
>>
>>
>
>
Re: Realtiming ajax?
am 27.06.2007 21:11:36 von bajopalabra
i think
you can use a session variable: session("progess")= 0
wich your "process.asp" can increase whenever you want
thus, you can retrieve it with ajax
invoking another page like "getprogress.asp"
"deostroll" escribió en el mensaje
news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
> Suppose I have an asp page that has a response.write(something) in a
> loop that would run for a considerable amount of time. Now, from my
> client browser can I trap those server response messages (using ajax)
> and print them on the browser?
>
> (The thing is the asp page is still running over at the server...while
> it is running I would want to monitor some variables that is part of
> the program that is running over at the server)
>
> --deostroll
>
Re: Realtiming ajax?
am 28.06.2007 10:00:09 von Anthony Jones
"keyser soze" wrote in message
news:Od5Qv0OuHHA.3588@TK2MSFTNGP06.phx.gbl...
> i think
> you can use a session variable: session("progess")= 0
> wich your "process.asp" can increase whenever you want
> thus, you can retrieve it with ajax
> invoking another page like "getprogress.asp"
>
You can't use the session object in this way since it is single threaded.
You can't have a long running thread updating the session object and have
another thread read it. The request to getprogress.asp will queue until the
long running thread has completed.
It may be possible to use the application object or a DB to do the same
thing though.
>
>
> "deostroll" escribió en el mensaje
> news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
> > Suppose I have an asp page that has a response.write(something) in a
> > loop that would run for a considerable amount of time. Now, from my
> > client browser can I trap those server response messages (using ajax)
> > and print them on the browser?
> >
> > (The thing is the asp page is still running over at the server...while
> > it is running I would want to monitor some variables that is part of
> > the program that is running over at the server)
> >
> > --deostroll
> >
>
>
Re: Realtiming ajax?
am 28.06.2007 10:01:21 von Anthony Jones
"Jon Paal [MSMD]" wrote in message
news:1384qn73f42p7fd@corp.supernews.com...
> You can't check the progress of an ASP script from the client side.
>
Not quite sure I understand you. Did you not suggest using Response.Flush
to send some content to the client before the ASP script is completed?
>
> "Anthony Jones" wrote in message
news:OyrJ28DuHHA.484@TK2MSFTNGP06.phx.gbl...
> >
> > "Jon Paal [MSMD]" wrote in
message
> > news:1382oetmd5ubica@corp.supernews.com...
> >> To achieve what I think you are wanting , use response.flush to show
> > interim values while the asp page is running.
> >>
> >>
> >
> > That'll send content to the client but the component on the client end
needs
> > to be able to deliver that content via an event before the response is
> > complete.
> >
> > The only component that can do that WinHTTP. I've never wired up it's
> > events in script to see if that can be done.
> >
> >> "deostroll" wrote in message
> > news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
> >> > Suppose I have an asp page that has a response.write(something) in a
> >> > loop that would run for a considerable amount of time. Now, from my
> >> > client browser can I trap those server response messages (using ajax)
> >> > and print them on the browser?
> >> >
> >> > (The thing is the asp page is still running over at the
server...while
> >> > it is running I would want to monitor some variables that is part of
> >> > the program that is running over at the server)
> >> >
> >> > --deostroll
> >> >
> >>
> >>
> >
> >
>
>
Re: Realtiming ajax?
am 28.06.2007 14:59:29 von bajopalabra
or writting/reading a file, i guess
named as [user_id].txt
(he will need to deal with the txt garbage, of course)
"Anthony Jones" escribió en el mensaje
news:O6CdapVuHHA.4572@TK2MSFTNGP02.phx.gbl...
>
> "keyser soze" wrote in message
> news:Od5Qv0OuHHA.3588@TK2MSFTNGP06.phx.gbl...
> > i think
> > you can use a session variable: session("progess")= 0
> > wich your "process.asp" can increase whenever you want
> > thus, you can retrieve it with ajax
> > invoking another page like "getprogress.asp"
> >
>
>
> You can't use the session object in this way since it is single threaded.
> You can't have a long running thread updating the session object and have
> another thread read it. The request to getprogress.asp will queue until
the
> long running thread has completed.
>
> It may be possible to use the application object or a DB to do the same
> thing though.
>
>
> >
> >
> > "deostroll" escribió en el mensaje
> > news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
> > > Suppose I have an asp page that has a response.write(something) in a
> > > loop that would run for a considerable amount of time. Now, from my
> > > client browser can I trap those server response messages (using ajax)
> > > and print them on the browser?
> > >
> > > (The thing is the asp page is still running over at the server...while
> > > it is running I would want to monitor some variables that is part of
> > > the program that is running over at the server)
> > >
> > > --deostroll
> > >
> >
> >
>
>
Re: Realtiming ajax?
am 28.06.2007 16:00:49 von Jon Paal
ASP can send info to the client but the client can't look back into the progress of the ASP in process
"Anthony Jones" wrote in message news:ueNSFqVuHHA.3796@TK2MSFTNGP02.phx.gbl...
>
> "Jon Paal [MSMD]" wrote in message
> news:1384qn73f42p7fd@corp.supernews.com...
>> You can't check the progress of an ASP script from the client side.
>>
>
> Not quite sure I understand you. Did you not suggest using Response.Flush
> to send some content to the client before the ASP script is completed?
>
>
>>
>> "Anthony Jones" wrote in message
> news:OyrJ28DuHHA.484@TK2MSFTNGP06.phx.gbl...
>> >
>> > "Jon Paal [MSMD]" wrote in
> message
>> > news:1382oetmd5ubica@corp.supernews.com...
>> >> To achieve what I think you are wanting , use response.flush to show
>> > interim values while the asp page is running.
>> >>
>> >>
>> >
>> > That'll send content to the client but the component on the client end
> needs
>> > to be able to deliver that content via an event before the response is
>> > complete.
>> >
>> > The only component that can do that WinHTTP. I've never wired up it's
>> > events in script to see if that can be done.
>> >
>> >> "deostroll" wrote in message
>> > news:1182877319.863709.128090@m37g2000prh.googlegroups.com.. .
>> >> > Suppose I have an asp page that has a response.write(something) in a
>> >> > loop that would run for a considerable amount of time. Now, from my
>> >> > client browser can I trap those server response messages (using ajax)
>> >> > and print them on the browser?
>> >> >
>> >> > (The thing is the asp page is still running over at the
> server...while
>> >> > it is running I would want to monitor some variables that is part of
>> >> > the program that is running over at the server)
>> >> >
>> >> > --deostroll
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Re: Realtiming ajax?
am 28.06.2007 21:44:04 von deostroll
Jon Paal said:
>You can't check the progress of an ASP script from the client side.
I have tried using response.flush, it does not work.
Technically my requirement does not deal with checking the progress of
the asp script. Rather I want to monitor some variables at runtime.
--deostroll
Re: Realtiming ajax?
am 28.06.2007 22:57:16 von Jon Paal
we can't help with statements of only "it does not work"
you'll have to post the code .....
"deostroll" wrote in message news:1183059844.269293.84740@i38g2000prf.googlegroups.com...
> Jon Paal said:
>
>>You can't check the progress of an ASP script from the client side.
>
> I have tried using response.flush, it does not work.
>
> Technically my requirement does not deal with checking the progress of
> the asp script. Rather I want to monitor some variables at runtime.
>
> --deostroll
>
Re: Realtiming ajax?
am 28.06.2007 23:42:30 von Anthony Jones
"deostroll" wrote in message
news:1183059844.269293.84740@i38g2000prf.googlegroups.com...
> Jon Paal said:
>
> >You can't check the progress of an ASP script from the client side.
>
> I have tried using response.flush, it does not work.
>
> Technically my requirement does not deal with checking the progress of
> the asp script. Rather I want to monitor some variables at runtime.
>
You need to turn off the standard ASP session management and turn off ASP
debugging before you can get ASP to process more than one request from the
same client.
Re: Realtiming ajax?
am 29.06.2007 14:48:57 von bajopalabra
wait,
please correct me if i don't got it:
are you saying that a page
with multiple ajax requests is not possible
to be processed in parallel,
with the standard session management ??
that is, i see that ajax is working on my page
but, behind the scenes, iis can process
only one request by session ???
all the work that i see ajax is doing
is not actually in paralell (with std session mgt) ??
"Anthony Jones" escribió en el mensaje
news:OZ1q70cuHHA.3816@TK2MSFTNGP05.phx.gbl...
>
> "deostroll" wrote in message
> news:1183059844.269293.84740@i38g2000prf.googlegroups.com...
> > Jon Paal said:
> >
> > >You can't check the progress of an ASP script from the client side.
> >
> > I have tried using response.flush, it does not work.
> >
> > Technically my requirement does not deal with checking the progress of
> > the asp script. Rather I want to monitor some variables at runtime.
> >
>
> You need to turn off the standard ASP session management and turn off ASP
> debugging before you can get ASP to process more than one request from the
> same client.
>
>
Re: Realtiming ajax?
am 29.06.2007 15:06:49 von Anthony Jones
"keyser soze" wrote in message
news:u18LVnkuHHA.3816@TK2MSFTNGP05.phx.gbl...
> wait,
> please correct me if i don't got it:
> are you saying that a page
> with multiple ajax requests is not possible
> to be processed in parallel,
> with the standard session management ??
Yep. For each script to run in parrellel each needs to be executed in
different threads. Since the session object is only single thread it can
not be shared by two threads at the same time. Even if one of the scripts
has no need of the session object the ASP processor has no way to know that.
It has to make one of the ASP scripts wait until the first is finished so
that it can move the session object off one thread and give it to the other.
>
> that is, i see that ajax is working on my page
> but, behind the scenes, iis can process
> only one request by session ???
ASP can only processs one request per session. Strictly speaking IIS
doesn't know what an ASP session is.
>
> all the work that i see ajax is doing
> is not actually in paralell (with std session mgt) ??
>
You've got it.
Note fetching other resources form IIS are unnaffected by this limitation.
You can have the download of two XML files in parrellel but that wouldn't
help with performance much. In fact in terms of perceived performance it
could do more harm than good.
Also note that by default IE only creates 2 outstanding connections to any
one server and FF allows 8.
Re: Realtiming ajax?
am 29.06.2007 16:14:55 von bajopalabra
it is the same on asp.net ?
"Anthony Jones" escribió en el mensaje
news:eUKWc5kuHHA.4764@TK2MSFTNGP05.phx.gbl...
>
> "keyser soze" wrote in message
> news:u18LVnkuHHA.3816@TK2MSFTNGP05.phx.gbl...
> > wait,
> > please correct me if i don't got it:
> > are you saying that a page
> > with multiple ajax requests is not possible
> > to be processed in parallel,
> > with the standard session management ??
>
> Yep. For each script to run in parrellel each needs to be executed in
> different threads. Since the session object is only single thread it can
> not be shared by two threads at the same time. Even if one of the scripts
> has no need of the session object the ASP processor has no way to know
that.
> It has to make one of the ASP scripts wait until the first is finished so
> that it can move the session object off one thread and give it to the
other.
>
> >
> > that is, i see that ajax is working on my page
> > but, behind the scenes, iis can process
> > only one request by session ???
>
> ASP can only processs one request per session. Strictly speaking IIS
> doesn't know what an ASP session is.
>
> >
> > all the work that i see ajax is doing
> > is not actually in paralell (with std session mgt) ??
> >
>
> You've got it.
>
> Note fetching other resources form IIS are unnaffected by this limitation.
> You can have the download of two XML files in parrellel but that wouldn't
> help with performance much. In fact in terms of perceived performance it
> could do more harm than good.
>
> Also note that by default IE only creates 2 outstanding connections to any
> one server and FF allows 8.
>
>
>
>
Re: Realtiming ajax?
am 29.06.2007 22:00:07 von Anthony Jones
"keyser soze" wrote in message
news:uv0cEYluHHA.4800@TK2MSFTNGP05.phx.gbl...
> it is the same on asp.net ?
>
I can't give you a definitive answer on that you perhaps need to as over in
microsoft.public.dotnet.framework.aspnet.
However since thread-safe session state containers aren't supported in
ASP.NET I suspect that ASP.NET has no choice but to serialise page access
per session
>
> "Anthony Jones" escribió en el mensaje
> news:eUKWc5kuHHA.4764@TK2MSFTNGP05.phx.gbl...
> >
> > "keyser soze" wrote in message
> > news:u18LVnkuHHA.3816@TK2MSFTNGP05.phx.gbl...
> > > wait,
> > > please correct me if i don't got it:
> > > are you saying that a page
> > > with multiple ajax requests is not possible
> > > to be processed in parallel,
> > > with the standard session management ??
> >
> > Yep. For each script to run in parrellel each needs to be executed in
> > different threads. Since the session object is only single thread it
can
> > not be shared by two threads at the same time. Even if one of the
scripts
> > has no need of the session object the ASP processor has no way to know
> that.
> > It has to make one of the ASP scripts wait until the first is finished
so
> > that it can move the session object off one thread and give it to the
> other.
> >
> > >
> > > that is, i see that ajax is working on my page
> > > but, behind the scenes, iis can process
> > > only one request by session ???
> >
> > ASP can only processs one request per session. Strictly speaking IIS
> > doesn't know what an ASP session is.
> >
> > >
> > > all the work that i see ajax is doing
> > > is not actually in paralell (with std session mgt) ??
> > >
> >
> > You've got it.
> >
> > Note fetching other resources form IIS are unnaffected by this
limitation.
> > You can have the download of two XML files in parrellel but that
wouldn't
> > help with performance much. In fact in terms of perceived performance
it
> > could do more harm than good.
> >
> > Also note that by default IE only creates 2 outstanding connections to
any
> > one server and FF allows 8.
> >
> >
> >
> >
>
>
Re: Realtiming ajax?
am 10.07.2007 22:01:32 von khakman
Check out these real-time ajax examples and the whitepaper that goes
with them...
http://ams.tibco.com
In these examples, multiple server-side data streams are multi-plexed
across a single persistent HTTP connection, then unpacked at the
client where they are published again to client-side ajax components.
The real-time data is served by a product from TIBCO called TIBCO Ajax
Message Service.
--Kevin Hakman (TIBCO).