473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Session State

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
Jul 22 '05 #1
15 1706
You are storing a binary object in session? This is not recommended and not
scalable

Jeff

"Colin J Paterson" <me*******@memex.com> wrote in message
news:#o**************@TK2MSFTNGP10.phx.gbl...
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

Jul 22 '05 #2
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.

<je**@removeemergencyreporting.com> wrote in message
news:Ow*************@TK2MSFTNGP11.phx.gbl...
You are storing a binary object in session? This is not recommended and not scalable

Jeff

"Colin J Paterson" <me*******@memex.com> wrote in message
news:#o**************@TK2MSFTNGP10.phx.gbl...
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


Jul 22 '05 #3
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" <ks******@takempis.com> wrote in message
news:#s**************@TK2MSFTNGP10.phx.gbl...
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.

<je**@removeemergencyreporting.com> wrote in message
news:Ow*************@TK2MSFTNGP11.phx.gbl...
You are storing a binary object in session? This is not recommended and

not
scalable

Jeff

"Colin J Paterson" <me*******@memex.com> wrote in message
news:#o**************@TK2MSFTNGP10.phx.gbl...
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



Jul 22 '05 #4
> 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.

<je**@removeemergencyreporting.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl... 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" <ks******@takempis.com> wrote in message
news:#s**************@TK2MSFTNGP10.phx.gbl...
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.

<je**@removeemergencyreporting.com> wrote in message
news:Ow*************@TK2MSFTNGP11.phx.gbl...
You are storing a binary object in session? This is not recommended
and not
scalable

Jeff

"Colin J Paterson" <me*******@memex.com> wrote in message
news:#o**************@TK2MSFTNGP10.phx.gbl...
> 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
>
>



Jul 22 '05 #5

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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
Jul 22 '05 #6
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" <ks******@takempis.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.

<je**@removeemergencyreporting.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
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" <ks******@takempis.com> wrote in message
news:#s**************@TK2MSFTNGP10.phx.gbl...
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.

<je**@removeemergencyreporting.com> wrote in message
news:Ow*************@TK2MSFTNGP11.phx.gbl...
> You are storing a binary object in session? This is not recommended

and not
> scalable
>
> Jeff
>
> "Colin J Paterson" <me*******@memex.com> wrote in message
> news:#o**************@TK2MSFTNGP10.phx.gbl...
> > 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
> >
> >
>
>



Jul 22 '05 #7
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:u5**************@tk2msftngp13.phx.gbl...

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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

Jul 22 '05 #8
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" <je**@removeemergencyreporting.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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:u5**************@tk2msftngp13.phx.gbl...

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
> 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


Jul 22 '05 #9
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"
Jul 22 '05 #10
Yes, you can do it. You'll just be doing it wrong.

Jeff

"Colin J Paterson" <me*******@memex.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
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" <je**@removeemergencyreporting.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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:u5**************@tk2msftngp13.phx.gbl...

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
>> 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



Jul 22 '05 #11
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" <me*******@memex.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
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" <je**@removeemergencyreporting.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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:u5**************@tk2msftngp13.phx.gbl...

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
>> 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.
Jul 22 '05 #12
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]" <re******@NOyahoo.SPAMcom> wrote in message
news:ep*************@TK2MSFTNGP11.phx.gbl...
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" <me*******@memex.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
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" <je**@removeemergencyreporting.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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:u5**************@tk2msftngp13.phx.gbl...
>
> "Kevin Spencer" <ks******@takempis.com> wrote in message
> news:eG**************@TK2MSFTNGP09.phx.gbl...
>>> 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.

Jul 22 '05 #13
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]" <re******@NOyahoo.SPAMcom> wrote in message
news:ep*************@TK2MSFTNGP11.phx.gbl...
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" <me*******@memex.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
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" <je**@removeemergencyreporting.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
> 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:u5**************@tk2msftngp13.phx.gbl...
>>
>> "Kevin Spencer" <ks******@takempis.com> wrote in message
>> news:eG**************@TK2MSFTNGP09.phx.gbl...
>>>> 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.
Jul 22 '05 #14
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
Jul 22 '05 #15
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" <md******@hal-pc.org> wrote in message
news:u6**************@TK2MSFTNGP12.phx.gbl...
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

Jul 22 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
3
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
5
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.