How much is Application Data

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

    How much is Application Data

    In a site that has about 4000 products, in 1000 categories, I thought that I
    can store each product and category details in its own application("va r"),
    instead of trips to the database.

    When someone will go to product.asp?id= 123, the page will show the
    application("pr oduct123") instead of getting the information from the
    database.

    If a change of pricing or availability occours, I will delete the
    application("pr oduct123"). The product.asp will check if it's empty. If it
    is, it will get the data from the database and show that, but the next time
    someone goes to that page, there is no need to connect to the database.

    I've used it many times for chunks of HTML (see
    http://www.learnasp.com/freebook/asp/speedappdata.aspx), but my question is,
    how much can I save in application data? Can I put 4000 of them?


  • Bob Barrows [MVP]

    #2
    Re: How much is Application Data

    Bruce wrote:
    In a site that has about 4000 products, in 1000 categories, I thought
    that I can store each product and category details in its own
    application("va r"), instead of trips to the database.
    >
    When someone will go to product.asp?id= 123, the page will show the
    application("pr oduct123") instead of getting the information from the
    database.
    >
    If a change of pricing or availability occours, I will delete the
    application("pr oduct123"). The product.asp will check if it's empty.
    If it is, it will get the data from the database and show that, but
    the next time someone goes to that page, there is no need to connect
    to the database.
    I've used it many times for chunks of HTML (see
    http://www.learnasp.com/freebook/asp/speedappdata.aspx), but my
    question is, how much can I save in application data? Can I put 4000
    of them?
    It depends on the server hardware (amount of RAM) and the number of
    applications running on the server. This is the type of question that can
    only be answered by testing. For example, we have on idea how much memory is
    consumed by storing one of these productls, let alone 4000. If scalability
    is a concern, you should be striving to avoid page faults.

    The other concern is concurrency: I assume you have already realized the
    need to lock the application object while making changes to its contents.
    While the application is locked, no requests in the application can be
    served. Whether this is a concern or not depends on the frequency of price
    changes and can only be answered by testing.

    Is the call to the database so time-consuming that caching the data in
    application is necessary?
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Comment

    • Anthony Jones

      #3
      Re: How much is Application Data



      "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcomwrote in message
      news:OftlhwiHIH A.3400@TK2MSFTN GP03.phx.gbl...
      Bruce wrote:
      In a site that has about 4000 products, in 1000 categories, I thought
      that I can store each product and category details in its own
      application("va r"), instead of trips to the database.

      When someone will go to product.asp?id= 123, the page will show the
      application("pr oduct123") instead of getting the information from the
      database.

      If a change of pricing or availability occours, I will delete the
      application("pr oduct123"). The product.asp will check if it's empty.
      If it is, it will get the data from the database and show that, but
      the next time someone goes to that page, there is no need to connect
      to the database.
      I've used it many times for chunks of HTML (see
      http://www.learnasp.com/freebook/asp/speedappdata.aspx), but my
      question is, how much can I save in application data? Can I put 4000
      of them?
      >
      It depends on the server hardware (amount of RAM) and the number of
      applications running on the server. This is the type of question that can
      only be answered by testing. For example, we have on idea how much memory
      is
      consumed by storing one of these productls, let alone 4000. If scalability
      is a concern, you should be striving to avoid page faults.
      >
      The other concern is concurrency: I assume you have already realized the
      need to lock the application object while making changes to its contents.
      While the application is locked, no requests in the application can be
      served. Whether this is a concern or not depends on the frequency of price
      changes and can only be answered by testing.
      >
      Or just don't bother locking the application object. That'll be fine in
      this case.

      --
      Anthony Jones - MVP ASP/ASP.NET


      Comment

      • Bruce

        #4
        Re: How much is Application Data

        Thanks for the response.

        The site is hosted on a shared hosting (discount asp .net), where I don't
        hav control over testing and looking at the RAM etc. If every product is 3
        KB of information, is that 4000*3 ?

        How would I test if caching is faster than connecting to a database? (I want
        to test speed of page load, and scalability).

        I've stumbled upon http://www.webgecko.com/products/aspcache/, is anyone
        familiar with that? The page claims that it's much faster than storing in
        application data, but I can't use it on a shared hosting :( Is there
        something else similar?


        "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcomwrote in message
        news:OftlhwiHIH A.3400@TK2MSFTN GP03.phx.gbl...
        It depends on the server hardware (amount of RAM) and the number of
        applications running on the server. This is the type of question that can
        only be answered by testing. For example, we have on idea how much memory
        is consumed by storing one of these productls, let alone 4000. If
        scalability is a concern, you should be striving to avoid page faults.
        >
        The other concern is concurrency: I assume you have already realized the
        need to lock the application object while making changes to its contents.
        While the application is locked, no requests in the application can be
        served. Whether this is a concern or not depends on the frequency of price
        changes and can only be answered by testing.
        >
        Is the call to the database so time-consuming that caching the data in
        application is necessary?

        Comment

        • Anthony Jones

          #5
          Re: How much is Application Data

          "Bruce" <fake_dont_send @anything_.comw rote in message
          news:e%23AQu$LI IHA.4592@TK2MSF TNGP02.phx.gbl. ..
          Thanks for the response.
          >
          The site is hosted on a shared hosting (discount asp .net), where I don't
          hav control over testing and looking at the RAM etc. If every product is 3
          KB of information, is that 4000*3 ?
          >
          How would I test if caching is faster than connecting to a database? (I
          want
          to test speed of page load, and scalability).
          >
          I've stumbled upon http://www.webgecko.com/products/aspcache/, is anyone
          familiar with that? The page claims that it's much faster than storing in
          application data, but I can't use it on a shared hosting :( Is there
          something else similar?

          Yeah use ASP.NET and do things like Response caching.

          12MB of product data is peanuts.

          If your concerned about performance then its more important to consider what
          the hit rate will be and how much CPU your ASP code is going to consume.

          --
          Anthony Jones - MVP ASP/ASP.NET


          Comment

          • Mike Brind

            #6
            Re: How much is Application Data

            Another option is to use the FileSystem.Scri pting object to generate a
            static html version of each page, and show that. On each request. code can
            check for the presence of an html file, and if it exists, show it (include
            file, perhaps?), otherwise generate it from the database and show it. If
            you amend the details of any product, code will delete the associated html
            file.

            --
            Mike Brind

            "Bruce" <fake_dont_send @anything_.comw rote in message
            news:e%23AQu$LI IHA.4592@TK2MSF TNGP02.phx.gbl. ..
            Thanks for the response.
            >
            The site is hosted on a shared hosting (discount asp .net), where I don't
            hav control over testing and looking at the RAM etc. If every product is 3
            KB of information, is that 4000*3 ?
            >
            How would I test if caching is faster than connecting to a database? (I
            want to test speed of page load, and scalability).
            >
            I've stumbled upon http://www.webgecko.com/products/aspcache/, is anyone
            familiar with that? The page claims that it's much faster than storing in
            application data, but I can't use it on a shared hosting :( Is there
            something else similar?
            >
            >
            "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcomwrote in message
            news:OftlhwiHIH A.3400@TK2MSFTN GP03.phx.gbl...
            >
            >It depends on the server hardware (amount of RAM) and the number of
            >applications running on the server. This is the type of question that can
            >only be answered by testing. For example, we have on idea how much memory
            >is consumed by storing one of these productls, let alone 4000. If
            >scalability is a concern, you should be striving to avoid page faults.
            >>
            >The other concern is concurrency: I assume you have already realized the
            >need to lock the application object while making changes to its contents.
            >While the application is locked, no requests in the application can be
            >served. Whether this is a concern or not depends on the frequency of
            >price changes and can only be answered by testing.
            >>
            >Is the call to the database so time-consuming that caching the data in
            >application is necessary?
            >
            >

            Comment

            • Mike Brind

              #7
              Re: How much is Application Data

              Maybe not include files. You can't set their value dynamically. But
              Server.Transfer would work.


              "Mike Brind" <dummy@newsgrou ps.comwrote in message
              news:O4yKVJVIIH A.1316@TK2MSFTN GP02.phx.gbl...
              Another option is to use the FileSystem.Scri pting object to generate a
              static html version of each page, and show that. On each request. code
              can check for the presence of an html file, and if it exists, show it
              (include file, perhaps?), otherwise generate it from the database and show
              it. If you amend the details of any product, code will delete the
              associated html file.
              >
              --
              Mike Brind
              >
              "Bruce" <fake_dont_send @anything_.comw rote in message
              news:e%23AQu$LI IHA.4592@TK2MSF TNGP02.phx.gbl. ..
              >Thanks for the response.
              >>
              >The site is hosted on a shared hosting (discount asp .net), where I don't
              >hav control over testing and looking at the RAM etc. If every product is
              >3 KB of information, is that 4000*3 ?
              >>
              >How would I test if caching is faster than connecting to a database? (I
              >want to test speed of page load, and scalability).
              >>
              >I've stumbled upon http://www.webgecko.com/products/aspcache/, is anyone
              >familiar with that? The page claims that it's much faster than storing in
              >application data, but I can't use it on a shared hosting :( Is there
              >something else similar?
              >>
              >>
              >"Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcomwrote in message
              >news:OftlhwiHI HA.3400@TK2MSFT NGP03.phx.gbl.. .
              >>
              >>It depends on the server hardware (amount of RAM) and the number of
              >>application s running on the server. This is the type of question that
              >>can only be answered by testing. For example, we have on idea how much
              >>memory is consumed by storing one of these productls, let alone 4000. If
              >>scalability is a concern, you should be striving to avoid page faults.
              >>>
              >>The other concern is concurrency: I assume you have already realized the
              >>need to lock the application object while making changes to its
              >>contents. While the application is locked, no requests in the
              >>application can be served. Whether this is a concern or not depends on
              >>the frequency of price changes and can only be answered by testing.
              >>>
              >>Is the call to the database so time-consuming that caching the data in
              >>application is necessary?
              >>
              >>
              >
              >

              Comment

              • Mike Brind

                #8
                Re: How much is Application Data

                Me and my spineroosms. Of course that should have been
                Scripting.FileS ystemObject.


                "Mike Brind" <dummy@newsgrou ps.comwrote in message
                news:uuvbEOVIIH A.1324@TK2MSFTN GP06.phx.gbl...
                Maybe not include files. You can't set their value dynamically. But
                Server.Transfer would work.
                >
                >
                "Mike Brind" <dummy@newsgrou ps.comwrote in message
                news:O4yKVJVIIH A.1316@TK2MSFTN GP02.phx.gbl...
                >Another option is to use the FileSystem.Scri pting object to generate a
                >static html version of each page, and show that. On each request. code
                >can check for the presence of an html file, and if it exists, show it
                >(include file, perhaps?), otherwise generate it from the database and
                >show it. If you amend the details of any product, code will delete the
                >associated html file.
                >>
                >--
                >Mike Brind
                >>
                >"Bruce" <fake_dont_send @anything_.comw rote in message
                >news:e%23AQu$L IIHA.4592@TK2MS FTNGP02.phx.gbl ...
                >>Thanks for the response.
                >>>
                >>The site is hosted on a shared hosting (discount asp .net), where I
                >>don't hav control over testing and looking at the RAM etc. If every
                >>product is 3 KB of information, is that 4000*3 ?
                >>>
                >>How would I test if caching is faster than connecting to a database? (I
                >>want to test speed of page load, and scalability).
                >>>
                >>I've stumbled upon http://www.webgecko.com/products/aspcache/, is anyone
                >>familiar with that? The page claims that it's much faster than storing
                >>in application data, but I can't use it on a shared hosting :( Is there
                >>something else similar?
                >>>
                >>>
                >>"Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcomwrote in message
                >>news:OftlhwiH IHA.3400@TK2MSF TNGP03.phx.gbl. ..
                >>>
                >>>It depends on the server hardware (amount of RAM) and the number of
                >>>applicatio ns running on the server. This is the type of question that
                >>>can only be answered by testing. For example, we have on idea how much
                >>>memory is consumed by storing one of these productls, let alone 4000.
                >>>If scalability is a concern, you should be striving to avoid page
                >>>faults.
                >>>>
                >>>The other concern is concurrency: I assume you have already realized
                >>>the need to lock the application object while making changes to its
                >>>contents. While the application is locked, no requests in the
                >>>applicatio n can be served. Whether this is a concern or not depends on
                >>>the frequency of price changes and can only be answered by testing.
                >>>>
                >>>Is the call to the database so time-consuming that caching the data in
                >>>applicatio n is necessary?
                >>>
                >>>
                >>
                >>
                >
                >

                Comment

                Working...