Is there any way for one Session to remove and update objects in another
Session? I seriously doubt it, but thought I'd ask. Here's why: I have some
data that is unique per user (or per session - similar to "welcome back,
Jim" after Jim logs in) and consumed across multiple pages. This "per user"
data lives in a database, so toward improving runtime performance I want to
cache data supporting this and similar per user features. Because the data
changes per user, output caching the page is out (at least I don't want to
cache per Custom right now). So, I'm looking at storing this per-user data
in either the Cache object or in Session state.
I think Session state would normally be the obvious choice - however - one
more important consideration that throws a wrench into that conventional
wisdom is that I need to let administrators of this application modify this
"per user" data - perhaps while users are online... so if the data is stored
in session, then the user would not get the new data until they establish a
new session... so now storing this data in the Cache seems to make sense
because it's relatively easy for any session to remove/update data in the
Cache.
So, given the requirements as described (and my somewhat limited knowledge
of ASP.NET), am I correct to conclude that this data should go into the
Cache and not Session? Are there alternatives to Cache and Session that
would make sense for this scenario?
Thanks! 4 2755
Yes (won't matter anyway if you shield this implementation detail from your
app by using an intermediate class). That said the requirement of having
those data updated by an admin while users are offline is reather unusual.
Is it really impossible to have this handled properly (you shouldn't store
data in the cache when they are not needed, it shouldn't be updated
directly).
Patrice
--
"Guadala Harry" <GM**@NoSpam.co m> a écrit dans le message de
news:er******** ******@TK2MSFTN GP12.phx.gbl... Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have
some data that is unique per user (or per session - similar to "welcome back, Jim" after Jim logs in) and consumed across multiple pages. This "per
user" data lives in a database, so toward improving runtime performance I want
to cache data supporting this and similar per user features. Because the data changes per user, output caching the page is out (at least I don't want to cache per Custom right now). So, I'm looking at storing this per-user data in either the Cache object or in Session state.
I think Session state would normally be the obvious choice - however - one more important consideration that throws a wrench into that conventional wisdom is that I need to let administrators of this application modify
this "per user" data - perhaps while users are online... so if the data is
stored in session, then the user would not get the new data until they establish
a new session... so now storing this data in the Cache seems to make sense because it's relatively easy for any session to remove/update data in the Cache.
So, given the requirements as described (and my somewhat limited knowledge of ASP.NET), am I correct to conclude that this data should go into the Cache and not Session? Are there alternatives to Cache and Session that would make sense for this scenario?
Thanks!
Patrice,
Thanks for the response.
FWIW: rather unusual requirements happen all the time (that's why they pay
us the big bucks! - right!?)... and their presence and associated unusual
solutions don't necessarily imply that anything is being done improperly.
While I was somewhat vague in my OP, think about an app with security: an
admin can go in and modifies per-user permissions on something while users
are logged in. I currently have a security "gate keeper" class that will
ultimately provide up-to-the-nonosecond security - making the cached data
not so critical. But I'd like to make the user's experience a bit easier in
the case of such an unlikely scenario in which a user logs on and can access
something, and while the user is logged in, and admin comes in and changes
permissions on what that user can access. I'm just going the extra mile and
modifying what the user can see (which is cached as described in the OP)
before they get blocked by the security class. Just trynig to make the
user's experience a bit easier. I hope this makes sense.
Cheers!
"Patrice" <no****@nowhere .com> wrote in message
news:eB******** ******@TK2MSFTN GP11.phx.gbl... Yes (won't matter anyway if you shield this implementation detail from
your app by using an intermediate class). That said the requirement of having those data updated by an admin while users are offline is reather unusual. Is it really impossible to have this handled properly (you shouldn't store data in the cache when they are not needed, it shouldn't be updated directly). Patrice
--
"Guadala Harry" <GM**@NoSpam.co m> a écrit dans le message de news:er******** ******@TK2MSFTN GP12.phx.gbl... Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session - similar to "welcome back, Jim" after Jim logs in) and consumed across multiple pages. This "per user" data lives in a database, so toward improving runtime performance I want to cache data supporting this and similar per user features. Because the
data changes per user, output caching the page is out (at least I don't want
to cache per Custom right now). So, I'm looking at storing this per-user
data in either the Cache object or in Session state.
I think Session state would normally be the obvious choice - however -
one more important consideration that throws a wrench into that conventional wisdom is that I need to let administrators of this application modify this "per user" data - perhaps while users are online... so if the data is stored in session, then the user would not get the new data until they
establish a new session... so now storing this data in the Cache seems to make sense because it's relatively easy for any session to remove/update data in
the Cache.
So, given the requirements as described (and my somewhat limited
knowledge of ASP.NET), am I correct to conclude that this data should go into the Cache and not Session? Are there alternatives to Cache and Session that would make sense for this scenario?
Thanks!
More precisely I wanted to stress that IMO those data shouldn't be updated
"directly" in the "user store" (even a cache). Instead changes should be
"posted" to the database and the control flow of the user page should take
care of reloading those data in the (expired) cache.
Anyway from a non technical point of view, I would still consider to take
these changes into account the next time the user logs. In particular it
could be quite annoying for users to see options appearing or disappearing
while they are working especially if the admin performs multiple changes (in
which case using the session is enough).
If for some reason you want to take this change immediately into account,
you'll have just to expire the cache and the user control flow will take
care of loading new data into the cache...
Patrice
--
"Guadala Harry" <GM**@NoSpam.co m> a écrit dans le message de
news:OX******** ******@tk2msftn gp13.phx.gbl... Patrice,
Thanks for the response.
FWIW: rather unusual requirements happen all the time (that's why they pay us the big bucks! - right!?)... and their presence and associated unusual solutions don't necessarily imply that anything is being done improperly. While I was somewhat vague in my OP, think about an app with security: an admin can go in and modifies per-user permissions on something while users are logged in. I currently have a security "gate keeper" class that will ultimately provide up-to-the-nonosecond security - making the cached data not so critical. But I'd like to make the user's experience a bit easier
in the case of such an unlikely scenario in which a user logs on and can
access something, and while the user is logged in, and admin comes in and changes permissions on what that user can access. I'm just going the extra mile
and modifying what the user can see (which is cached as described in the OP) before they get blocked by the security class. Just trynig to make the user's experience a bit easier. I hope this makes sense.
Cheers!
"Patrice" <no****@nowhere .com> wrote in message news:eB******** ******@TK2MSFTN GP11.phx.gbl... Yes (won't matter anyway if you shield this implementation detail from your app by using an intermediate class). That said the requirement of having those data updated by an admin while users are offline is reather
unusual. Is it really impossible to have this handled properly (you shouldn't
store data in the cache when they are not needed, it shouldn't be updated directly). Patrice
--
"Guadala Harry" <GM**@NoSpam.co m> a écrit dans le message de news:er******** ******@TK2MSFTN GP12.phx.gbl... Is there any way for one Session to remove and update objects in
another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session - similar to "welcome
back, Jim" after Jim logs in) and consumed across multiple pages. This "per user" data lives in a database, so toward improving runtime performance I
want to cache data supporting this and similar per user features. Because the data changes per user, output caching the page is out (at least I don't
want to cache per Custom right now). So, I'm looking at storing this per-user data in either the Cache object or in Session state.
I think Session state would normally be the obvious choice - however - one more important consideration that throws a wrench into that
conventional wisdom is that I need to let administrators of this application modify this "per user" data - perhaps while users are online... so if the data is stored in session, then the user would not get the new data until they
establish a new session... so now storing this data in the Cache seems to make
sense because it's relatively easy for any session to remove/update data in the Cache.
So, given the requirements as described (and my somewhat limited knowledge of ASP.NET), am I correct to conclude that this data should go into
the Cache and not Session? Are there alternatives to Cache and Session
that would make sense for this scenario?
Thanks!
What about putting " " in the span instead of text?
"Patrice" wrote: More precisely I wanted to stress that IMO those data shouldn't be updated "directly" in the "user store" (even a cache). Instead changes should be "posted" to the database and the control flow of the user page should take care of reloading those data in the (expired) cache.
Anyway from a non technical point of view, I would still consider to take these changes into account the next time the user logs. In particular it could be quite annoying for users to see options appearing or disappearing while they are working especially if the admin performs multiple changes (in which case using the session is enough).
If for some reason you want to take this change immediately into account, you'll have just to expire the cache and the user control flow will take care of loading new data into the cache...
Patrice
--
"Guadala Harry" <GM**@NoSpam.co m> a écrit dans le message de news:OX******** ******@tk2msftn gp13.phx.gbl... Patrice,
Thanks for the response.
FWIW: rather unusual requirements happen all the time (that's why they pay us the big bucks! - right!?)... and their presence and associated unusual solutions don't necessarily imply that anything is being done improperly. While I was somewhat vague in my OP, think about an app with security: an admin can go in and modifies per-user permissions on something while users are logged in. I currently have a security "gate keeper" class that will ultimately provide up-to-the-nonosecond security - making the cached data not so critical. But I'd like to make the user's experience a bit easier in the case of such an unlikely scenario in which a user logs on and can access something, and while the user is logged in, and admin comes in and changes permissions on what that user can access. I'm just going the extra mile and modifying what the user can see (which is cached as described in the OP) before they get blocked by the security class. Just trynig to make the user's experience a bit easier. I hope this makes sense.
Cheers!
"Patrice" <no****@nowhere .com> wrote in message news:eB******** ******@TK2MSFTN GP11.phx.gbl... Yes (won't matter anyway if you shield this implementation detail from your app by using an intermediate class). That said the requirement of having those data updated by an admin while users are offline is reather unusual. Is it really impossible to have this handled properly (you shouldn't store data in the cache when they are not needed, it shouldn't be updated directly). Patrice
--
"Guadala Harry" <GM**@NoSpam.co m> a écrit dans le message de news:er******** ******@TK2MSFTN GP12.phx.gbl... > Is there any way for one Session to remove and update objects in another > Session? I seriously doubt it, but thought I'd ask. Here's why: I have some > data that is unique per user (or per session - similar to "welcome back, > Jim" after Jim logs in) and consumed across multiple pages. This "per user" > data lives in a database, so toward improving runtime performance I want to > cache data supporting this and similar per user features. Because the data > changes per user, output caching the page is out (at least I don't want to > cache per Custom right now). So, I'm looking at storing this per-user data > in either the Cache object or in Session state. > > I think Session state would normally be the obvious choice - however - one > more important consideration that throws a wrench into that conventional > wisdom is that I need to let administrators of this application modify this > "per user" data - perhaps while users are online... so if the data is stored > in session, then the user would not get the new data until they establish a > new session... so now storing this data in the Cache seems to make sense > because it's relatively easy for any session to remove/update data in the > Cache. > > So, given the requirements as described (and my somewhat limited knowledge > of ASP.NET), am I correct to conclude that this data should go into the > Cache and not Session? Are there alternatives to Cache and Session that > would make sense for this scenario? > > Thanks! > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rob |
last post by:
I need to allow a user with the default "Full Data User" permissions
on the front-end database to relink to a table in a backend to which
he has the same permissions.
(I'd like to do read, update, insert, delete, which are the DEFAULTS
for a "Full data user", but just so you know I have also added
"Administrator" for this group in front and backends, just to try and
figure out the problem and it didn't help).
Anyway I cycle through the...
|
by: Jeff Smythe |
last post by:
I simply want to execute some code once when a new session of my ASP.NET
application is started (I'm not using session state for anything else - just
writing some data to a database). I thought that I could simply put the code
in the Session_Start event procedure in Global.asax.cs, however, the event
procedure executes and a new session is created every time any page is
requested - not just for the first page requested....
|
by: fl |
last post by:
I am running ASPNET on my local machine. I have a problem when I try to
connect to a SQL server database table. The data looks good when I right
click SqlDataAdapter1 to preview the data. When F5 to run it, I get this
error "Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection..."
Here is my code (they are all generated by the wizard):
Public Class WebForm1
Inherits System.Web.UI.Page
|
by: Randy Yates |
last post by:
I'm a complete newbie to postgres so please look the
other way if these questions are really stupid.
Is it legitimate to have one database per data file? For
organizational and backup purposes, I'd like to keep the
database files for each of several projects separate.
This means, e.g., that postmaster must have multiple
instances going simultaneously?
I'm thinking the answer is NO because, for one, the TCPIP
|
by: Rob Kay |
last post by:
Hello.
I would like to know what is the easiest and safest way to extend the
default MemberShip Provider for SQL Server 2005 to include additional user
data (eg HomePhone, City, State etc).
Previous posts suggest deriving from SqlMembershipProvider, others suggest
storing the extra information in the user profile.
Thanks for any help provided.
| |
by: Ryan |
last post by:
Hello everyone,
What is the best way to cache a 2.0 web part?
I tried putting output cache on the user control in the part, but the
output cache cannot be wrapped by a generic web part . . . any ideas?
I'm new to caching to begin with and I am at a loss. Because of the
control, data caching wouldn't really be a good option. Maybe if I get
the rendered html code from the control, put that in cache, then
|
by: sloan |
last post by:
You should check out this post:
http://forums.asp.net/thread/1225321.aspx
maybe you re invented the wheel a little bit ( or maybe you had to, not
sure).
|
by: Alex |
last post by:
Hey Guys..
I'm just now starting to learn VB 2005, but I have a question that
might help me in the long run. I hope to write applications which
store user data, and without wanting the user to always have an MS SQL
database (or other DB) on hand, is it possible to have VB 2005 store
all data in XML files? It might be a substancial amount of data, like
hundreds of records, but given these files are never edited manually,
can XML handle...
|
by: Jan |
last post by:
Hi:
Here's a problem I've had for a long time. The client is really running
out of patience, and I have no answers.
Access2003, front- and back-end.
Single form with 4 subforms (each representing a related table), 5-10
clerks doing data entry at one time. Tables are quite large but all
work is done with unbound forms and/or local temp tables, and written
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |