473,385 Members | 1,470 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,385 software developers and data experts.

Realtiming ajax?

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

Jun 26 '07 #1
16 2012
To achieve what I think you are wanting , use response.flush to show interim values while the asp page is running.
"deostroll" <de*******@gmail.comwrote in message news:11**********************@m37g2000prh.googlegr oups.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

Jun 26 '07 #2

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@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" <de*******@gmail.comwrote in message
news:11**********************@m37g2000prh.googlegr oups.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


Jun 26 '07 #3
You can't check the progress of an ASP script from the client side.
"Anthony Jones" <An*@yadayadayada.comwrote in message news:Oy*************@TK2MSFTNGP06.phx.gbl...
>
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@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" <de*******@gmail.comwrote in message
news:11**********************@m37g2000prh.googlegr oups.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



Jun 27 '07 #4
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" <de*******@gmail.comescribió en el mensaje
news:11**********************@m37g2000prh.googlegr oups.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

Jun 27 '07 #5

"keyser soze" <ba*********@hotmail.comwrote in message
news:Od**************@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" <de*******@gmail.comescribió en el mensaje
news:11**********************@m37g2000prh.googlegr oups.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


Jun 28 '07 #6

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@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" <An*@yadayadayada.comwrote in message
news:Oy*************@TK2MSFTNGP06.phx.gbl...

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in
message
news:13*************@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" <de*******@gmail.comwrote in message
news:11**********************@m37g2000prh.googlegr oups.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




Jun 28 '07 #7
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" <An*@yadayadayada.comescribió en el mensaje
news:O6**************@TK2MSFTNGP02.phx.gbl...
>
"keyser soze" <ba*********@hotmail.comwrote in message
news:Od**************@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" <de*******@gmail.comescribió en el mensaje
news:11**********************@m37g2000prh.googlegr oups.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
>


Jun 28 '07 #8
ASP can send info to the client but the client can't look back into the progress of the ASP in process
"Anthony Jones" <An*@yadayadayada.comwrote in message news:ue**************@TK2MSFTNGP02.phx.gbl...
>
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@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" <An*@yadayadayada.comwrote in message
news:Oy*************@TK2MSFTNGP06.phx.gbl...
>
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in
message
news:13*************@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" <de*******@gmail.comwrote in message
news:11**********************@m37g2000prh.googlegr oups.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





Jun 28 '07 #9
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

Jun 28 '07 #10
we can't help with statements of only "it does not work"

you'll have to post the code .....
"deostroll" <de*******@gmail.comwrote in message news:11*********************@i38g2000prf.googlegro ups.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

Jun 28 '07 #11

"deostroll" <de*******@gmail.comwrote in message
news:11*********************@i38g2000prf.googlegro ups.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.
Jun 28 '07 #12
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" <An*@yadayadayada.comescribió en el mensaje
news:OZ**************@TK2MSFTNGP05.phx.gbl...
>
"deostroll" <de*******@gmail.comwrote in message
news:11*********************@i38g2000prf.googlegro ups.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.


Jun 29 '07 #13

"keyser soze" <ba*********@hotmail.comwrote in message
news:u1**************@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.


Jun 29 '07 #14
it is the same on asp.net ?
"Anthony Jones" <An*@yadayadayada.comescribió en el mensaje
news:eU**************@TK2MSFTNGP05.phx.gbl...
>
"keyser soze" <ba*********@hotmail.comwrote in message
news:u1**************@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.


Jun 29 '07 #15

"keyser soze" <ba*********@hotmail.comwrote in message
news:uv**************@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" <An*@yadayadayada.comescribió en el mensaje
news:eU**************@TK2MSFTNGP05.phx.gbl...

"keyser soze" <ba*********@hotmail.comwrote in message
news:u1**************@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.




Jun 29 '07 #16
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).

Jul 10 '07 #17

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

Similar topics

11
by: Yarco | last post by:
I want to use "Ajax" to create my web for hobby. But i don't know whether "Ajax" is mature... And what about with php? Someone have experience on it? ....
4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
0
by: melledge | last post by:
Ajax Developers' Day added to XTech 2006 agenda XTech 2006 - 17-19 May - Hotel Grand Krasnopolsky - Amsterdam, The Netherlands
0
by: melledge | last post by:
Ajax Developers' Day to Kick Off XTech 2006 Conference Industry experts offer insight into next generation of the Web ALEXANDRIA, VIRGINIA, USA - April 25, 2006 - In response to the rapidly...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
10
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
controlsPlease could some of you here post some of your live examples of AJAX (esp drag panels, collapsable panels, and popup menu.) (It's one thing to talk about how great something is, but it's...
2
by: soni2926 | last post by:
hi, does anyone know of any good books on ajax and asp.net, one that teaches ajax itself before jumping in atlas? I wanted to get an understanding of ajax and how to use it, most books i've seen...
1
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
11
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.