Posts

Caching is not as easy as you think it is

For the past year I have been playing around with azure caching and learning a lot. I have got frustrated, confused and then finally there seems to be light at the end of the tunnel. This is what I've learnt from my experience so far: 1. I have no idea why they allow co-located caching because if you are having a decent sized cache with lots of reads and writes, this is unusable. Use dedicated cache role - only that can handle significant load. 2. Caching which uses BLOB storage as a persistence mechanism has problems if it accesses BLOB storage frequently because items are not remaining in the cache. I was flummoxed by this problem but worked around it because in my case, I was able to get away with checking for the existence of the BLOB which is much faster than trying to download it every time (my data just requires the existence check). 3. Don't be unhappy with your code if you have x-small and small instances and your sites with caching roles do not perform well. ...

c# async method without a real await supported method called within it.

Have been searching for this since a long time. Finally found it: http://stackoverflow.com/questions/15522900/how-to-safely-call-an-async-method-in-c-sharp-without-await public   async   static   Task < int > GetTwitterResultsCountAsync( string  itemLink)         {              int  returnCount =  await   Task .Run< int >(() =>             {                  int  count = 0;                  try                 {                 ...

There is more to the late 2008 macbook RAM upgrade than meets the eye

http://blog.macsales.com/9102-secret-firmware-lets-late-08-macbooks-use-8gb I read this and decided to upgrade the RAM on my macbook - late 2008 model -macbook 5,1. I first searched for the correct RAM online and saw this: http://eshop.macsales.com/shop/memory/Apple_MacBook_MacBook_Pro/Upgrade/DDR3 This is memory it recommends: 8.0GB  OWC Memory Upgrade 2 x 4.0GB PC8500 DDR3 1066MHz 204 Pin Now, this costs $89.88. I hate buying stuff online and I want to see it for myself, so I went to the local bestbuy which was having a $55 promo offer on the 8GB RAM kit with the following specs: PC3-10666 DDR3 RAM with both 1066 and 1333MHz support. I was not sure whether this was compatible, so I went to geek squad and double checked that it was ok. I opened my macbook and upgraded my RAM which was easy and saw huge amount of dust inside which I thoroughly cleaned... Then, I booted up and my macbook now runs as fast as a new macbook! I mean, this is 2X the speed it w...

Controlling costs in Windows Azure

One of the problems in dealing with any cloud platform is that we need to minimize the costs when nobody is using the service while when more users come in, it should scale as much as needed. When you have lot of money then it is easy to simply throw money at the problem so that even when nobody is using the service it runs say 2 small or 2 medium roles. Sometimes we can try to justify this saying that the application really needs 2 small roles just for something like caching. It all adds up quickly when the main app needs another 2 roles and a service is another 2 roles. I have gone from using 5 roles to just 3 roles at steady state. And I get better performance also. I am currently using 2 co-located roles which have caching + web. This makes the web role faster because the cache is in its own memory. This is faster than using dedicated roles and even trying local cache along with it. The slowest is shared caching where they provide the service. This is followed by dedicate...

You should always know how to debug process crashes using dump files

http://blogs.msdn.com/b/debugger/archive/2009/12/30/what-is-a-dump-and-how-do-i-create-one.aspx http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/20/using-visual-studio-2013-to-diagnose-net-memory-issues-in-production.aspx

VS 2012 (with Update 3) screws up .cmd files containing batch scripts

This may not be specific to Update 3 or VS 2012. I noticed that if you edit a .cmd file containing batch commands in Visual Studio, it adds garbage to the first line of the file. The execution of the scripts will fail because of this. Hence use notepad for this.

Azure role keeps on crashing and recycling after upgrade to 2.0 sdk

I spent two days debugging and trying to fix this file load exception. Finally it turned out that out of the 50 projects I used several of them were still pointed to old 1.7 and 1.8 dlls. I fixed that and now everything works fine.