08 November 2012

Dev Tip: High Performance Network Programming with Java

Hi Folks,

Lets look into a how to High Performance Network Programming using Java. The slide goes through various topics like:
  •  Sync vs Async I/O ( includes sockets, buffers, etc..)
  • Garbage Collection (advantages / disadvantages)
  • Choosing a Framework ( Scala / Cloujure  etc..)
  • TCP RTO  (retransmission timeout)
  • UDP / TLS / HTTPS ( tweaking)
  • Small compute devices
  • EC2

Conclusion:
  • Failing Well
  • Scale vertically and horizontally
  • Scale vertically but remember... 
  • We can reliably take one Java process up to 990K open connections
  • What happens when that one process fails? 
  • What happens when you need to do maintenance?

Cloud Tip: Scaling sites using Optimal Cache - Research work by CMU & Intel Labs


Hi folks,
I found an interesting paper delivered delivered at HotCloud '12 by a group from CMU and Intel Labs, Saving Cash by Using Less Cache (slides,  pdf), they show it may be possible to use less DRAM under low load conditions to save on operational costs. There are some issues with this idea, but in a give me more cache era, it could be an interesting source of cost savings for your product. 
Caching is used to:
  • Reduce load on the database.
  • Reduce latency.
Problem:
  • RAM in the cloud is quite expensive. A third of costs can come from the caching tier.
Solution: 
  • Shrink your cache when the load is lower. Their work shows when the load drops below a certain point you can throw away 50% of your cache while still maintaining performance.
  • A few popular items often account for most of your hits, implying can remove the cache for the long tail. 
  • Use two tiers of servers, the Retiring Group, which is the group of servers you want to get rid of. The Primary Group is the group of servers you are keeping. A cache request goes to both servers, if the data is in the transfer group but not the primary group the data is transferred to the primary group. This ensures hot data remains in the cache. This warms up the primary group without going to the database. After a while kill the retiring group.
Result:
  • A lower hit rate can be supported at a lower load without ruining performance.
  • The more skewed your popularity distribution the greater the savings.
  • Transferring the data before shrinking the cache eliminates transient performance problems.
  • It follows that it's possible to use less DRAM under low load to save operational costs.
A little introduction to Memcached for beginners:



Cloud Tip: How to Scale 1 to 1M by Kevin Rose

Hi folks,

As a follow up to my previous post on how to scale a web app from 1 to 1 million. I found an interesting Video lecture.



Will add more on to this on future posts!

26 October 2012

Dev Tip: MongoDB basics, best practices, schema design

Hi Folks,

Lets start with introduction to MongoDB; It covers how to try yourself, Installation on Linux. etc...



Lets look into MongoDB basics with Application development focus:




MongoDB Best Practice guide, lessons learned from expertise:



MongoDB Schema Design:


Dev Tip: Cake PHP RAD framework - Basics

Hi folks,

Today lets look into Cake PHP Rapid Application Development framework.




Learn how to build application with cake PHP:




Dev Tip: Best practices of CSS with statistics

Hi folks, lets look into css best practices, starts with some statistics, colors used, etc..




Very useful for Web Developers, especially those who are planning to start new Venture; online presence.

Dev Tip: PHP Best practice guide simplified!

Hi folks, Lets look into the PHP best practices.