Wednesday, March 05, 2014
NCache 4.3 has introduced new features and important enhancements that are critical for enterprise level applications. This new release allows NCache to be installed in cloud; on Windows Azure and Amazon. Also, a wrapper for Memcached is now available for existing users wanting to replace Memcached with NCache. This new release provides a package for run time data sharing between multiple platforms (Java & .Net). Java has been made 100% compatible with .NET and now you can manage your Java clients with NCache Manager.
For a comprehensive list of all features in 4.3, please read NCache Features
While registering events with cache, cache clients can tell the cache whether they are interested in data or metadata when the events occur. By default, data or metadata are not sent with the events to clients.
New API to register events has been introduced while to old API has been marked obsolete. Old API can’t be used to receive data with events.
Write-through and write-behind can now be configured for following behaviors:
Queries can now be registered with ‘Group by’ clause as in database to group the results as needed.
A new API has been introduced for this method. Currently, this new method ‘ExecuteReader’ in the API can only be used if ‘group by’ is used. For all other select statements, old method should be used.
As in database, now items can be removed from cache by writing delete statements. Previously, only select and update statements were supported. A new API has been introduced to support delete statement. ExecuteNonQuery will be used for delete statements.
A node can now be gracefully stopped in a cluster. This action will make sure that all client requests that have reached the node are executed on cache before it comes to complete stop. Similarly, all write behind operations pending in the queue at that time are also executed on the data source. However, no more client requests are accepted by this node.
Following enhancements are made to the encryption feature:
Following enhancements have been made to compact-serialization:
CacheInitParams while initializing cache can now cover everything that can be configured in client.ncconf. Previously, client.ncconf was always required to initialize a cache. Configurations passed through CacheInitParams have an overriding effect on the settings configured in client.ncconf.
InProc cache now keeps objects in de-serialized form. This removes the cost of serialization and de-serialization and hence, improving the performance. InProc client caches also keep objects in de-serialized form.
API calls can now be logged by just configuring few options in client configuration. These logs are generated on the client boxes and are very helpful to determine which cache methods are being called and in what sequence.
Users can configure to generate the log files at the location of their own choice. Each cache can have its own log location. By default, all log files will be generated in the log-files folder of install directory.
While adding caches to bridge, users can configure a cache to participate as an active or a passive member of bridge. Even when bridge is up and running, users can turn a passive into active and an active into passive without losing any data. User experience to configure a bridge is also changed as the topologies in bridge can be switched between Active-Active to Active-Passive at any time. Other topologies ‘Star’ and ‘Hub-spoke’ are currently not available in bridge.
User can pick one of the two caches in bridge as a ‘Master cache’. Whenever, there is a need for a state transfer between caches in bridge, data is transferred from a master cache to the non-master. When the master cache goes down, the only remaining cache becomes master automatically.
Cache administrators can temporarily connect and disconnect caches from the bridge while bridge is running. When a cache is disconnected, no data is transferred between bridge and the disconnected cache. Similarly, the cache on the other side of the bridge stops queuing data to the bridge as the disconnected cache is no more receiving any data. Cache can be reconnected at any time.
Communication protocol for management and monitoring operations are changed to ‘Socket’ from .Net Remoting’. This makes NCache and JvCache’s management and monitoring tools inter-compatible.
NCache Manager can now be used manage JvCache clients as well. NCache Manager can also fetch SNMP counters for JvCache clusters.
We have observed that in some environments, remote perf counters are accessible via their machine names only and on a few via their IP addresses. So in this version of NCache, NCache Manager has an option where user can pick to collect remote perf counters via their IP or machine name.
NCache Manager used to lock the dlls when query indexes were configured by the users. In this version, NCache Manager opens the given dlls in a separate app domain and therefore, never locking the dlls.
There is another type of dashboard available in NCache Monitor that allows users to create a report view style dashboard. In this dashboard, users have two report controls. One is for cache server nodes, while other one for client nodes. Users can drop the counters in this control and their values are shown in a report view style as shown in perfmon.
Counters added in report view can also be configured to be logged. Users can start and stop logging at any time. They can also schedule the logging to start automatically by specifying the start and stop time. These log files are generated in .csv format.
NCache Monitor can now also be used to monitor JvCache. Depending upon whether the selected cluster is of NCache or JvCache, it fetches counters from perfmon or SNMP respectively.
Following new command line tools are added to NCache:
Existing Memcached users can now switch to NCache without code change. There are two ways to replace memcached with NCache:
Following memcached client implementations are supported in this approach:
NHibernate integration is written from scratch to remove the limitations of previous implementation. Following are the few enhancements made in new implementation:
Users can now write their own code to modify the cache items before they are inserted in NCache. Users can change the expiration, dependencies etc. of output cache items by writing these hooks.
For this, users have to implement an interface provided with OutputCacheProvider and then register this assembly and class in web.config.
All items cached from various NCache integrations are tagged with special tags that determine the type of cache items. For example all sessions created in cache have a special tag that tells it’s a session cache item. This way users can identify any item in cache whether it’s a session or not.
Similarly, OutputCache and ViewState items are also tagged with their own tags.