list in memory

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

    list in memory


    For an asp.NET app. I have a list that I want to keep in memory.

    My choices are keeping the list in an asp.NET listbox control, session
    object, database, xml file.

    This list has values that need to be checked against the stack. If they're
    in the stack then they're in use, if not then I'm going to use or replace the
    values with new values I can use.

    What good consulting advice regarding this model and ways to keep a list in
    memory can anyone provide?

    Regards;

    Segue
  • tomb

    #2
    Re: list in memory

    segue wrote:
    [color=blue]
    >For an asp.NET app. I have a list that I want to keep in memory.
    >
    >My choices are keeping the list in an asp.NET listbox control, session
    >object, database, xml file.
    >
    >This list has values that need to be checked against the stack. If they're
    >in the stack then they're in use, if not then I'm going to use or replace the
    >values with new values I can use.
    >
    >What good consulting advice regarding this model and ways to keep a list in
    >memory can anyone provide?
    >
    >Regards;
    >
    >Segue
    >
    >[/color]
    Why not an array?

    Tom

    Comment

    • Dennis

      #3
      Re: list in memory

      Can't you store the array as a Session Variable object?
      --
      Dennis in Houston


      "segue" wrote:
      [color=blue]
      > OK. How would you store the array?
      >
      > "tomb" wrote:
      >[color=green]
      > > segue wrote:
      > >[color=darkred]
      > > >For an asp.NET app. I have a list that I want to keep in memory.
      > > >
      > > >My choices are keeping the list in an asp.NET listbox control, session
      > > >object, database, xml file.
      > > >
      > > >This list has values that need to be checked against the stack. If they're
      > > >in the stack then they're in use, if not then I'm going to use or replace the
      > > >values with new values I can use.
      > > >
      > > >What good consulting advice regarding this model and ways to keep a list in
      > > >memory can anyone provide?
      > > >
      > > >Regards;
      > > >
      > > >Segue
      > > >
      > > >[/color]
      > > Why not an array?
      > >
      > > Tom
      > >[/color][/color]

      Comment

      • segue

        #4
        Re: list in memory

        OK. How would you store the array?

        "tomb" wrote:
        [color=blue]
        > segue wrote:
        >[color=green]
        > >For an asp.NET app. I have a list that I want to keep in memory.
        > >
        > >My choices are keeping the list in an asp.NET listbox control, session
        > >object, database, xml file.
        > >
        > >This list has values that need to be checked against the stack. If they're
        > >in the stack then they're in use, if not then I'm going to use or replace the
        > >values with new values I can use.
        > >
        > >What good consulting advice regarding this model and ways to keep a list in
        > >memory can anyone provide?
        > >
        > >Regards;
        > >
        > >Segue
        > >
        > >[/color]
        > Why not an array?
        >
        > Tom
        >[/color]

        Comment

        • segue

          #5
          Re: list in memory

          Yes this may be OK. I have to do some tests is there any other
          way to keep an array in memory because as a session object
          it expires? This array is constantly getting updated.

          "Dennis" wrote:
          [color=blue]
          > Can't you store the array as a Session Variable object?
          > --
          > Dennis in Houston
          >
          >
          > "segue" wrote:
          >[color=green]
          > > OK. How would you store the array?
          > >
          > > "tomb" wrote:
          > >[color=darkred]
          > > > segue wrote:
          > > >
          > > > >For an asp.NET app. I have a list that I want to keep in memory.
          > > > >
          > > > >My choices are keeping the list in an asp.NET listbox control, session
          > > > >object, database, xml file.
          > > > >
          > > > >This list has values that need to be checked against the stack. If they're
          > > > >in the stack then they're in use, if not then I'm going to use or replace the
          > > > >values with new values I can use.
          > > > >
          > > > >What good consulting advice regarding this model and ways to keep a list in
          > > > >memory can anyone provide?
          > > > >
          > > > >Regards;
          > > > >
          > > > >Segue
          > > > >
          > > > >
          > > > Why not an array?
          > > >
          > > > Tom
          > > >[/color][/color][/color]

          Comment

          • m.posseth

            #6
            Re: list in memory

            yes you may store it in a singleton class

            you can easy create this with a module and access it from anny page ,,,
            however keep in mind that doing so will make it availlable to all clients so
            if the data is user specific ,, you should create a key value pair ( that is
            why i love the hashtable so much , cause it is also the fastest collection
            like object )

            regards

            Michel Posseth [MCP]

            "segue" <segue@discussi ons.microsoft.c om> schreef in bericht
            news:E1184153-FCD9-4C73-8CA3-0D9FBD78060C@mi crosoft.com...[color=blue]
            > Yes this may be OK. I have to do some tests is there any other
            > way to keep an array in memory because as a session object
            > it expires? This array is constantly getting updated.
            >
            > "Dennis" wrote:
            >[color=green]
            >> Can't you store the array as a Session Variable object?
            >> --
            >> Dennis in Houston
            >>
            >>
            >> "segue" wrote:
            >>[color=darkred]
            >> > OK. How would you store the array?
            >> >
            >> > "tomb" wrote:
            >> >
            >> > > segue wrote:
            >> > >
            >> > > >For an asp.NET app. I have a list that I want to keep in memory.
            >> > > >
            >> > > >My choices are keeping the list in an asp.NET listbox control,
            >> > > >session
            >> > > >object, database, xml file.
            >> > > >
            >> > > >This list has values that need to be checked against the stack. If
            >> > > >they're
            >> > > >in the stack then they're in use, if not then I'm going to use or
            >> > > >replace the
            >> > > >values with new values I can use.
            >> > > >
            >> > > >What good consulting advice regarding this model and ways to keep a
            >> > > >list in
            >> > > >memory can anyone provide?
            >> > > >
            >> > > >Regards;
            >> > > >
            >> > > >Segue
            >> > > >
            >> > > >
            >> > > Why not an array?
            >> > >
            >> > > Tom
            >> > >[/color][/color][/color]


            Comment

            • Dennis

              #7
              Re: list in memory

              What would you use for the Key? Possibly the Session ID?
              --
              Dennis in Houston


              "m.posseth" wrote:
              [color=blue]
              > yes you may store it in a singleton class
              >
              > you can easy create this with a module and access it from anny page ,,,
              > however keep in mind that doing so will make it availlable to all clients so
              > if the data is user specific ,, you should create a key value pair ( that is
              > why i love the hashtable so much , cause it is also the fastest collection
              > like object )
              >
              > regards
              >
              > Michel Posseth [MCP]
              >
              > "segue" <segue@discussi ons.microsoft.c om> schreef in bericht
              > news:E1184153-FCD9-4C73-8CA3-0D9FBD78060C@mi crosoft.com...[color=green]
              > > Yes this may be OK. I have to do some tests is there any other
              > > way to keep an array in memory because as a session object
              > > it expires? This array is constantly getting updated.
              > >
              > > "Dennis" wrote:
              > >[color=darkred]
              > >> Can't you store the array as a Session Variable object?
              > >> --
              > >> Dennis in Houston
              > >>
              > >>
              > >> "segue" wrote:
              > >>
              > >> > OK. How would you store the array?
              > >> >
              > >> > "tomb" wrote:
              > >> >
              > >> > > segue wrote:
              > >> > >
              > >> > > >For an asp.NET app. I have a list that I want to keep in memory.
              > >> > > >
              > >> > > >My choices are keeping the list in an asp.NET listbox control,
              > >> > > >session
              > >> > > >object, database, xml file.
              > >> > > >
              > >> > > >This list has values that need to be checked against the stack. If
              > >> > > >they're
              > >> > > >in the stack then they're in use, if not then I'm going to use or
              > >> > > >replace the
              > >> > > >values with new values I can use.
              > >> > > >
              > >> > > >What good consulting advice regarding this model and ways to keep a
              > >> > > >list in
              > >> > > >memory can anyone provide?
              > >> > > >
              > >> > > >Regards;
              > >> > > >
              > >> > > >Segue
              > >> > > >
              > >> > > >
              > >> > > Why not an array?
              > >> > >
              > >> > > Tom
              > >> > >[/color][/color]
              >
              >
              >[/color]

              Comment

              • segue

                #8
                Re: list in memory

                Hi,

                I think the singleton class is the answer I'm looking for thank you.

                I'm reading and trying to implement:



                So I'll let you know how it goes.

                Thanks;

                Segue

                "m.posseth" wrote:
                [color=blue]
                > yes you may store it in a singleton class
                >
                > you can easy create this with a module and access it from anny page ,,,
                > however keep in mind that doing so will make it availlable to all clients so
                > if the data is user specific ,, you should create a key value pair ( that is
                > why i love the hashtable so much , cause it is also the fastest collection
                > like object )
                >
                > regards
                >
                > Michel Posseth [MCP]
                >
                > "segue" <segue@discussi ons.microsoft.c om> schreef in bericht
                > news:E1184153-FCD9-4C73-8CA3-0D9FBD78060C@mi crosoft.com...[color=green]
                > > Yes this may be OK. I have to do some tests is there any other
                > > way to keep an array in memory because as a session object
                > > it expires? This array is constantly getting updated.
                > >
                > > "Dennis" wrote:
                > >[color=darkred]
                > >> Can't you store the array as a Session Variable object?
                > >> --
                > >> Dennis in Houston
                > >>
                > >>
                > >> "segue" wrote:
                > >>
                > >> > OK. How would you store the array?
                > >> >
                > >> > "tomb" wrote:
                > >> >
                > >> > > segue wrote:
                > >> > >
                > >> > > >For an asp.NET app. I have a list that I want to keep in memory.
                > >> > > >
                > >> > > >My choices are keeping the list in an asp.NET listbox control,
                > >> > > >session
                > >> > > >object, database, xml file.
                > >> > > >
                > >> > > >This list has values that need to be checked against the stack. If
                > >> > > >they're
                > >> > > >in the stack then they're in use, if not then I'm going to use or
                > >> > > >replace the
                > >> > > >values with new values I can use.
                > >> > > >
                > >> > > >What good consulting advice regarding this model and ways to keep a
                > >> > > >list in
                > >> > > >memory can anyone provide?
                > >> > > >
                > >> > > >Regards;
                > >> > > >
                > >> > > >Segue
                > >> > > >
                > >> > > >
                > >> > > Why not an array?
                > >> > >
                > >> > > Tom
                > >> > >[/color][/color]
                >
                >
                >[/color]

                Comment

                Working...