Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Url re-write rules setting


I am using the following url rewrite rules to run this url: http://localhost/lan-api/bsmob_jobclock/........

The app is running correctly, BUT, I am seeing 2 oengines spin up and I though this setup maybe the issue.
I got this from here

<rule name="LAN Root API" stopProcessing="true"> <match url="^lan-api$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="lan-oecgiapi/oecgi4.exe" /> </rule> <rule name="LAN API" stopProcessing="true"> <match url="^lan-api([_0-9a-z-/]+)$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="lan-oecgiapi/oecgi4.exe/{R:1}" /> </rule>

I assume in your testing you are not seeing this issue.

Comments

  • I'm 99.9% certain this is not related to you seeing two engines spinning up. I suggest inspecting the logs to determine the nature of the HTTP request.
  • edited August 2022
    The HTTP logs only show 1 request. The oengine DOS desktop window shows 2 requests
  • edited August 2022
    If i run each api via postman only one engine spins up.
    The app, at the web developer requires 2 api 'methods'(sorry, forgot the proper term) to be called to service the final request.
    This is where he must be doing something strange, maybe not waiting for a response from the first request before sending the next.
    I have emailed (India) to explain and seeing if he can see what different from other app menu functions that this is not occurring with.

    Maybe, one of your experts can look at the log in the the previous post post and see if they can discover what is being done incorrectly.
  • I was suspecting this was due to the web app making multiple asynchronous calls. In fact, I had a draft response suggesting this, but I ran out of time to finish the post before needing to leave.

    BTW, the logs I'm referring to are the ones that the SRP HTTP Frameworks produces. The command line dump you provided is interesting, but filled with too much OECGI content to make it easy to parse. My patience only goes so far...;-)
  • >>web app making multiple asynchronous calls.
    So, they should be doing What!!! - synchronous I assume.

    >> My patience only goes so far...;-)
    Agree!!
  • So, they should be doing What!!! - synchronous I assume.

    That depends on the app. Asynchronous calls are a valid way to get multiple requests processed in parallel to improve performance. This is fine as long as these calls are independent of each other. If, however, one call requires another call to have completed first, then synchronous calls would be the right way to go.
  • Thank you. Yes synchronous calls would fit the bill. I will pass that on.
  • edited August 2022
    Web developer says he is not doing Asynchronous - call wait, then call 2nd one.
    We have all the html and JavaScript code.
    Are there any gotchas he needs to be aware of?

    attached is the code section that calls 2 API EndpointSegments

    /datelistSISJ
    /siteinstruction

    search is not used in this instance

    Can anyone see anything he is doing wrong that might cause this issue?
  • I'm not a javascript developer so I cannot comment on the attached code.
Sign In or Register to comment.