Wednesday, January 02, 2008

architecture and distributed caching thoughts in combination with indeXus.Net SharedCache - Part 5

SharedCache thought no. 5: Optimize Serialization

Serialization - easy - just add an attribute on top of the class and we are done, right? Objects that are stored in cache need to be serialized and the default CLR (.net) standard / default serialization is inefficient and has poor performance. beside the fact that the object output size is huge which has another impact: Memory usage can be reduced by 50% by implementing the ISerializable() attribute.

Another very interesting point is that depend on your object data structure, consider to serialize using data streams instead of object streams this can make a phenomenal impact in the positive way. Serialization performance improvements are up to an order of magnitude, the reduction in size can be up to 80%!!!

Which is actually not less this is a huge difference!


Download your copy of SharedCache: http://www.sharedcache.comSharedCache will soon release session provider, which will assist you to work with SharedCache and ASP.Net Sessions.

Soon i will add some additional thought about how to provide optimistic transactional handling with SharedCache.

SharedCache is free and open source the only way you can see exactly what happens within your application.

* - RDBMS - relational database management system
** - DAO - Data Access Objects

No comments:

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: Its free and easy to use, we provide all sources at codeplex.

Facebook Badge