Web Tier - Concurrency problems
Hi
I need some help. I'm using RBServer 9.03 and I'm running the ASP Web
tier on a server. My problem is that if two users call the same report
but with different parameters at the same time, the result is the same
for both users although the result should be different according to the
parameters sent. If both users call their reports at differents times
it works ok.
Here is the way the WEB application call the report for each user.
user1:
http://myserver/rbWebPub/report.asp?content=pdf&volume=Reports&name=Report1&folder=v0d0&zoom=70&newsearch=T&asg0f0se=10&asg0f0sa=false
)
user2:
the same call but changing the parameter asg0f0se=10 for asg0f0se=569
running it at differents times it works ok but simoultaneously returns
the same report or result for both.
Any idea what I'm doing wrong.
Sorry about my english. Thanks
I need some help. I'm using RBServer 9.03 and I'm running the ASP Web
tier on a server. My problem is that if two users call the same report
but with different parameters at the same time, the result is the same
for both users although the result should be different according to the
parameters sent. If both users call their reports at differents times
it works ok.
Here is the way the WEB application call the report for each user.
user1:
http://myserver/rbWebPub/report.asp?content=pdf&volume=Reports&name=Report1&folder=v0d0&zoom=70&newsearch=T&asg0f0se=10&asg0f0sa=false
)
user2:
the same call but changing the parameter asg0f0se=10 for asg0f0se=569
running it at differents times it works ok but simoultaneously returns
the same report or result for both.
Any idea what I'm doing wrong.
Sorry about my english. Thanks
This discussion has been closed.
Comments
Have not heard of this before. If you examine the WebTier cache directory,
can you determine whether two separate sessions are being created? Each
session will have a unique SessionID (i.e. a GUID) that is a subdirectory
under the main webtier cache directory.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks for answering.
In the cache directory there is only one directory created. If I wait
until the first report appear and then I call the second one it works ok
and two directories are created but if I make the call simoultaneously
only one directory is created.
On the other hand, it is correct the way I'm making the call directly
from internet explorer as shown in the example sent?
Nard Moseley (Digital Metaphors) escribió:
I'm Still having the same problem. The server is a Windows 2003 Server.
I've tried to publish an ISAPI web tier in order to see if the problem
disappears but I couldn't make it work. I've followed exactly all the
steps mentioned in the developer's guide but the error http 404 in the
web browser is a constant. How can I publish ISAPI webtier.dll in
windows 2003 server? or How can I solve the ASP web tier concurrency
problem? in the same server?
Ignacio Alewaerts escribió:
This issue is being researched. I will post a follow up here.
For ISAPI, check what version of IIS you are using and then refer to the
applicable article..
rbWiki..How to Deploy WebTier to IIS6
http://www.digital-metaphors.com:/rbWiki/Server/Web_Tier/How_To...Deploy_to_IIS6
rbWiki...How to Deploy WebTier to IIS7
http://www.digital-metaphors.com/rbWiki/Server/Web_Tier/How_To...Deploy_to_IIS7
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
both with the same problem. Executing the same report with different
parameters but simoultaneously the webtier gives me back the same report
for both clients and with a short delay between both it works ok.
I wonder how can I ensure independent sessions.
Actually I'm calling the reprot in that way:
http://myServer/rbWebPub/report.asp?content=pdf&volume=Reports&name=myReport&folder=v0d0&zoom=70&newsearch=T&asg0f0se="myParameter"&asg0f0sa=false
where "myParameter" is what changes
the same with the ISAPI webtier.dll instead of report.asp.
Please I need a solution because I've no more time to solve it.
thanks
Nard Moseley (Digital Metaphors) escribió:
I could not duplicate your test results, however here is some info that I
hope will help.
I updated the WebTier ASP demo so that the ASP Com object creates/frees its
own FWebTierModule rather than sharing a singleton instance.
http://www.digital-metaphors.com/tips/rbWebTier_ASP.zip
Here is a client application that I created for testing. It is a Delphi app
that uses two TWebBrowser objects placed on a notebook. One button tests
ISAPI and another button tests ASP. I tested agains the main demo server.
http://www.digital-metaphors.com/tips/rbWebTierTestViaTWebBrowser.zip
Once you download and test using the updated ASP demo, you can modify teh
ProcessWebRequest method to generate a new session using the code below.
(The WebTier should be generating a new session automatically, this code
should not be necessary, but you can try it).
uses
rsWebSessionManager;
function TReports.ProcessWebRequest(var QueryString, ContentString:
OleVariant): OleVariant;
var
lParameters: TStringList;
lWebRequest: TrsWebRequest;
begin
lParameters := TStringList.Create;
try
TrsWebRequestParser.ParseContent(QueryString, lParameters);
TrsWebRequestParser.ParseContent(ContentString, lParameters);
{use the incoming request parameters to create a TrsWebRequest}
lWebRequest := FWebTierModule.WebTier.CreateWebRequest(lParameters, '');
if not FWebTierModule.WebTier.SessionExists(lWebRequest) then
gWebSessionManager.GetSessionForRequest(lWebRequest);
Result := FWebTierModule.WebTier.ProcessWebRequest(lWebRequest);
finally
lParameters.Free;
end;
end;
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Yesterday I found an example of code posted that seems to force the
generation of a Sesion ID. I supposed it should not be necessary
because it should work as in the original ISAPI example, but for my
surprise it worked!!. For any reason the web tier by it self did not
generate independant session, but adding this extra lines it worked ok.
Here is the lines added on the original webtier example. However I'll
try your example.
Thanks for answering so fast!
uses
WebReq,
rsWebRequest,
rsWebSessionManager;
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
lWebRequest: TrsWebRequest;
begin
// create a TrsWebRequest object
lWebRequest := rsWebTier1.CreateWebRequest(Request.QueryFields,
Request.Content);
// if the session does not exists, use the global WebSessionManager
to create one
if not rsWebTier1.SessionExists(lWebRequest) then
gWebSessionManager.GetSessionForRequest(lWebRequest);
// at this point we have a session id assigned
// lWebRequest.SessionID;
// process the web request
Response.Content := rsWebTier1.ProcessWebRequest(lWebRequest);
end;
initialization
if WebRequestHandler <> nil then
WebRequestHandler.WebModuleClass := TWebModule1;
Nard Moseley (Digital Metaphors) escribió:
Ok, great. Yes, the sample code you found is the same as the code I posted
here, except that I adapted it for the ASP demo.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com