Which distributed cache? - asp.net

I needed to find a way that two applications can use the same cache, and after some quick research it seems that we will need a distributed cache to achieve this. Further Googling turns up a number of solutions, NCache, SharedCache, Velocity, memcached. This cache will be used for caching webpages in a Microsoft Enviroment using Asp.Net 3.5.
So my question is what experiences do you have with these, or other, technologies.

We have been using Memcached for some time now and it works like a charm. It is really stable and the overall performance is also pretty good.
You can make use of the "Memcached Providers" project at codeplex.com to easily integrate it with .net.

Depending on the solution you require a low-tech option might be to persist the results/data to a network share.
Then have each machine hold a cached version (perhaps use the ASP.NET cache or Enterprise Library) of the data with a corresponding cache dependency.
To answer your question I have heard excellent things about NCache and Memcached.

Related

Is FluorineFX mature enough to use for a large web application?

I am in the planning stages of developing a large web application written in Flex and was wondering if anyone has actually used FluorineFX in a large production environment?
The documentation and online community makes it seem like it could be abandoned in the years to come and I have yet to read about it being used in production.
I have been assessing Weborb as well, but the costs are extremely high and I'm not entirely satisfied with the general workflow/setup of it. Are there any other solutions out there that I should consider?
I've used FlourineFx with great success in a large product with a Flex 3 client, and it actually works better than the ColdFusion (Adobe LiveCycle) product it replaced. It does require some configuration to work correctly, but it seems to work quite well once your config files are set up -- then again, its the same config files that Adobe LiveCycle need.
Not sure about FlourineFX. It looks like it is either just getting started or ending.
Working with DotNet and Flex, I would recommend writing the Flex Client and using ASP.NET web services to communicate. Microsoft ASP.NET MVC is a wonderful framework that is free and well supported. See: http://www.asp.net/mvc
The advantage of using a web service is that the client can change so that if you decide against Flex in the future or decide to use a Mobile Client then the service will remain the same. Plus, ASP.NET MVC has been proven on some very large sites like SO here.
Hope this helps.

ASP.NET Caching in a web cluster

We are building a large scale web platform where we try to use Caching to speed up things - though now it's a single server, we'll probably upgrade it to a cluster. Will the Caching work there? Should we consider anything special?
Thanks1
You will need to use a distributed cache. You can find implementations for different caching providers such as memcached or Velocity.

How to use NHibernate with asp.net 3.5

I want to use NHibernate with Asp.net 3.5 but i don't know how to use it.I search on
Google but couldn't find the complete explanation about why to use NHibernate,Advantages of using it and integration with Asp.net projects.
I would suggest checking out Castle and NHibernate. I recently started using it and was blown away with what it can do. Castle manages all your sessions for you. Also it is easy to use LINQ with it.
Check out
http://davidhayden.com/blog/dave/archive/2008/04/28/NHibernateCastleActiveRecordTutorialUninitiated.aspx
Another great tool to use (Should work with ASP.Net) is the Nhibernate Profiler
http://nhprof.com/ It shows you what queries are being generated and the time its taking to run.
Also if you already have your database created you can download this tool http://www.agilityfororms.com/Home/Products/AfoCastleActiveRecordModelCodeGenerator/ It will create your models based on your database. Its works great for the most part. Although you have to register to download the free version still worth checking out.
Fluent NHibernate is supposed to be good as well although I have no experience with it. Might be worth checking out. http://fluentnhibernate.org/
You could have a look at this :
http://www.codegod.de/WebAppCodeGod/nhibernate-tutorial-1---and-aspnet-AID25.aspx
And this :
http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx
I'm nearing completion of my first project with it, and I've had mixed results. For basic data persistence, and assuming you already knew how to use it, it's much faster to build an application with it. You don't really have to worry about building stored procs and differentiating between new objects and updated objects.
On the other hand, until you're quite comfortable with it, it can take a long time to do something that would have been simple before. I've had a couple of problems, and it has been difficult and time consuming finding solutions to them.
To be fair, I've only written small applications with it and it has made the development process more difficult than I would consider required. The pain of using it is fairly similar from one app to the next, the benefits scale...
The best place to look is at NHibernate Forge. There's Blogs, wikis and groups that will help you out.
As for advantages of using it that is something you need to workout for yourself. Is it more advantageous than LinqToSql or Entity Framework? It depends on the project size and what you are actually looking for.

Asp.net session management in load balance environment

Any recommendations for transition from single server to load balancing environment of 3 servers?
I considered using Sql Server session management, but I am storing linq2sql objects in session which has serialization issues. With a quick search I found a workaround .But I am skeptical to use this approach considering code-change/readability/performance issues. Any suggestions are welcome.
Just a suggestion : Can't you use sticky sessions in your load balancer?
We use memcached but it sounds like you want something to be a more critical portion of your app than just caching if you're placing LINQ to SQL objects up there (and I btw agree with RPM that you should consider getting out of that business...)
Anyway, this is a nice blog post that gives you a few options. Velocity is definitely one to look at since it's what Microsoft is offering (this is an asp.net app) and it seems to be gaining steam these days.

Is no FileIOPermission on paid webhosting normal?

I'm currently buying webhosting on a shared server with uses IIS6 and ASP.NET2.0 (They advertise 3.5 but investigation on my part has proven this to be false).
I did some legwork to make my 3.5-sensitive ASP.NET apps compile on my hosting then discovered another problem: My apps are failing at 'File.Open()' calls due to no FileIOPermissions.
I've called Technical Support and they've advised me this permission is only available if I configure IIS6 to use .NET 1.1 only. Am I out of line by thinking this is just not good enough?
This is something that should have been nutted out before starting to pay them, unless this disk access is a new requirement.
I can see it from their point of view. Every extra bit of power your apps have gives you more ability to shoot yourself (and more importantly, them) in the foot.
But I don't know why they'd allow it for an earlier .NET version, that seems bizarre.
I would make it clear that this is a deal-breaker. They might recapitulate, or you may have to move elsewhere. Either way, your problem will be solved.

Resources