none
Architecture Layout RRS feed

  • Question

  • This is the scenario:
    - I have a real-time application that executes commands at scheduled times, such as sending tcp strings or trasmitting on serial port, max allowed delay is 20 msec from the sched. time
    - Schedules are stored into a sql server database that is queried and cached when the app knows that there is enough time to do it
    - The app has no user interface and I plan to install it as a windows service

    Those are the approaches I've considered to  implement a  configuration & monitoring UI
    a) All configuration/status data is stored into sqlserver and I use an IIS web service to modify it
    b) All configuration/status data is stored into sqlserver and I use IIS with asp/asp.net page
    c) All configuration/status is stored into the app itself and I use an internal web service
    d) All configuration/status is stored into the app itself and I use .net remoting or TCP to access it
    e) Use WCF, don't know much about it, I have to investigate it

    I'd like to have your opinions on a copuple of things

    Q1
    I'd like more the IIS approach, but since I'm not an Web-Guru, I don't know how much IIS may impact on my machine performances, both by consuming CPU time and memory resources. Any thought ? How much intensive is the process of compiling an asp.net page ?

    Q2
    Pros and Cons you see on the proposed solutions or maybe another smarter approach or technology to look at.

    TIA

    _________________________________
    « www.carlop.com × carlop-dev.blogspot.com »
    Thursday, November 22, 2007 10:40 AM

Answers

  • Hi,

     

      In this case an having your information about the scenario i'll comment you approaches:

     

    a) This approach is interesting and I think the use of the SQL Server in order to store the data is the best way, the problem is that with the use of XML Web Service on the IIS this can cause problems with your application performance because the HTTP protocol is slower then the TCP and so this can be a problem, and another thing is that the XML Web Services are interesting but WCF is clearly more powerfull and raises your options in terms of usage.

     

    b) This is a case when i think the SQL Server is the right answer, but clearly the ASP.NET page is not, because if this solutions is to monitor i don't think the will be a user input of the data, but rather a call from the Page that the customer is using to a service that will store all the data, and another one that will tell the customer page how to act based on the configurations made.

     

    c) Store the data on the application itself is a problem because what if you want to make this a enterprise infrastructure that will monitor all the applications, what if your application crashes what will happen to your data? I don't think this is the right answer

     

    d) The same problems as in the previous option, and the use of the Remoting is normally not a simple process, but has really more performance that the previous option

     

    e) This is probably the best choise, I'll say that you should store your stored data on the SQL Server by using a WCF Service that will be called from your application pages and will store the data on to the database. The WCF is a good way because you can then expose all your needed endpoints being them TCP, HTTP, MEX, or whatever you want.

     

     

    As for your question 1, IIS really affects the machine performance and the CPU, it's normal because he's waiting and serving requestes. As for the ASP.NET page compiling process is not very intensive and it only happens once for each page because in the subsequent requests it will use the Output Chache to serve the requests faster. To explain the process a little better here is the steps made by the ASP.NET compiling process:

     

    1º Time the Application is runned

    1. Request from the Client

    2. Parses the ASP.NET Page - Checks all the HTML and the Server Tags used and converts it to something that the browser can understand

    3. Compiles the ASP.NET Page - Makes the Compilation of the .NET Code used on the Page in order to be served better and faster

    4. Output Cache - The result of the Parsing and the Compilation is stored here to serve the requests faster with code and HTML

    5. Response for the Client

     

    All the subsequent requests

    1. Request from the Client

    2. Output Cache - Gets the Response for the requested page from the cliente from the Output Cache

    3. Response to the Client

     

     

     

    Hope this helps you.
    Sunday, November 25, 2007 7:07 PM

All replies

  • Hi,

     

      In this case an having your information about the scenario i'll comment you approaches:

     

    a) This approach is interesting and I think the use of the SQL Server in order to store the data is the best way, the problem is that with the use of XML Web Service on the IIS this can cause problems with your application performance because the HTTP protocol is slower then the TCP and so this can be a problem, and another thing is that the XML Web Services are interesting but WCF is clearly more powerfull and raises your options in terms of usage.

     

    b) This is a case when i think the SQL Server is the right answer, but clearly the ASP.NET page is not, because if this solutions is to monitor i don't think the will be a user input of the data, but rather a call from the Page that the customer is using to a service that will store all the data, and another one that will tell the customer page how to act based on the configurations made.

     

    c) Store the data on the application itself is a problem because what if you want to make this a enterprise infrastructure that will monitor all the applications, what if your application crashes what will happen to your data? I don't think this is the right answer

     

    d) The same problems as in the previous option, and the use of the Remoting is normally not a simple process, but has really more performance that the previous option

     

    e) This is probably the best choise, I'll say that you should store your stored data on the SQL Server by using a WCF Service that will be called from your application pages and will store the data on to the database. The WCF is a good way because you can then expose all your needed endpoints being them TCP, HTTP, MEX, or whatever you want.

     

     

    As for your question 1, IIS really affects the machine performance and the CPU, it's normal because he's waiting and serving requestes. As for the ASP.NET page compiling process is not very intensive and it only happens once for each page because in the subsequent requests it will use the Output Chache to serve the requests faster. To explain the process a little better here is the steps made by the ASP.NET compiling process:

     

    1º Time the Application is runned

    1. Request from the Client

    2. Parses the ASP.NET Page - Checks all the HTML and the Server Tags used and converts it to something that the browser can understand

    3. Compiles the ASP.NET Page - Makes the Compilation of the .NET Code used on the Page in order to be served better and faster

    4. Output Cache - The result of the Parsing and the Compilation is stored here to serve the requests faster with code and HTML

    5. Response for the Client

     

    All the subsequent requests

    1. Request from the Client

    2. Output Cache - Gets the Response for the requested page from the cliente from the Output Cache

    3. Response to the Client

     

     

     

    Hope this helps you.
    Sunday, November 25, 2007 7:07 PM
  • Thanks very much for your comments.
    Monday, November 26, 2007 4:05 PM