473,414 Members | 1,686 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,414 software developers and data experts.

startup strategie

Hi, I have a question about the startup strategie for my asp.net application.

The application is a website, with behind it a backend webservice used to
retrieve and store data in the choosen database.

When the application starts, one of the first things the app does is loading
the entire dictionary, and the security settings. These are stored an
hastable in the HttpContext.

Question 1: The startup of the application is much to slow. Cause:
retrieving the data from the backend. Is their a good design mechanism to
load the data from the backend, without waiting until it is all loaded?
Problem is that some of the data is needed to generate my webpage (for
example the translations)

Question 2: This data is loaded in the HttpContext. Is this a good place to
store this data, especially when you know that I do pass this HttpContext
between methods?

Thanks in advance!

Michel
Nov 19 '05 #1
4 1019
I would think that the Cache would be a much more suitable place for your
app to store data like that.

MattC
"Michel" <Mi****@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
Hi, I have a question about the startup strategie for my asp.net
application.

The application is a website, with behind it a backend webservice used to
retrieve and store data in the choosen database.

When the application starts, one of the first things the app does is
loading
the entire dictionary, and the security settings. These are stored an
hastable in the HttpContext.

Question 1: The startup of the application is much to slow. Cause:
retrieving the data from the backend. Is their a good design mechanism to
load the data from the backend, without waiting until it is all loaded?
Problem is that some of the data is needed to generate my webpage (for
example the translations)

Question 2: This data is loaded in the HttpContext. Is this a good place
to
store this data, especially when you know that I do pass this HttpContext
between methods?

Thanks in advance!

Michel

Nov 19 '05 #2
> Question 1: The startup of the application is much to slow. Cause:
retrieving the data from the backend. Is their a good design mechanism
to load the data from the backend, without waiting until it is all
loaded? Problem is that some of the data is needed to generate my
webpage (for example the translations)
If you need it to do this work prior to starting up, then this is what's
going to happen. If the startup time is too slow, try to defer this processing
(see my comment below).
Question 2: This data is loaded in the HttpContext. Is this a good
place to store this data, especially when you know that I do pass this
HttpContext between methods?


Where in the HttpContext? If you mean the Cache, then that's designed for
cached data. One thing to beware of -- the cache is designed to purge entries
after a timeout (if you specify one) or when you're low on memory (if you
don't disable it) so your programming model always should check if then entry
is in the cache and if it's not it should then go back to the database to
get the data and put it back into the cache.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #3
Thanks for the reply.

No I 'm wondering if it might be better to check of the entries are already
loaded, and if not, to load them and store the new ones. Think it will boost
my app a lot.

Also, because the httpcontext is passed a lot between some methods, I'm
looking for another place to store the data.
Currently an instance of a class stores this data in an hashtable. When
loaded, the data is stored in HttpContext.Current.Application["Translator"].
Any suggestions?

Michel

"Brock Allen" wrote:
Question 1: The startup of the application is much to slow. Cause:
retrieving the data from the backend. Is their a good design mechanism
to load the data from the backend, without waiting until it is all
loaded? Problem is that some of the data is needed to generate my
webpage (for example the translations)


If you need it to do this work prior to starting up, then this is what's
going to happen. If the startup time is too slow, try to defer this processing
(see my comment below).
Question 2: This data is loaded in the HttpContext. Is this a good
place to store this data, especially when you know that I do pass this
HttpContext between methods?


Where in the HttpContext? If you mean the Cache, then that's designed for
cached data. One thing to beware of -- the cache is designed to purge entries
after a timeout (if you specify one) or when you're low on memory (if you
don't disable it) so your programming model always should check if then entry
is in the cache and if it's not it should then go back to the database to
get the data and put it back into the cache.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #4
I'd stick with the Cache (not Application) as this is what it was designed
for. But keep in mind that no matter where you put the data, there is only
so much memory... so even though the cache was designed for these sorts of
things there are always going to be certain physical limitations.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks for the reply.

No I 'm wondering if it might be better to check of the entries are
already loaded, and if not, to load them and store the new ones. Think
it will boost my app a lot.

Also, because the httpcontext is passed a lot between some methods,
I'm
looking for another place to store the data.
Currently an instance of a class stores this data in an hashtable.
When
loaded, the data is stored in
HttpContext.Current.Application["Translator"].
Any suggestions?
Michel

"Brock Allen" wrote:
Question 1: The startup of the application is much to slow. Cause:
retrieving the data from the backend. Is their a good design
mechanism to load the data from the backend, without waiting until
it is all loaded? Problem is that some of the data is needed to
generate my webpage (for example the translations)

If you need it to do this work prior to starting up, then this is
what's going to happen. If the startup time is too slow, try to defer
this processing (see my comment below).
Question 2: This data is loaded in the HttpContext. Is this a good
place to store this data, especially when you know that I do pass
this HttpContext between methods?

Where in the HttpContext? If you mean the Cache, then that's designed
for cached data. One thing to beware of -- the cache is designed to
purge entries after a timeout (if you specify one) or when you're low
on memory (if you don't disable it) so your programming model always
should check if then entry is in the cache and if it's not it should
then go back to the database to get the data and put it back into the
cache.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #5

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

Similar topics

2
by: robert walker | last post by:
hi all, to my webapp named mrf, i have added load-on-startup tag to mrf\WEB-INF\web.xml so i added a snippet like so <servlet> <servlet-name>loadDbProperties</servlet-name>...
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
1
by: cefrancke | last post by:
I have set the Startup properties to the following... All menus, toolbars, etc are turned off plus these are unchecked Allow Full Menus Allow Built-in Toolbars Allow Default Shortcut Menus...
1
by: Locke Nash Cole | last post by:
I'm making a utility similar to MSConfig, I've found it easy enough to obtain the startup items from the registry for the current user and local machine... but what about the Startup folder on the...
4
by: Johnnie Miami | last post by:
I'm using VB.Net 2005 beta 2 and have my login form (login.vb) specified as the startup form. If the user is successful logging in, I call my main form (main.vb). This all works fine but the...
10
by: Bernie Hunt | last post by:
This is probably a silly question, but I've gotten myself confused. My app has two forms, form1 and form2. form1 is the start up object in the propers. An event in form1 instantiates form2. ...
8
by: cj | last post by:
In 2003 I sometimes changed the startup object of a project to Sub Main which was found in Module1.vb. I upgraded one such project to 2005 and I notice in the properties page for the project that...
2
shek124
by: shek124 | last post by:
I want to run a windows startup program. here my code: Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal Hkey As Long) As Long Public Declare Function RegCreateKey Lib...
0
by: ycinar | last post by:
hey all, i am working on a Java project using JBuilder.. when i build my code its fine, but when comes to run, it doesnt run and displays the following logs.. i think there is JDK conflict.. ...
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
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?
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...
0
marktang
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,...
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,...
0
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...

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.