Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
hi Guys,
 
i need your help to understand a performance /scalability problem.
 
I have to mantain a web-application that runs only in the society network, the application is an "approval workflow manager" and it is used also to store documents.
 
The framework is 4.0, the language is C#, the server is a sql2005 server
 
The application has about 500 users, and usually i think no more then 100 user at the same time.
 
I'm facing a problem with translations, the situation i found is a sql table for the translation, and in the base-page 's code behind a recoursive functions that look for every controls and change the description of the text with the one in the sql.
 
Well every page load so make requests for the same "string" every time,
so i decided to store the whole translation table in session
Note: the table count 3 language, less than 1000 translation so 3.000 at total.
Note 2: i'm developing right now the system to keep only the actual language so the total amount of data could become 1.000 rows
 
do you think that could be paintfull to store 3000 records in session with 100 users online ?
 
could store in Cache be a better solution ?
 

any other smart idea ? Big Grin | :-D
 
thanks
bye bye
Posted 14-May-12 23:06pm
nrgjack3.1K
Edited 14-May-12 23:10pm
v4
Comments
Sandeep Mewara at 15-May-12 11:58am
   
Is this shared across users?
katanakensei at 15-May-12 12:44pm
   
well just to understand, every text on buttons, every label every grid header are translated.
so the translation are more or less always the same for every user, but the new ones that i introduce in every "patch/release"
i tried in test environement and it was very easy to make the change, i used the httpcontext.session and now i use httpcontext.application.
 
i'll test in theese few days but the solution sounds great till now.
 
i provide an administration page to clear and restore the translation so i can refresh the translation every time i need, that was a thing that scared me about cache.
 
anyway thanks a lot
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Since the translation table would be shared by all users, if I understood you correctly, why not store the table inside the Application object instead of the Session object. Then there would be only one instance. If there is some integer key to your translation table and the content is always fetched via this key you could also read all of your data into a Dictionary<int, String> for fast retrieval.
 
Hope that helps!
 
Regards,
 
Manfred
  Permalink  
v2
Comments
katanakensei at 15-May-12 9:31am
   
thanks you, application is a good choiche, it is quite easy to switch from session to application (indeed i was using a propertie that get and set value from/to session now i'll try application, thanks ^_^
Sandeep Mewara at 15-May-12 11:59am
   
Just read your answer. After reading your answer, it does now sounds like having it shared across users. If so, this is the right one. Will 5 it as it sounds more of across users now as I read more n more.
 
Will update my answer. :doh:
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

3000 records in session with 100 users online
That does sounds too much of data in a session at a given time.
 
I would go with Cache - it would be better option here.
 
Have a read of the following:
MSDN: ASP.NET Caching: Techniques and Best Practices[^]
Cache Management in ASP.NET[^]
 

UPDATE:
After reading Manfred answer and then question again, it does sounds like sharing a data across user. In that case, Application variables fit the bill best.
  Permalink  
v2
Comments
katanakensei at 15-May-12 9:34am
   
thank you, very interesting topics,
i'm worried about updating cache (rarely).
do you think cache would be a better approach event compared to Application object ? why?
thanks
regards
Sandeep Mewara at 15-May-12 11:55am
   
Application objects hold data that can be shared across session across users. I thought you are not looking for that. Are you?
 
Read here:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
katanakensei at 15-May-12 12:46pm
   
thanks for your help too , i appreciated it a lot, i'll study the link you posted :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 341
1 Marcin Kozub 225
2 Praneet Nadkar 197
3 Sergey Alexandrovich Kryukov 190
4 Shweta N Mishra 161
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 15 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100