Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How IIS manages reuests?

How IIS manages reuests?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netvisual-studiowindows-adminbusiness
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RoyRose78
    wrote on last edited by
    #1

    Hey guys, I'm writing an asp.net 3-tier application that uses data-source component, business-logic component and application component. The BL and the DS components are designed as singleton classes, so when clients request for data, they get the same BL object (and DS object) so IIS won't create multiply BLs/DS's objects. I want to know how the IIS manages the requests. if IIS will create a thread for each client there will be a race condition between those threads that want to run the same method. if so, I probably create the methods as "synchronized code region" which means that only one thread can enters a method at a time... do I need to get into it at all?... Thanks. Roy. p.s - I using visual studio.net 2003 and IIS 5.1

    B R 2 Replies Last reply
    0
    • R RoyRose78

      Hey guys, I'm writing an asp.net 3-tier application that uses data-source component, business-logic component and application component. The BL and the DS components are designed as singleton classes, so when clients request for data, they get the same BL object (and DS object) so IIS won't create multiply BLs/DS's objects. I want to know how the IIS manages the requests. if IIS will create a thread for each client there will be a race condition between those threads that want to run the same method. if so, I probably create the methods as "synchronized code region" which means that only one thread can enters a method at a time... do I need to get into it at all?... Thanks. Roy. p.s - I using visual studio.net 2003 and IIS 5.1

      B Offline
      B Offline
      BLOEDHOND
      wrote on last edited by
      #2

      Roy Dont have your answer but maybe this help. When using IIS and webservice then the IIS "fire" a new thread for each SOAP function call. :confused:

      R 1 Reply Last reply
      0
      • B BLOEDHOND

        Roy Dont have your answer but maybe this help. When using IIS and webservice then the IIS "fire" a new thread for each SOAP function call. :confused:

        R Offline
        R Offline
        RoyRose78
        wrote on last edited by
        #3

        Hey BLOEDHOND, Tanks for replying. This is a good thing but I don't use XML web service in my application.. Thank again.

        1 Reply Last reply
        0
        • R RoyRose78

          Hey guys, I'm writing an asp.net 3-tier application that uses data-source component, business-logic component and application component. The BL and the DS components are designed as singleton classes, so when clients request for data, they get the same BL object (and DS object) so IIS won't create multiply BLs/DS's objects. I want to know how the IIS manages the requests. if IIS will create a thread for each client there will be a race condition between those threads that want to run the same method. if so, I probably create the methods as "synchronized code region" which means that only one thread can enters a method at a time... do I need to get into it at all?... Thanks. Roy. p.s - I using visual studio.net 2003 and IIS 5.1

          R Offline
          R Offline
          RoyRose78
          wrote on last edited by
          #4

          the answer is very simple.. I just don't need to get into it :-D the IIS is smart enought to handle this problem. thank again all Roy.

          G 1 Reply Last reply
          0
          • R RoyRose78

            the answer is very simple.. I just don't need to get into it :-D the IIS is smart enought to handle this problem. thank again all Roy.

            G Offline
            G Offline
            g00fyman
            wrote on last edited by
            #5

            Hi there, Just stumbles across this post. I can't see how IIS is *smart enough* to do this as the accessor to get a Singleton is static, so everyone has a chance to get it at the same time as you mention, the race condition. Therefore each client will obtain the singleton and have it within their HttpContext of their Session, and be able to access the same singleton concurrently. Won't they ?? regards, g00fy

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups