IntraWeb ISAPI Threads

First: this is a "duplicated" post. See 
embarcadero.public.delphi.thirdpartytools.intraweb.
But I get the hint to post this question in this newsgroup, too.


Hello,

is there any known issue with multithreading and IntraWeb ISAPI's?

I will explain my problem:

I have an hierarchy of data.
On the website I only show one level of this hierarchy.
If the user clicks one item I will read the next level of the clicked item
from database and display this new level.

Now I have added "multithreading".
If the user clicks one item I will read the next level and for every item of
this level I start a new thread which reads the next sublevel to memory.
If the user clicks one item the next level must not be read because it has
readed in thread in background and I can display the result without db
loading time.
The aim was to increase the speed of pageload.

My problem:
If one or more background threads are not finished while the page is
reloaded, the page will hang if I click the next item. The application hang
on Thread.WaitFor.
If I add a sleep(5000) to the end of my ItemClickEvent all threads finished
and everything works well.
If I add the same multithreading code to a normal Application everything
works well. (without sleep(5000))

Note I will use the following "hack" because of known issues with Delphi
TThread Object: http://edn.embarcadero.com/article/32756
So I couldt resolve some problems but not all.

Regards
Mathias Pannier


Additional informations:

Delphi 2007
IW 9.0.42
with or without ISAPIThreadPool.pas no difference

I will try to pseudo code

procedure IWButton1.Click;
begin
   WaitUntilAllThreadsHaveFinished; //During the first click everything is 
fine, because there are no threads startet; The 2and click -> app hangs **
    for i := 0 to UserSession.MyItemList.Count - 1 do
    begin
      IWGrid.AddRow(UserSession.MyItemList[i].Caption);
      UserSession.MyItemList[i].StartThreadReadingSubLevel; //starts the 
thread for reading the next level of the hierarchy from database to memory 
***
    end;
    //sleep(5000); // if I wait until all threads are finished everything is 
fine; if one of the thread is not ready yet the next click will crash the 
app.See first line of code.
end

** I use the synchronizer.wait method 
(http://edn.embarcadero.com/article/32756)

*** This data is not needed during this click. I will read this data in
background so the user clicks again the data is in memory and must not be
readed from db. The thread connects to a com server which connects to a
database; read the data; write the data back to memory (MyItemList.Childs)

I think all threads stop/die if the page is loaded and the content is
delivered from server (ISAPI on webserver) to the client (browser). There is
no more "running" code on the server?
0
Mathias
2/9/2012 7:24:01 AM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

0 Replies
437 Views

Similar Articles

[PageSpeed] 4

Reply:

Similar Artilces:

Intraweb XIV on Delphi 2010
Hi, i'm stucked in a problem since 3 days. Wa had a stand alone app in Delphi 2010, IW 10.0.0. She globally worked fine but we needed to upgrade for version 10.0.23 for using it as ISAPI. All the transition worked fine and the app was good on IIS in 10.0.23 demo version. So we bought on Atozed the licence, but we only received one for IW 14. (i asked for the IW 10 licence on monday but still waiting). No matter, we changed some lines in code as written on IW changelog, it works fine in Stand Alone but ISAPI not. I tried to create an empty project in ISAPI and same thing, the ...

Thread not threading
XP-P Moz 1.3 I have never been able to make the Thread icon really thread any messages. If I want them grouped together, the best I can do is sort by the Subject column. I have click and double clicked till my fingers dropped off on the little black "speech bubble" looking icon which denotes Threads, but absolutely nothing happens. What's the scoop with this? Thanks! Dorothy wrote: > XP-P Moz 1.3 > > I have never been able to make the Thread icon really thread any > messages. If I want them grouped together, the best I can do is sort by ...

Thread in thread...
I have a main thread that loops for a change in some datas, and then perform (within the same Execute) some operations... procedure MyThread.Execute; var _each:Integer; begin _each := 0; while not self.Terminated do begin if _each < MyDataCount then begin ...perform things on MyDatas[_each] _each := _each + 1; end else _...

Intraweb and threads
I am using Intraweb 11.0.60 with C++ Builder XE. I would like to know if there are some special settings or procedures to follow for treads programing in Intraweb? On 11/25/2013 9:52 AM, Arsene Mamert wrote: > I am using Intraweb 11.0.60 with C++ Builder XE. > I would like to know if there are some special settings or procedures to > follow for treads programing in Intraweb? Just the normal thread stuff in any Delphi app. -- "Programming is an art form that fights back" IntraWeb IRC and Web Chat: http://www.atozed.com/intraweb/Support/IRC.aspx ...

Delphi Webservice
Hello, I have created one webservice using indy TIdHTTPWebBrokerBridge and also created the client. Now I need to way to pass some file which will be reside on my server path to the client thorugh SOAP. The picture is as follows: 1) I have some fastreport files on the server 2) The client will show those report on the client side. There will be no fr3 files in the client side. Also I don't want to use FastReport Client/Server technology, as my client does not want this. 3) I don't want to save the fr3 files in the client side also. How to call this report from Client...

Thread in WebService
Somebody show me please Can we use thread in webservice? like using Monitor.Waite() method. Because I want to synchronized in webservice. ...

Delphi 2010 webservice consumer pass null strings to webservice [Edit]
Hello, I need to consume a webservice that is developed in java ( thas all that I know ). I have a HTTPRIO componente and have import the webservice file win the WSDL importer. Til here everything is allright but when I run the application all the parameters reach the webservice as null. I have made some webservice and consumers but I never have had problems ( I make the server and the client ) I test to do the same with prism and c++ bilder and it go allright, but I need it to do in delphi Thanks PD: Pleas be patient, my English is not good Edited by: Adrian Zussino on Sep 8, 2010 3...

Intraweb 12.1.24 and TimeOutResponse demo from version Intraweb XI in delphi XE2 Update 3
Hello I'm very new in Intraweb and until now everything look fine. I'm looking for dev. tools for new application and I’m now testing IW XII. IW demo XI TimeOutResponse I don't understood very well. What should happen here. After 1 min of idle time after I push button in my browser I should get a Timeout.html page, but this is not happened. Maybe I do something wrong or I don't understand demo. Please give me some hints or correction? Thanks, Simon simon krizaj wrote: > Hello > I'm very new in Intraweb and until now everything look fine. I'...

Intraweb and Delphi XE7
When I use the Intraweb components in a StandAlone Application in a new project Delphi XE7 the HTTP port change every time run the project. I want to try to uninstall Intraweb 14.0.0 from XE7 and I want to install your last version but when I execute your tool "Intraweb bundled removal tool" for uninstall Intraweb in XE7, I don't find the version XE7 for retrive IDE Hash String. Thank you > {quote:title=Registered User wrote:}{quote} > When I use the Intraweb components in a StandAlone Application in a new project Delphi XE7 the HTTP port change every time run the p...

Delphi Intraweb 2009
Is there a solution for the error "Cannot find submit component" error in new version of IntraWeb? > Is there a solution for the error "Cannot find submit component" error in new version of IntraWeb? See thread about version 10.0.6 -- Jackson Gomes IntraWeb Support > {quote:title=gary hopwood wrote:}{quote} > Is there a solution for the error "Cannot find submit component" error in new version of IntraWeb? did you find the solution, i have the same error message? >> Is there a solution for the error "Cannot find submit compon...

Intraweb with Delphi XE2
I installed trial Delphi XE2 with IntraWeb. After it worked fine 2-3 times, I always get an exception "Unknown browser type." when I try to launch any IntraWeb application in a browser. This happens for Firefox and IE. I don't have the problem with Chrome, but the IntraWeb EXE has a disabled Icon to launch Chrome. What could be the problem? Is this because it's in the trial edition? cu Christian On 9/6/2011 5:45 AM, Christian Kaufmann wrote: > After it worked fine 2-3 times, I always get an exception "Unknown > browser type." when I try to l...

Intraweb in Delphi 2009
Hi all. How can i do a Intraweb project in Delphi 9? Sergio Enrique Luna wrote: > Hi all. > > How can i do a Intraweb project in Delphi 9? http://www.drbob42.com/examine/examinA1.htm -- Steve Faleiro ...

Delphi Webservices Application
I am trying to run a webservice client on Windows XP that accesses a server on windows server 2003. I get the following error: "Receieved content of invalid Content-Type setting: text/html - SOAP expects text/xml" when I call a function on the server. I don't get this error if both the server and client are running under windows xp. I have compiled both the client and server on windows XP with Delphi 7. What could be the cause of the error? Pier Pier Nardin wrote: > I am trying to run a webservice client on Windows XP that accesses a > server on windows s...

Web resources about - IntraWeb ISAPI Threads - embarcadero.delphi.webservices

HTC Droid Incredible 4G surfaces on Verizon intraweb
Verizon's HTC Droid Incredible 4G may be closer to hiting the market. Android Central has posted an internal advisory letting its employees know ...

Nikki Gloudeman (@NikkiGloudeman) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Latest apps in Developer Tools and tmssoftware.com - CNET Australia
CNET CNET Australia CNET is available in the following editions: Asia Australia China France Germany Japan United Kingdom USA Home Phones Computers ...

SwissDelphiCenter.ch : English
All about Borland Delphi. Programming tips, downloads, forums, news, topsites, newsletter whats new ¦ programming tips ¦ indy articles ¦ intraweb ...

“Milltown Pride” Review
In the summer of 2009, a small flare-up occurred between Bob Jones University and the fundamentalist publishing house Sword of the Lord. The ...

From my position... On the way!
From my position... On the way!

Logical Reasonings - Most Strongly Supported
One nurse's 'helpful' advice leads to a solid conviction, the Phoenix Police Force take their fight on crime to a whole new level, and a Texas ...

Pregnant Carrie Underwood and Husband Mike Fisher Baby Divorce Feud; Discuss Marriage Meat Compromise ...
For months the intrawebs have been filled with rumors that Carrie Underwood and her professional hockey playing husband Mike Fisher are either ...

How To Write a Persuasive Blog Post
Persuasion is an art and a science. Teaching the art is hard but the science is rather simple. Today I want to share with you five key characteristics ...

Google Chimes In To Let Customers Know Their Nexus 7 Pre-Orders Are Indeed Shipping Out
The intrawebs have been buzzing all day with Nexus 7 news. Some retailers are selling them, then they’re not selling them; a few lucky people ...

Resources last updated: 1/17/2016 9:39:49 PM