Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Architecture Question - When and Where to Build Cache for Site Search Index

Posted: Dec/14/2010   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:122   Vote Up (0)   Vote Down (0)    

I have an MVC3 web app that represents about a dozen different entities, but I have built a common search function so that the user can do a single search and get results from the various entities. It works fine, but as I suspected, the performance is slow because the search is occurring live and there's a lot to search. A cache would be fine even if it was a long one (daily even), but I don't know where and when to actually refresh the cache. If a person uses the search when it's been longer than the cache timeout then it will be really slow for them that one time and that's not acceptable. I'm thinking that I have to have a Windows service in place or something that builds the cache, but perhaps there's a better way that I don't know about. I can't do it entirely in the database because some of the entities don't exist in the database (one entity list is composed by searching through some files on the system for instance). Any help is appreciated.

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

How to keep rigth data in cache

  

Hi,

I would want to know what is better: to keep a lot of data in cache at once or to keep a little data by paging?

 

For example:

I have 1000 articles and 200 pages.


incorporating many many checkboxes into a search

  

Hello!  Merry almost Christmas!

I am writing a search application for a large dataset of images of algae.

The search is in two steps: first some general search criteria is filled out.  Next a list of species that fit the general criteria shows up and the user checks which species they would like to see.  Finally a list of images comes up that both fit the general search criteria and belong one of the species that the user had checked.  I'm trying to decide the best way to do this, I thought about two potential ways...

One way:  I can add all the checked species to a WHERE clause in the SQL statement that gives me my image search results.  I dont like this though... its possible the user selects 100+ species and this would make for a very very long WHERE clause.

Another way: I could leave my SQL statement so it only takes into account the general search criteria.  Then when I go to display the results, maybe I could choose not to display a record if it does not belong to a species that was checked by the user.

Anybody have any advice on this?  Opinions about which way is best?  Suggestions on other ways to do this?  Advice on how to implement the second way?


calling Javascript on Selected index changed f drop down list

  

helo

i want to call some javascript code from my aspx page on the selected index changed event of drop down list

<

asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" Width="163px" OnSelectedIndexChanged=how to call javascript from here>

<asp:ListItem>item1f</asp:ListItem>

<asp:ListItem>item2</asp:ListItem>

<asp:ListItem>item3</asp:ListItem>

<asp:ListItem>item3</asp:ListItem>

<asp:ListItem>item4</asp:ListItem>

</asp:DropDownList>

 

in java script i just want to enable my button control

 

how to achieve this

thank

sam


Quick question about VS Team Explorer 2K8 and VS Team Foundation Workgroup 2K8

  

As I understand VS Team Explorer 2K8 is the client that integrates with Visual Studio and VS Team Foundation Workgroup 2K8 would be the server product (5 license limited) that the clients integrate with, correct?


Remove Cache when OutOfMemory

  

I am Caching dataset in my application, the issue is when there is a large set of data the OutOfMemory exception is thrown.

I want to check for the this exception and when it happens I want to remove the cache object.

Can anyone suggest me how can I accomplish this ?

 

Thanks,

Sheetal


How to use a object from the cache in a mvc View

  

I am working with asp.net mvc and i am trying to get acces to a object that is in the cache.
In the Application_Start() of Global.asax.cs i create and store an object in the cache like this:

Translator translator = new Translator();
HttpContext.Current.Cache.Insert("Translator", translator, null, System.Web.Caching.Cache.NoAbsoluteExpiration, System.Web.Caching.Cache.NoSlidingExpiration);

Translator holds a dictionary with translations.

Now i want acces to this object from the cache to use functions and get values from the dictionary.


How can i do this?

I know i can acces it like this HttpContext.Current.Cache.Get("Translator") or Cache.Get("Translator") in the views
But how can i use the functions of the object ? The meaning of the cache is to have a object that is accesable througout the webapp right ?

Do i have to make an object and asses the value of the Cache.Get("Translator") to it, so i can use the functions or is there another solution?


OracleConnection dispose question

  

If I explicitly put an oracle connection in a Using{} block I know that it will call the Dispose() method when it goes out of scope.  My question is will the OracleConnection object be disposed in the following code block:


//static method a helper class
    public static OracleConnection GetDBH()
    {
        OracleConnection dbh = new OracleConnection(WebConfigurationManager.ConnectionStrings["foo"].ConnectionString);
        dbh.Open();
        return dbh;
    }

//code to be executed on the page
        using (var sth = new OracleCommand(query, GetDBH()))
        {
            var reader = sth.ExecuteReader();
            while (reader.Read())
            {
                //bla bla bla
            }
        }

The OracleConnection is implicitly within the Using{} block for the OracleCommand and goes out of scope at the same time.


Thanks.


Razor mysql LIKE search error?

  

LIKE searches should not I try it keeps the search represents an error.
Note that this is a mysql.

"WHERE subject LIKE '% $ KeyWord%'"; " ed="php -> "WHERE subject LIKE '%$KeyWord%'";" closure_uid_o2jey6="679">php -> "WHERE subject LIKE '% $ KeyWord%'";

" ed="Razor ->" closure_uid_o2jey6="680">Razor ->

if (! KeyWord.IsEmpty ()) {
    
selectQueryString = selectQueryString + "WHERE subject LIKE '% \ @ (KeyWord )%'";
}

This error indicates that the above statement. Is there work around the law?

my website: http://www.rzrschool.com


Opinion on Architecture approach

  

Ijust started a new job as Software Architect. I would really appreciate if somone can share their opinions regarding architecture of the following project that I can implement. I was planning to utilize MVP, DDD, TDD, IOC, Dependency Injection, Repository , StructureMap etc. I am not sure about how to achieve the portal aspect and value added services.

Technology:

  • Client Web Portal
  • ASP.Net /C#/SQL Server

Project Specification:

  • 5 types of customers
  • Template of service
  • Dynamic Content Driven portal
  • Modules can be activated/deactivated through management console
  • Branding and customization
  • Rapid deployment portals of future clients as well
  • Portals will allow for customization
  • Data reporting services
  • Value- Add services to the clients portal
  • Each Clients welcome page can be customized by client as well
  • Mobile Application services
  • Localization

I would really appreciate if someone can point out the following:

  • Best Architecture for this project
  • Patterns to use
  • How the data layer should be layed out?
  • How to achieve portal technology
  • Value add services
  • Any open source existing resources which can be utilized
  • Any books which will put me in the right direction

3D architecture drawing

  

 Hi,

Is there any tools out there which I can use to produced diagrams like the following

 

http://www.wisedimensions.com/screenshots/intro1.jpg (I am referring to the 3D appearance).  I tried the tool shown in the diagram 3D Visioner, but this does not provide a clear image which I can use on any document.

 

Thanks

Arjuna.



 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge