473,761 Members | 9,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1033
I would think that the Cache would be a much more suitable place for your
app to store data like that.

MattC
"Michel" <Mi****@discuss ions.microsoft. com> wrote in message
news:0B******** *************** ***********@mic rosoft.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.Cur rent.Applicatio n["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.Cur rent.Applicatio n["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
11929
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> <servlet-class>mrf.LoadDbPropertiesServlet</servlet-class>
7
6899
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 datasheets (for subforms). I would like to do this on startup of the application. To be clear:
1
11320
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 Allow Toolbar/Menu Changes Use Access Special Keys
1
1794
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 Start Menu? I've found there are 2 system variables that could help me but.. what is the proper way to get these locations? And be win95/98/me/nt/2k/xp compatable? ALLUSERPROFILE=C:\Documents And Settings\All Users USERPROFILE=C:\Documents...
4
7852
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 problem is that the login form stays open. I put a me.close (in the login form) after opening the main form but that seems to close everything and the main form is not displayed. I thought I could call a Sub Main() that calls the login form, closes...
10
3002
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. Dim myForm as HardwareStore myForm = New HardwareStore myForm.Show() I understand that my form2 can be referenced by
8
3564
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 nothing is selected as the startup object. It appears to function but should I set it to Sub Main?
2
1583
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 "advapi32.dll" Alias "RegCreateKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String, ByVal phkResult As Long) As Long Public Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String) As Long...
0
1649
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.. actually when i build it, it creates a jar file which is totally fine (i can confirm that because i use that jar file in another project) any idea on how to get around this? maybe i could try to run it from the command line, but dont know how to run...
0
9531
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, 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...
0
9345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9957
jinu1996
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...
1
9905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
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 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...
0
8780
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
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...
0
6609
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();...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.