Release Notes NCache 4.3

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.

Enhancements and New Additions

For a comprehensive list of all features in 4.3, please read NCache Features

  1. Events with Data:
  2. 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.

  3. Write-through/Write-behind Enhancements:
  4. Write-through and write-behind can now be configured for following behaviors:

    • Batching – Where multiple write-behind operations can be batch written to the database after a configurable interval. The maximum number of items in a single batch is also configurable.
    • Keep failed operations – Providers can now dictate whether to keep an item in the cache or not even if it is failed on database.
  5. Group-by for Queries:
  6. 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.

  7. Delete Statement in Queries:
  8. 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.

  9. Graceful Node Stop:
  10. 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.

  11. Encryption Enhancements:
  12. Following enhancements are made to the encryption feature:

    • AES-128, AES-192, AES-256 encryption is supported.
    • When encryption is enabled, indexed data is also encrypted.
  13. Compact Serialization Enhancements:
  14. Following enhancements have been made to compact-serialization:

    • Users can select and de-select the data members to be compact serialized.
    • Byte arrays are no more serialized.
    • Compact types are hot-appliable.
  15. Enhanced CacheInitParams:
  16. 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.

  17. De-serialized Data in InProc:
  18. 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.

  19. API Calls Logging:
  20. 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.

  21. Configurable Log Locations:
  22. 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.

  23. Switch between Active/Active and Active/Passive Bridge Topologies:
  24. 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.

  25. Master Cache in Bridge Topology:
  26. 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.

  27. Connect/Disconnect Caches in Bridge Topology:
  28. 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.

  29. Socket Protocol Management:
  30. 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.

  31. NCache Manager Compatibility:
  32. NCache Manager can now be used manage JvCache clients as well. NCache Manager can also fetch SNMP counters for JvCache clusters.

  33. Connect to Remote Perfmon via machine name or IP address:
  34. 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.

  35. DLLs Locking Issue Resolved:
  36. 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.

  37. ReportView Control for NCache Monitor:
  38. 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.

  39. Logging of Counters in NCache Monitor:
  40. 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.

  41. NCache Monitor Compatibility:
  42. 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.

  43. New Command Line Tools Added:
  44. Following new command line tools are added to NCache:

    1. Create Cache: Configure Cache Tools is now changed to Create Cache Tool. It will handle 2 cases.
      • Simple case: In this case it will take minimum required parameters (i.e. cache name, server, port, topology, size, eviction policy etc.) and create a cache with default values (like NCache Manager).
      • Advance case: In this case a configuration file containing cache settings will be taken as parameter with server list on which cache will be created.
    2. Add Backing Source: It will take cache id, assembly path, class name, provider name, read thru/write thru option and also dependent assembly folder as input parameter.
    3. Add Startup Loader: It takes cache id, assembly path, class name and also dependent assembly folder as input parameters.
    4. Add Compact Types: It takes cache id, assembly path, class name and also dependent assembly folder as input. If Specified class is the implementation of IGenericTypeProvider, this will register generic type through implemented provider.
    5. Add Query Index: It takes cache id, assembly path, class name, attribute/attribute list and also dependent assembly folder as input.
    6. Remove Backing Source: It takes cache id, server, provider name and readthrough/write-through option as input parameters. It will remove backing source from specified cache on all registered nodes.
    7. Remove Startup Loader: It takes cache id and server as input parameters and remove startup loader from specified cache on all registered nodes.
    8. Remove Compact Types: It takes cache id, server and class as input parameters and remove specified compact type from cache on all registered nodes.
    9. Remove Query Index: It takes cache id, server and class name/attribute(s) as input parameters and remove specified query index from cache on all registered nodes.
    10. Add Data Share: It takes a configuration file containing data sharing configuration (mapping between 2 assemblies/jar files), cache id, server and dependent assembly folder as input parameters.
    11. Remove Data Share: It takes cache id and server as input parameters and remove data sharing type from cache on all registered nodes.
    12. Get Cache Configuration: It takes cache id, server and path (where file containing cache setting should be created) as input parameters. This tool will generate only cache settings (environment independent settings) in a file named as cache id on specified path.
    13. Deploy Assembly: It takes cache id, server and assembly/folder path as input parameters. Specified assembly will be deployed on all registered servers of cache. If folder path is specified, then all assemblies in that folder will be deployed.
  45. Memcached Wrapper for NCache:
  46. Existing Memcached users can now switch to NCache without code change. There are two ways to replace memcached with NCache:

    1. Memcached Gateway
    2. This gateway is installed on client and server boxes as a windows service. It is an implementation of memcached protocol which wraps the NCache calls inside it. This way, all API calls from memcached clients are routed to NCache servers via this gateway. Only configuration changes are required in this approach.
    3. Memcached Plug-In
    4. Some of the open source client implementations for memcached are modified to work with NCache servers while keeping their API as is. The source and binaries of these implementations are shipped with NCache installation.

    Following memcached client implementations are supported in this approach:

    • Enyim
    • BeIT
    • NET Memcached Client Library
  47. NHibernate Integration:
  48. NHibernate integration is written from scratch to remove the limitations of previous implementation. Following are the few enhancements made in new implementation:

    • There is only one configuration file for all NHibernate applications.
    • Settings can now be configured at region level. Each class in that region will use these settings.
    • Clearing on region now clears only the entries residing in that particular region.
  49. ASP.NET OutputCacheProvider Hooks:
  50. 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.

  51. Tagging of Cached Items
  52. 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.

Signup for monthly email newsletter to get latest updates.

Contact Us


+1 (214) 764-6933 (US)

+44 20 7993 8327 (UK)

© Copyright Alachisoft 2002 - . All rights reserved.