I have 5 websites running on same server and I have some sql tables that I access frequently. that was time consuming and by defining them shared I pumped them in memory. So my application is accessing those static data tables from memory quite efficiently. But I realized I did a mistake and I occupied my memory unnecessarily while I keep same tables 5 times for each web application. Now I need to find the best way to share that table only 1 time. my options are;
1) using a local database – sql CE. my original sql database is on other server. so it makes the access slower but I can add a sql CE database(to be honest I never used it and dont know if it gives me anything) to access only these tables while they have static rows.
2) I read over forums that making a WCF using tcp binding. not sure if it will give me any advantage. any idea?
3) windows service: is it faster than wcf? programming is defiantly faster as i have experience with winservice but nor sure about performance.
Please let me know if you have any comment on my ideas or any other new idea?
thanks a lot.
If you are running on Windows Server 2008, you could use Microsoft’s AppFabric Server distributed caching. Here are couple of articles to give you an idea:
http://www.hanselman.com/blog/InstallingConfiguringAndUsingWindowsServerAppFabricAndTheVelocityMemoryCacheIn10Minutes.aspx
http://msdn.microsoft.com/en-us/magazine/dd861287.aspx