Windows Service Functionality using IIS/Application Servers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nkunapa

    Windows Service Functionality using IIS/Application Servers

    Hi:
    I am looking for any ideas/comments/suggestions on how a Windows
    Service kind of functionality can be acheived from a web application
    which which will run under IIS or for that matter any application
    server say Tomcat. I have a Windows service which should run every half
    hour and call four different methods in a Web Service in serial mode.
    The methods will have to wait for the previous one to finish and if the
    previous one is a really long process (say 15 minutes) the subsequent
    method will not get invoked till the previous one gets finished. That
    leaves us to either implement a Windows Service for each method (which
    might be tough maintaining services as the number of methods increase)
    or a MultiThreaded application so that each method will run in Parallel
    in its own thread in the same service.

    But, what we are particularly looking for is " Do we really need a
    Windows Service to achieve this task?". Can it not be an application
    that will start and run along with an Application Server since ASP.Net
    has it own Timers Class and all of these scheduling activities can be
    achieved using that? I am looking for any tips/suggestions or even if
    this is possible at all?

    Thanks.

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Windows Service Functionality using IIS/Application Servers

    I don't understand where ASP.NET comes into this. You basically have a
    task that needs to run every 1/2 hour, right? Just write it as an EXE and
    then set it up as a scheduled task which runs every 1/2 hour, and that's it.

    Whether or not you make the calls to the four web services in serial or
    parallel is up to you.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "nkunapa" <nkunapareddy@u th.tmc.edu> wrote in message
    news:1137561349 .435094.30300@g 14g2000cwa.goog legroups.com...[color=blue]
    > Hi:
    > I am looking for any ideas/comments/suggestions on how a Windows
    > Service kind of functionality can be acheived from a web application
    > which which will run under IIS or for that matter any application
    > server say Tomcat. I have a Windows service which should run every half
    > hour and call four different methods in a Web Service in serial mode.
    > The methods will have to wait for the previous one to finish and if the
    > previous one is a really long process (say 15 minutes) the subsequent
    > method will not get invoked till the previous one gets finished. That
    > leaves us to either implement a Windows Service for each method (which
    > might be tough maintaining services as the number of methods increase)
    > or a MultiThreaded application so that each method will run in Parallel
    > in its own thread in the same service.
    >
    > But, what we are particularly looking for is " Do we really need a
    > Windows Service to achieve this task?". Can it not be an application
    > that will start and run along with an Application Server since ASP.Net
    > has it own Timers Class and all of these scheduling activities can be
    > achieved using that? I am looking for any tips/suggestions or even if
    > this is possible at all?
    >
    > Thanks.
    >[/color]


    Comment

    • nkunapa

      #3
      Re: Windows Service Functionality using IIS/Application Servers

      Thanks. I just gave ASP.net as an example. Well, I would say a
      scheduled task in also one of the options but it might only add
      additional code to keep track if the previous scheduled task has really
      completed as the task that is supposed the run at the next half hour
      cycle is supposed to run only if the previous task has completed. I am
      not if this functionality can be achieved by creating an EXE and
      setting it up as scheduled task unlike a windows service. I mean one of
      the four methods may be still running while three others might have
      completed. Then the second half hour cycle should only process the
      three that were completed in the first cycle.

      The basic question I am asking is "Is is possible to set up an
      application to attach itself to an Application Severs
      (IIS/Tomcat/...etc) and run as soon the application server starts?".

      Thanks.

      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: Windows Service Functionality using IIS/Application Servers

        Unless the server has a hook to allow this, no, it is not possible,
        there is not a general mechanism to allow you to do this.

        However, I don't see how this is related to you having a task running
        every half hour. I mean, if you set it up as a scheduled task, you dont
        need another service to tell you to start, the scheduled task service will
        just handle it.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "nkunapa" <nkunapareddy@u th.tmc.edu> wrote in message
        news:1137562674 .157735.297940@ g49g2000cwa.goo glegroups.com.. .[color=blue]
        > Thanks. I just gave ASP.net as an example. Well, I would say a
        > scheduled task in also one of the options but it might only add
        > additional code to keep track if the previous scheduled task has really
        > completed as the task that is supposed the run at the next half hour
        > cycle is supposed to run only if the previous task has completed. I am
        > not if this functionality can be achieved by creating an EXE and
        > setting it up as scheduled task unlike a windows service. I mean one of
        > the four methods may be still running while three others might have
        > completed. Then the second half hour cycle should only process the
        > three that were completed in the first cycle.
        >
        > The basic question I am asking is "Is is possible to set up an
        > application to attach itself to an Application Severs
        > (IIS/Tomcat/...etc) and run as soon the application server starts?".
        >
        > Thanks.
        >[/color]


        Comment

        Working...