473,385 Members | 2,180 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,385 software developers and data experts.

Performance Question

I am building a portal for a college. I have offices and departments divided
into groups, and within each group there is 3 different levels of Authority:
Director
Director Delegate
Content Creator

Access to certain folder is restricted to certain group, but at the same
time it can restricted by Authority level within that group also.

Which way would be more efficient and would cause the least impact in terms
of performance:
Setting roles in web.confg as <officename>-<authority level>. there are
about 40 different offices and departments, this would mean that in the
worst-case scenario I would have 40 x 3 = 120 Roles defined in the
web.config (I was concerned that it may be too much)

Second option would be to define under each restricted directory in the
AppSettings a MinimumAuthority appSettings key, so I would read that then
concatenate it with the Group name that the user belongs to and check if the
user is in that role. That would mean that in a worst-case scenario I would
only put 40 different group names in there

which way would be more efficient

--
Abdellah Elamiri
..net Developer
Efficacy through simplicity

--
Abdellah Elamiri
..net Developer
Efficacy through simplicity
Nov 18 '05 #1
2 1197
In your case, it is not a matter of efficiency because reading the options
incur a disk I/O cost. Rather you should focus on maintainability. The
webconfig file stands out here because it can be edited by most anyone with
notepad experience. In addition, changes to the roles are immediately
applied thru an application restart. Not so with the appsettings.
Appsettings are read on app startup. This is easier for non-technical people
who do not necessarily want to mess with IIS internals to apply settings.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"A. Elamiri" <abdellahDOTelamiriATclintonDOTedutNOSPAM> wrote in message
news:ea**************@TK2MSFTNGP09.phx.gbl...
I am building a portal for a college. I have offices and departments
divided
into groups, and within each group there is 3 different levels of
Authority:
Director
Director Delegate
Content Creator

Access to certain folder is restricted to certain group, but at the same
time it can restricted by Authority level within that group also.

Which way would be more efficient and would cause the least impact in
terms
of performance:
Setting roles in web.confg as <officename>-<authority level>. there are
about 40 different offices and departments, this would mean that in the
worst-case scenario I would have 40 x 3 = 120 Roles defined in the
web.config (I was concerned that it may be too much)

Second option would be to define under each restricted directory in the
AppSettings a MinimumAuthority appSettings key, so I would read that then
concatenate it with the Group name that the user belongs to and check if
the
user is in that role. That would mean that in a worst-case scenario I
would
only put 40 different group names in there

which way would be more efficient

--
Abdellah Elamiri
.net Developer
Efficacy through simplicity

--
Abdellah Elamiri
.net Developer
Efficacy through simplicity

Nov 18 '05 #2
Changes are actually done from within the Web Application which edits the
Web.Config file. No one but Administrators have access to that feature.
So it wouldn't matter if I had 120 roles stored in the web.config? I was
thinking that maybe the more the roles the more time it will take for the
Authentication logic to check whether a user belongs to a role which is
authorized

--
Abdellah Elamiri
..net Developer
Efficacy through simplicity
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In your case, it is not a matter of efficiency because reading the options
incur a disk I/O cost. Rather you should focus on maintainability. The
webconfig file stands out here because it can be edited by most anyone with notepad experience. In addition, changes to the roles are immediately
applied thru an application restart. Not so with the appsettings.
Appsettings are read on app startup. This is easier for non-technical people who do not necessarily want to mess with IIS internals to apply settings.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"A. Elamiri" <abdellahDOTelamiriATclintonDOTedutNOSPAM> wrote in message
news:ea**************@TK2MSFTNGP09.phx.gbl...
I am building a portal for a college. I have offices and departments
divided
into groups, and within each group there is 3 different levels of
Authority:
Director
Director Delegate
Content Creator

Access to certain folder is restricted to certain group, but at the same
time it can restricted by Authority level within that group also.

Which way would be more efficient and would cause the least impact in
terms
of performance:
Setting roles in web.confg as <officename>-<authority level>. there are
about 40 different offices and departments, this would mean that in the
worst-case scenario I would have 40 x 3 = 120 Roles defined in the
web.config (I was concerned that it may be too much)

Second option would be to define under each restricted directory in the
AppSettings a MinimumAuthority appSettings key, so I would read that then concatenate it with the Group name that the user belongs to and check if
the
user is in that role. That would mean that in a worst-case scenario I
would
only put 40 different group names in there

which way would be more efficient

--
Abdellah Elamiri
.net Developer
Efficacy through simplicity

--
Abdellah Elamiri
.net Developer
Efficacy through simplicity


Nov 18 '05 #3

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

Similar topics

7
by: Randell D. | last post by:
Folks, I have a Javascript performance question that I might have problems explaining... In PHP, better performance can be obtained dealing directly with a variable, as opposed to an element...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
4
by: Martin | last post by:
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design)....
13
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
6
by: Mike | last post by:
Lets just say my app is done HOO HOO. Now, I'm accessing the database via a web service and one thing i noticed that my app is running real slow. When I first started working on the app is ran...
18
by: Rune B | last post by:
Hi Group I was considering using a Generic Dictionary<> as a value container inside my business objects, for the reason of keeping track of fields changed or added and so on. - But how...
5
by: Varangian | last post by:
Hi, I have a performance issue question? which is best (in terms of efficiency and performance, I don't care neatness in code)... building an ArrayList of Object Instances using SqlDataReader...
5
by: Markus Ernst | last post by:
Hello A class that composes the output of shop-related data gets some info from the main shop class. Now I wonder whether it is faster to store the info in the output class or get it from the...
5
by: toton | last post by:
Hi, I want a few of my class to overload from a base class, where the base class contains common functionality. This is to avoid repetition of code, and may be reducing amount of code in binary,...
30
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.