Caching is your friend. If you have to present data that comes out of a database, and you run a website that gets a lot of traffic and requests, especially if the data is "read only" (which it almost always is), you can get - in most cases - vastly improved throughput by caching this data for as little as 1/2 of one second.
Wednesday, February 22, 2012
ASP.NET Caching, Micro-Caching, and Performance
http://www.eggheadcafe.com/tutorials/asp-net/2518777b-c584-4305-941a-1a2d1a4b857d/aspnet-caching-microcaching-and-performance.aspx
Caching is your friend. If you have to present data that comes out of a database, and you run a website that gets a lot of traffic and requests, especially if the data is "read only" (which it almost always is), you can get - in most cases - vastly improved throughput by caching this data for as little as 1/2 of one second.
Caching is your friend. If you have to present data that comes out of a database, and you run a website that gets a lot of traffic and requests, especially if the data is "read only" (which it almost always is), you can get - in most cases - vastly improved throughput by caching this data for as little as 1/2 of one second.
Friday, February 17, 2012
ASP.NET MVC 4 Beta Released!
http://weblogs.asp.net/jgalloway/archive/2012/02/16/asp-net-4-beta-released.aspx
ASP.NET Web API
The big new feature since the Developer Preview is the introduction of ASP.NET Web API.
ASP.NET Web API is built for all the other, non-human interactions your site or service needs to support
How to Retrieve Resource Values Programmatically in ASP.NET
Button1.Text = GetLocalResourceObject("Button1.Text").ToString(); Image1.ImageUrl = (String)GetGlobalResourceObject( "WebResourcesGlobal", "LogoUrl");Reference: http://msdn.microsoft.com/en-US/library/ms227982(v=vs.80).aspx
Thursday, February 16, 2012
Parallel processing of concurrent Ajax requests in Asp.Net MVC
http://www.stefanprodan.eu/2012/02/parallel-processing-of-concurrent-ajax-requests-in-asp-net-mvc/

If you want to enable a certain controller to process requests in parallel from a single user, you can use an attribute named SessionState that was introduced in MVC since version 3. It’s not necessary to use a session-less controller in order to achieve parallelism, the Ready-only option of theSessionStateBehavior will let you pass security checks you may have implemented based on Session data.
ParallelController.cs
[SessionState(System.Web.SessionState.SessionStateBehavior.ReadOnly)]
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public class ParallelController : Controller
{
public JsonResult Get1()
{
//read from session
var x = Session["call"];
Thread.Sleep(5000);
return Json(new { obj = "p1" }, JsonRequestBehavior.AllowGet);
}
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public class ParallelController : Controller
{
public JsonResult Get1()
{
//read from session
var x = Session["call"];
Thread.Sleep(5000);
return Json(new { obj = "p1" }, JsonRequestBehavior.AllowGet);
}
public JsonResult Get2()…
public JsonResult Get3()…
public JsonResult Get3()…
Wednesday, February 15, 2012
SignalR - notifying clients about server events
Use signalR in scenarios where you are polling server after fix interval to check if server has something which client needs to update. With SignalR it becomes very easy to implement solutions which require real time asynch connection with server.
If you are completely new to the term SignalR, then please read this Scott Hanselman's this post and visit SignalR's page on GitHub.
Subscribe to:
Posts (Atom)