NCache 3.8 SP3


Published on

This presentation is about the features of NCache 3.8 SP3, a famous distributed cache provider for .NET and Java applications.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

NCache 3.8 SP3

  1. 1. NCache Fast & Scalable .NET Apps in Server Farms Distributed .NET Data Cache Distributed ASP.NET Sessions Iqbal Khan [email_address] Ph: +1 (925) 236-2125 Alachisoft .NET Performance Solutions
  2. 2. Alachisoft Company History <ul><li>Founded in California in 1996 </li></ul><ul><ul><li>Experts in enterprise applications in Java, C++, and .NET </li></ul></ul><ul><li>Became Alachisoft in 2003 (product company) </li></ul><ul><ul><li>Impressive growth from profitable and revenue-funded model </li></ul></ul><ul><li>Headquarters: San Francisco Bay Area </li></ul><ul><ul><li>2410 Camino Ramon, Suite 175, San Ramon, CA 94583 </li></ul></ul><ul><li>NCache launched in July 2005 </li></ul><ul><ul><li>Current version: 3.8 (8 th version) </li></ul></ul>NCache 3.8
  3. 3. Supporting Our Customers <ul><li>Annual Maintenance & Support </li></ul><ul><ul><li>Free upgrades for 1 year </li></ul></ul><ul><ul><li>Email & telephone based support </li></ul></ul><ul><li>24x7 Support </li></ul><ul><ul><li>Email & telephone based support </li></ul></ul><ul><li>Professional Services </li></ul><ul><ul><li>Cache Integration : into your existing apps </li></ul></ul><ul><ul><li>Caching API Training : for your developers </li></ul></ul><ul><ul><li>Cache Configuration Training : for your IT staff </li></ul></ul>NCache 3.8
  4. 4. Main Benefits of NCache NCache 3.8 <ul><li>Higher Application Performance & Scalability </li></ul><ul><ul><li>Performance: Extremely fast in-memory cache </li></ul></ul><ul><ul><li>Scalability: </li></ul></ul><ul><ul><ul><li>Reduce pressure on database </li></ul></ul></ul><ul><ul><ul><li>Linearly scale out cache cluster </li></ul></ul></ul><ul><li>Reliable & Scalable ASP.NET Session Storage </li></ul><ul><ul><li>Session replicated for reliability </li></ul></ul><ul><ul><li>Fast & scalable session storage </li></ul></ul><ul><li>Runtime Data Sharing for Server Apps </li></ul><ul><ul><li>Asynchronous data sharing in producer/consumer model </li></ul></ul><ul><ul><li>Powerful event notification for app coordination </li></ul></ul>
  5. 5. Main Uses of NCache <ul><li>Enterprise Distributed Data Cache </li></ul><ul><ul><li>Performance & Scalability : Reduce expensive db trips </li></ul></ul><ul><ul><li>Reliability : Dynamic clustering & replication </li></ul></ul><ul><ul><li>ASP.NET apps, web services, distributed apps, grid computing apps </li></ul></ul><ul><li>Distributed ASP.NET Sessions for Web Farms </li></ul><ul><ul><li>Faster and more scalable session storage </li></ul></ul><ul><ul><li>Reliability : 100% uptime. Sessions replicated. </li></ul></ul><ul><ul><li>Easy adoption : No code change required to use </li></ul></ul>NCache 3.8
  6. 6. Enterprise Distributed Data Cache NCache 3.8
  7. 7. High Availability (100% Uptime) Dynamic Cache Cluster NCache 3.8 <ul><li>TCP based Cache Cluster </li></ul><ul><ul><li>Does not use Windows Clustering </li></ul></ul><ul><li>Peer to peer architecture </li></ul><ul><ul><li>No single point of failure </li></ul></ul><ul><li>Add/remove servers at runtime </li></ul><ul><ul><li>Without stopping cache or your app </li></ul></ul><ul><ul><li>Data adjusted automatically based on caching topology </li></ul></ul><ul><li>Hot Apply config changes </li></ul><ul><ul><li>Change config properties while cache is running </li></ul></ul>
  8. 8. High Availability (100% Uptime) Dynamic Configuration NCache 3.8 <ul><li>Connection failover </li></ul><ul><ul><li>Auto-connect to other servers </li></ul></ul><ul><li>Cluster membership info </li></ul><ul><ul><li>Propagate to clients at runtime </li></ul></ul><ul><li>Cache topology info </li></ul><ul><ul><li>Propagate to clients at runtime </li></ul></ul><ul><ul><li>Connection strategy at runtime </li></ul></ul>
  9. 9. Caching Topologies Mirrored Cache (2-node active/passive) NCache 3.8 <ul><li>All clients connect to active node </li></ul><ul><li>Passive node becomes active if active node goes down. Clients also automatically connect to it </li></ul><ul><li>Mirroring to passive node done asynchronously </li></ul><ul><li>Recommended use: </li></ul><ul><ul><li>Up to 10 app servers </li></ul></ul><ul><ul><li>2 cache server cluster </li></ul></ul>
  10. 10. Caching Topologies Replicated Cache NCache 3.8 <ul><li>Entire cache copied to all servers </li></ul><ul><li>Each update done to all servers </li></ul><ul><li>Clients connect evenly to all servers. All servers active. </li></ul><ul><li>Good for read-intensive scenarios </li></ul>
  11. 11. Caching Topologies Partitioned Cache NCache 3.8 <ul><li>Extremely scalable </li></ul><ul><li>Location transparency </li></ul><ul><li>Good for larger clusters </li></ul><ul><li>Distribution map sent to all clients </li></ul><ul><li>No replication available </li></ul>
  12. 12. Caching Topologies Partitioned-Replica Cache NCache 3.8 <ul><li>Each partition has one replica </li></ul><ul><li>Async & Sync replication </li></ul><ul><li>Location transparency. </li></ul><ul><li>Extremely scalable </li></ul><ul><li>Reliability due to replication </li></ul>
  13. 13. Caching Topologies Client Cache NCache 3.8 <ul><li>Clustered cache on separate tier </li></ul><ul><li>Client has local client cache </li></ul><ul><li>Client cache InProc or OutProc </li></ul><ul><li>Client cache automatically synchronized with clustered cache </li></ul><ul><li>Gives further boost to client apps </li></ul><ul><li>Good for read-intensive apps </li></ul>
  14. 14. Caching Topologies Performance Data (2-node cluster) NCache 3.8 <ul><li>Mirrored Cache </li></ul><ul><ul><li>30,000 reads/sec </li></ul></ul><ul><ul><li>25,000 writes/sec </li></ul></ul><ul><li>Replicated Cache </li></ul><ul><ul><li>60,000 reads/sec </li></ul></ul><ul><ul><li>2500 writes/sec </li></ul></ul><ul><li>Partition-Replica Cache </li></ul><ul><ul><li>60,000 reads/sec </li></ul></ul><ul><ul><li>44,000 writes/sec </li></ul></ul>
  15. 15. Caching Topologies Bridge Topology (for WAN replication) NCache 3.8
  16. 16. Poweful Cache Administration NCache 3.8
  17. 17. Powerful Cache Monitoring NCache 3.8
  18. 18. Important Features <ul><li>Max cache size </li></ul><ul><ul><li>To control memory consumption. Evicts item when cache reaches Max Size </li></ul></ul><ul><li>Eviction policies </li></ul><ul><ul><li>LRU, LFU, Priority, and “Do Not Evict” </li></ul></ul><ul><li>Cache security (authenticate + authorize) </li></ul><ul><ul><li>Authenticate with Active Directory. Authorize as “Admin” or “User” </li></ul></ul><ul><li>Compression </li></ul><ul><ul><li>Specify compression threshold. Uses GZip on client-side. </li></ul></ul><ul><li>Server Configuration Options </li></ul><ul><ul><li>Rejoin a cache cluster upon reboot </li></ul></ul><ul><ul><li>Multiple NIC support (one for client/server & one for cluster) </li></ul></ul>NCache 3.8
  19. 19. NCache ASP.NET 2.0 Session State Provider NCache 3.8
  20. 20. Object Caching API is Simple <ul><li>Initialize & Dispose the Cache </li></ul><ul><ul><li>Cache cache = NCache .InitializeCache( “myReplicatedCache” ); </li></ul></ul><ul><ul><li>cache.Dispose(); </li></ul></ul><ul><li>Read from the Cache </li></ul><ul><ul><li>object obj = cache.Get( “myKey” ); </li></ul></ul><ul><ul><li>object obj = cache[ “myKey” ]; </li></ul></ul><ul><ul><li>bool isPresent = cache.Contains( “myKey” ); </li></ul></ul><ul><li>Add to the Cache </li></ul><ul><ul><li>cache.Add( “myKey” , obj); </li></ul></ul><ul><ul><li>cache.Insert( “myKey” , obj); </li></ul></ul><ul><ul><li>cache[ “myKey” ] = obj; </li></ul></ul><ul><li>Remove from the Cache </li></ul><ul><ul><li>object obj = cache.Remove( “myKey” ); </li></ul></ul><ul><li>Clear </li></ul><ul><ul><li>cache.Clear(); </li></ul></ul>NCache 3.8
  21. 21. Important Object Caching Features <ul><li>Expirations </li></ul><ul><ul><li>Absolute-time + idle-time </li></ul></ul><ul><ul><li>Auto-reload data on expiration (if read-thru enabled) </li></ul></ul><ul><li>Cache dependencies </li></ul><ul><ul><li>Key, file, and custom dependencies </li></ul></ul><ul><li>Synchronize cache with database </li></ul><ul><ul><li>.NET event notifications (SqlDependency) for SQL Server 2005 & Oracle 10g R2 </li></ul></ul><ul><ul><li>Polling based for all OLEDB compliant databases </li></ul></ul><ul><li>Read-through and write-through </li></ul><ul><ul><li>You implement read-thru and write-thru handlers called by NCache </li></ul></ul><ul><ul><li>Write has write-behind option that queues up database updates </li></ul></ul>NCache 3.8
  22. 22. Important Object Caching Features <ul><li>Event notifications (cluster wide) </li></ul><ul><ul><li>Register interest in specific cached items to be notified at insert/remove </li></ul></ul><ul><ul><li>Register interest to be notified at ALL add/insert/remove (off by default) </li></ul></ul><ul><ul><li>Send custom notifications to other NCache clients (cluster wide) </li></ul></ul><ul><li>Tagging & Searching Cache </li></ul><ul><ul><li>Object Query Language for searching on object attributes </li></ul></ul><ul><ul><li>Tagging for arbitrary grouping and searching of cached objects </li></ul></ul><ul><li>Pessimistic & Optimistic Locking </li></ul><ul><ul><li>Lock/Unlock for pessimistic locking (writer-lock) </li></ul></ul><ul><ul><li>Object versioning for optimistic locking (reader-lock) </li></ul></ul><ul><li>Bulk operations </li></ul><ul><ul><li>Get, Add, Insert, Remove </li></ul></ul>NCache 3.8
  23. 23. Important Object Caching Features <ul><li>Compact serialization </li></ul><ul><ul><li>Mix with regular .NET serialization. Faster and more compact. </li></ul></ul><ul><li>Caching Application Block (CAB) integration </li></ul><ul><ul><li>NCache implements a cache manager for CAB </li></ul></ul><ul><ul><li>No code change required to integrate (only config file changes) </li></ul></ul><ul><li>NHibernate integration </li></ul><ul><ul><li>Cache provider for NHibernate implemented </li></ul></ul><ul><ul><li>No code change required to integrate (only config file changes) </li></ul></ul><ul><li>Java client </li></ul><ul><ul><li>No Java-to-.NET interoperability used. Native NCache socket protocol. </li></ul></ul><ul><ul><li>Event notifications available </li></ul></ul><ul><ul><li>Object Query Language available </li></ul></ul>NCache 3.8