Session State

Discussion in 'ASP General' started by Colin J Paterson, Nov 12, 2004.

  1. Is it possible to store session state for each separate user in a separate
    process? We have a COM component that we want to use that is not thread safe
    and has to be isolated. We would like to store this in a separate process
    for each user.

    Thanks for any help
    Colin J Paterson, Nov 12, 2004
    #1
    1. Advertising

  2. Colin J Paterson

    Guest Guest

    You are storing a binary object in session? This is not recommended and not
    scalable

    Jeff

    "Colin J Paterson" <> wrote in message
    news:#...
    > Is it possible to store session state for each separate user in a separate
    > process? We have a COM component that we want to use that is not thread

    safe
    > and has to be isolated. We would like to store this in a separate process
    > for each user.
    >
    > Thanks for any help
    >
    >
    Guest, Nov 12, 2004
    #2
    1. Advertising

  3. An Integer is a binary object. I think you mean that storing a COM object in
    Session is not recommended, right?

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Neither a follower
    nor a lender be.

    <> wrote in message
    news:...
    > You are storing a binary object in session? This is not recommended and

    not
    > scalable
    >
    > Jeff
    >
    > "Colin J Paterson" <> wrote in message
    > news:#...
    > > Is it possible to store session state for each separate user in a

    separate
    > > process? We have a COM component that we want to use that is not thread

    > safe
    > > and has to be isolated. We would like to store this in a separate

    process
    > > for each user.
    > >
    > > Thanks for any help
    > >
    > >

    >
    >
    Kevin Spencer, Nov 12, 2004
    #3
  4. Colin J Paterson

    Guest Guest

    I won't even answer that...I hate threads that discuss semantics..when the
    language used is sufficient to communicate the issue.

    An integer is NOT a binary object, it's a base object, in my mind. Of course
    I meant a COM or similiar object. Your post added no new information.

    Jeff


    "Kevin Spencer" <> wrote in message
    news:#...
    > An Integer is a binary object. I think you mean that storing a COM object

    in
    > Session is not recommended, right?
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Neither a follower
    > nor a lender be.
    >
    > <> wrote in message
    > news:...
    > > You are storing a binary object in session? This is not recommended and

    > not
    > > scalable
    > >
    > > Jeff
    > >
    > > "Colin J Paterson" <> wrote in message
    > > news:#...
    > > > Is it possible to store session state for each separate user in a

    > separate
    > > > process? We have a COM component that we want to use that is not

    thread
    > > safe
    > > > and has to be isolated. We would like to store this in a separate

    > process
    > > > for each user.
    > > >
    > > > Thanks for any help
    > > >
    > > >

    > >
    > >

    >
    >
    Guest, Nov 12, 2004
    #4
  5. > I won't even answer that...I hate threads that discuss semantics..when the
    > language used is sufficient to communicate the issue.


    That's not sematics, and I tried to be nice about it by giving you an out
    ("I think you mean..., right?"). It has nothing to do with a COM object
    being binary. It has everything to do with the threading model. I simply
    used an Integer as an example. In fact, almost everything you store in
    Session State is binary. When people point out my mistakes, I admit them, as
    hard as it is on my flesh to do so, in order to maintain my credibility.

    And BTW, you contradicted yourself by saying that you wouldn't answer that,
    and then answering that.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Neither a follower
    nor a lender be.

    <> wrote in message
    news:...
    > I won't even answer that...I hate threads that discuss semantics..when the
    > language used is sufficient to communicate the issue.
    >
    > An integer is NOT a binary object, it's a base object, in my mind. Of

    course
    > I meant a COM or similiar object. Your post added no new information.
    >
    > Jeff
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:#...
    > > An Integer is a binary object. I think you mean that storing a COM

    object
    > in
    > > Session is not recommended, right?
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > Neither a follower
    > > nor a lender be.
    > >
    > > <> wrote in message
    > > news:...
    > > > You are storing a binary object in session? This is not recommended

    and
    > > not
    > > > scalable
    > > >
    > > > Jeff
    > > >
    > > > "Colin J Paterson" <> wrote in message
    > > > news:#...
    > > > > Is it possible to store session state for each separate user in a

    > > separate
    > > > > process? We have a COM component that we want to use that is not

    > thread
    > > > safe
    > > > > and has to be isolated. We would like to store this in a separate

    > > process
    > > > > for each user.
    > > > >
    > > > > Thanks for any help
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Kevin Spencer, Nov 12, 2004
    #5
  6. "Kevin Spencer" <> wrote in message
    news:...
    >> When people point out my mistakes, I admit them, as

    > hard as it is on my flesh to do so, in order to maintain my credibility.


    Bravo Kevin! I like it when people point out my mistakes, personally,
    because it reminds me that there is still an infinite amount of stuff to
    learn. Learning is my favorite part of living.

    Ray at work
    Ray Costanzo [MVP], Nov 12, 2004
    #6
  7. Colin J Paterson

    Guest Guest

    No new information, again. Perhaps we should start a new thread? How does
    this help the OP?

    You are wasting my time. You obviously understood the intent of my original
    message, but chose to "one up".

    Why do I get sucked into this stuff?? :)

    Jeff

    "Kevin Spencer" <> wrote in message
    news:...
    > > I won't even answer that...I hate threads that discuss semantics..when

    the
    > > language used is sufficient to communicate the issue.

    >
    > That's not sematics, and I tried to be nice about it by giving you an out
    > ("I think you mean..., right?"). It has nothing to do with a COM object
    > being binary. It has everything to do with the threading model. I simply
    > used an Integer as an example. In fact, almost everything you store in
    > Session State is binary. When people point out my mistakes, I admit them,

    as
    > hard as it is on my flesh to do so, in order to maintain my credibility.
    >
    > And BTW, you contradicted yourself by saying that you wouldn't answer

    that,
    > and then answering that.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Neither a follower
    > nor a lender be.
    >
    > <> wrote in message
    > news:...
    > > I won't even answer that...I hate threads that discuss semantics..when

    the
    > > language used is sufficient to communicate the issue.
    > >
    > > An integer is NOT a binary object, it's a base object, in my mind. Of

    > course
    > > I meant a COM or similiar object. Your post added no new information.
    > >
    > > Jeff
    > >
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:#...
    > > > An Integer is a binary object. I think you mean that storing a COM

    > object
    > > in
    > > > Session is not recommended, right?
    > > >
    > > > --
    > > > HTH,
    > > > Kevin Spencer
    > > > .Net Developer
    > > > Microsoft MVP
    > > > Neither a follower
    > > > nor a lender be.
    > > >
    > > > <> wrote in message
    > > > news:...
    > > > > You are storing a binary object in session? This is not recommended

    > and
    > > > not
    > > > > scalable
    > > > >
    > > > > Jeff
    > > > >
    > > > > "Colin J Paterson" <> wrote in message
    > > > > news:#...
    > > > > > Is it possible to store session state for each separate user in a
    > > > separate
    > > > > > process? We have a COM component that we want to use that is not

    > > thread
    > > > > safe
    > > > > > and has to be isolated. We would like to store this in a separate
    > > > process
    > > > > > for each user.
    > > > > >
    > > > > > Thanks for any help
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Guest, Nov 12, 2004
    #7
  8. Colin J Paterson

    Jeff Dillon Guest

    Sure, when I'm wrong, I'll admit it right away. Except when I made myself
    perfectly clear and someone wants attention by arguing in semantics.

    You should not store binary objects in Session. Only base types like
    integers and strings.

    Jeff

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:u5Cqa$...
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > >> When people point out my mistakes, I admit them, as

    > > hard as it is on my flesh to do so, in order to maintain my credibility.

    >
    > Bravo Kevin! I like it when people point out my mistakes, personally,
    > because it reminds me that there is still an infinite amount of stuff to
    > learn. Learning is my favorite part of living.
    >
    > Ray at work
    >
    >
    Jeff Dillon, Nov 15, 2004
    #8
  9. Look

    Point 1) I don't care if it is scaleable, can I do it?
    Point 2) The rest of the thread is pointless.

    "Jeff Dillon" <> wrote in message
    news:...
    > Sure, when I'm wrong, I'll admit it right away. Except when I made myself
    > perfectly clear and someone wants attention by arguing in semantics.
    >
    > You should not store binary objects in Session. Only base types like
    > integers and strings.
    >
    > Jeff
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > message news:u5Cqa$...
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:...
    > > >> When people point out my mistakes, I admit them, as
    > > > hard as it is on my flesh to do so, in order to maintain my

    credibility.
    > >
    > > Bravo Kevin! I like it when people point out my mistakes, personally,
    > > because it reminds me that there is still an infinite amount of stuff to
    > > learn. Learning is my favorite part of living.
    > >
    > > Ray at work
    > >
    > >

    >
    >
    Colin J Paterson, Nov 15, 2004
    #9
  10. Colin J Paterson wrote:
    > Is it possible to store session state for each separate user in a
    > separate process? We have a COM component that we want to use that is
    > not thread safe and has to be isolated. We would like to store this
    > in a separate process for each user.
    >
    > Thanks for any help


    No, you cannot lock a thread to a session.

    --
    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"
    Bob Barrows [MVP], Nov 15, 2004
    #10
  11. Colin J Paterson

    Jeff Dillon Guest

    Yes, you can do it. You'll just be doing it wrong.

    Jeff

    "Colin J Paterson" <> wrote in message
    news:...
    > Look
    >
    > Point 1) I don't care if it is scaleable, can I do it?
    > Point 2) The rest of the thread is pointless.
    >
    > "Jeff Dillon" <> wrote in message
    > news:...
    > > Sure, when I'm wrong, I'll admit it right away. Except when I made

    myself
    > > perfectly clear and someone wants attention by arguing in semantics.
    > >
    > > You should not store binary objects in Session. Only base types like
    > > integers and strings.
    > >
    > > Jeff
    > >
    > > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > > message news:u5Cqa$...
    > > >
    > > > "Kevin Spencer" <> wrote in message
    > > > news:...
    > > > >> When people point out my mistakes, I admit them, as
    > > > > hard as it is on my flesh to do so, in order to maintain my

    > credibility.
    > > >
    > > > Bravo Kevin! I like it when people point out my mistakes, personally,
    > > > because it reminds me that there is still an infinite amount of stuff

    to
    > > > learn. Learning is my favorite part of living.
    > > >
    > > > Ray at work
    > > >
    > > >

    > >
    > >

    >
    >
    Jeff Dillon, Nov 15, 2004
    #11
  12. I think you're answering the wrong question. The primary question was " ...
    store this in a separate process
    for each user", which I do not believe is possible. It implies that session
    variables for each user are stored/run in different threads/processes
    specific to that user. This is just not the case.

    Bob Barrows


    Jeff Dillon wrote:
    > Yes, you can do it. You'll just be doing it wrong.
    >
    > Jeff
    >
    > "Colin J Paterson" <> wrote in message
    > news:...
    >> Look
    >>
    >> Point 1) I don't care if it is scaleable, can I do it?
    >> Point 2) The rest of the thread is pointless.
    >>
    >> "Jeff Dillon" <> wrote in message
    >> news:...
    >>> Sure, when I'm wrong, I'll admit it right away. Except when I made
    >>> myself perfectly clear and someone wants attention by arguing in
    >>> semantics.
    >>>
    >>> You should not store binary objects in Session. Only base types
    >>> like integers and strings.
    >>>
    >>> Jeff
    >>>
    >>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>
    >>> wrote in message news:u5Cqa$...
    >>>>
    >>>> "Kevin Spencer" <> wrote in message
    >>>> news:...
    >>>>>> When people point out my mistakes, I admit them, as
    >>>>> hard as it is on my flesh to do so, in order to maintain my
    >>>>> credibility.
    >>>>
    >>>> Bravo Kevin! I like it when people point out my mistakes,
    >>>> personally, because it reminds me that there is still an infinite
    >>>> amount of stuff to learn. Learning is my favorite part of living.
    >>>>
    >>>> Ray at work


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Nov 15, 2004
    #12
  13. The question is, can I store each COM object in a separate process, ignoring
    anything to do with what I should be doing. Can I do it?

    We are resigning ourselves to writing a PERL daemon that will do this now I
    think as IIS just won't allow us to.

    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > I think you're answering the wrong question. The primary question was "

    ....
    > store this in a separate process
    > for each user", which I do not believe is possible. It implies that

    session
    > variables for each user are stored/run in different threads/processes
    > specific to that user. This is just not the case.
    >
    > Bob Barrows
    >
    >
    > Jeff Dillon wrote:
    > > Yes, you can do it. You'll just be doing it wrong.
    > >
    > > Jeff
    > >
    > > "Colin J Paterson" <> wrote in message
    > > news:...
    > >> Look
    > >>
    > >> Point 1) I don't care if it is scaleable, can I do it?
    > >> Point 2) The rest of the thread is pointless.
    > >>
    > >> "Jeff Dillon" <> wrote in message
    > >> news:...
    > >>> Sure, when I'm wrong, I'll admit it right away. Except when I made
    > >>> myself perfectly clear and someone wants attention by arguing in
    > >>> semantics.
    > >>>
    > >>> You should not store binary objects in Session. Only base types
    > >>> like integers and strings.
    > >>>
    > >>> Jeff
    > >>>
    > >>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>
    > >>> wrote in message news:u5Cqa$...
    > >>>>
    > >>>> "Kevin Spencer" <> wrote in message
    > >>>> news:...
    > >>>>>> When people point out my mistakes, I admit them, as
    > >>>>> hard as it is on my flesh to do so, in order to maintain my
    > >>>>> credibility.
    > >>>>
    > >>>> Bravo Kevin! I like it when people point out my mistakes,
    > >>>> personally, because it reminds me that there is still an infinite
    > >>>> amount of stuff to learn. Learning is my favorite part of living.
    > >>>>
    > >>>> Ray at work

    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
    Colin J Paterson, Nov 16, 2004
    #13
  14. You may be able to, but i do not believe you could tie that process to a
    particular session or user.

    Bob Barrows
    Colin J Paterson wrote:
    > The question is, can I store each COM object in a separate process,
    > ignoring anything to do with what I should be doing. Can I do it?
    >
    > We are resigning ourselves to writing a PERL daemon that will do this
    > now I think as IIS just won't allow us to.
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:...
    >> I think you're answering the wrong question. The primary question
    >> was " ... store this in a separate process
    >> for each user", which I do not believe is possible. It implies that
    >> session variables for each user are stored/run in different
    >> threads/processes specific to that user. This is just not the case.
    >>
    >> Bob Barrows
    >>
    >>
    >> Jeff Dillon wrote:
    >>> Yes, you can do it. You'll just be doing it wrong.
    >>>
    >>> Jeff
    >>>
    >>> "Colin J Paterson" <> wrote in message
    >>> news:...
    >>>> Look
    >>>>
    >>>> Point 1) I don't care if it is scaleable, can I do it?
    >>>> Point 2) The rest of the thread is pointless.
    >>>>
    >>>> "Jeff Dillon" <> wrote in message
    >>>> news:...
    >>>>> Sure, when I'm wrong, I'll admit it right away. Except when I made
    >>>>> myself perfectly clear and someone wants attention by arguing in
    >>>>> semantics.
    >>>>>
    >>>>> You should not store binary objects in Session. Only base types
    >>>>> like integers and strings.
    >>>>>
    >>>>> Jeff
    >>>>>
    >>>>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>
    >>>>> wrote in message news:u5Cqa$...
    >>>>>>
    >>>>>> "Kevin Spencer" <> wrote in message
    >>>>>> news:...
    >>>>>>>> When people point out my mistakes, I admit them, as
    >>>>>>> hard as it is on my flesh to do so, in order to maintain my
    >>>>>>> credibility.
    >>>>>>
    >>>>>> Bravo Kevin! I like it when people point out my mistakes,
    >>>>>> personally, because it reminds me that there is still an infinite
    >>>>>> amount of stuff to learn. Learning is my favorite part of
    >>>>>> living.
    >>>>>>
    >>>>>> Ray at work

    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Nov 16, 2004
    #14
  15. Colin J Paterson wrote:
    > The question is, can I store each COM object in a separate process, ignoring
    > anything to do with what I should be doing. Can I do it?
    >
    > We are resigning ourselves to writing a PERL daemon that will do this now I
    > think as IIS just won't allow us to.


    I am assuming that you are running some ASP pages and that they will
    communicate (pass data to/from) the appropriate "COM object in a
    separate process" using some form of Inter-Process Communication(IPC).

    Assuming the above is correct, then you can communicate with a
    particular process (one representing a particular user) using TCP/IP
    sockets, named pipes, DDE or file/stream I/O (there are other methods,
    e.g., shared-memory configurations, but I haven't used them under Windows).

    Easy way: assign unique port numbers (e.g., 127.0.0.1:8080,
    127.0.0.1:8081, 127.0.0.1:8082, etc.) to each user and, on system
    startup, start a separate resident TCP/IP (or easier, HTTP listener
    process for each user. When a listener receives a request it
    authenticates the request, processes it using the COM component and
    returns a result. If the listener doesn't respond within an appropriate
    time, a timeout should occur and appropriate action taken. The ASP page
    could use the ServerXMLHTTP object to send a request to the appropriate
    listener and fetch the response.

    As an aside, note that what you describe is a "Web Service" (roughly, a
    function call performed over a network) so under some circumstances you
    _might_ want to look at the tools (e.g., Visual Studio, Perl SOAP
    http://search.cpan.org/search?query=SOAP&mode=all ) you have available
    for turning your component into a formal Web Service (although I don't
    recommend that initially since it may introduce some unwelcome and
    unnecessary complexity).

    Good Luck,
    Michael D. Kersey
    Michael D. Kersey, Nov 16, 2004
    #15
  16. What we are writing is a Web Service but it still has the same problems as
    it is hosted under IIS. The method you describe is similar to the one we
    have used in the past but it is a pain in the ass and we thought we might
    revisit it under ASP.NET as the old system worked under old ASP (as a web
    application). We are going to use the named pipe solution under PERL it
    seems although I was hoping we could use .NET as it is much nicer
    technology.

    "Michael D. Kersey" <> wrote in message
    news:u6YhD1$...
    > Colin J Paterson wrote:
    > > The question is, can I store each COM object in a separate process,

    ignoring
    > > anything to do with what I should be doing. Can I do it?
    > >
    > > We are resigning ourselves to writing a PERL daemon that will do this

    now I
    > > think as IIS just won't allow us to.

    >
    > I am assuming that you are running some ASP pages and that they will
    > communicate (pass data to/from) the appropriate "COM object in a
    > separate process" using some form of Inter-Process Communication(IPC).
    >
    > Assuming the above is correct, then you can communicate with a
    > particular process (one representing a particular user) using TCP/IP
    > sockets, named pipes, DDE or file/stream I/O (there are other methods,
    > e.g., shared-memory configurations, but I haven't used them under

    Windows).
    >
    > Easy way: assign unique port numbers (e.g., 127.0.0.1:8080,
    > 127.0.0.1:8081, 127.0.0.1:8082, etc.) to each user and, on system
    > startup, start a separate resident TCP/IP (or easier, HTTP listener
    > process for each user. When a listener receives a request it
    > authenticates the request, processes it using the COM component and
    > returns a result. If the listener doesn't respond within an appropriate
    > time, a timeout should occur and appropriate action taken. The ASP page
    > could use the ServerXMLHTTP object to send a request to the appropriate
    > listener and fetch the response.
    >
    > As an aside, note that what you describe is a "Web Service" (roughly, a
    > function call performed over a network) so under some circumstances you
    > _might_ want to look at the tools (e.g., Visual Studio, Perl SOAP
    > http://search.cpan.org/search?query=SOAP&mode=all ) you have available
    > for turning your component into a formal Web Service (although I don't
    > recommend that initially since it may introduce some unwelcome and
    > unnecessary complexity).
    >
    > Good Luck,
    > Michael D. Kersey
    Colin J Paterson, Nov 18, 2004
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shamanthakamani
    Replies:
    1
    Views:
    3,473
    Natty Gur
    Nov 20, 2003
  2. Not Liking Dot Net Today
    Replies:
    0
    Views:
    593
    Not Liking Dot Net Today
    Apr 21, 2004
  3. Maciek
    Replies:
    0
    Views:
    8,226
    Maciek
    Sep 15, 2005
  4. jnickfl1
    Replies:
    0
    Views:
    571
    jnickfl1
    Sep 18, 2006
  5. Harry Haller
    Replies:
    0
    Views:
    1,639
    Harry Haller
    Nov 7, 2006
Loading...

Share This Page