Tuesday, May 14, 2019
NCache 5.0 contains a few important features related to clustering and caching. The release also contains major performance improvements. NCache 5.0 is a recommended upgrade for all NCache users.
Following are some enhancements made in this release:
NCache API has been refactored to make it simpler and easy to use by reducing the number of overloads to various methods. The new API is also using the latest features of C# and .NET Framework (Task Parallel Library, async methods, and generics).
Following enhancements are made to the NCache messaging framework.
However, for durable subscriptions (named subscriptions), messages are stored until they are pushed to ALL or ANY subscribers within that subscription. If a durable subscriber comes back after an abrupt disconnection (leaving without calling Unsubscribe), it will be able to receive the messages published during the time it was down.
However, messages are removed from store after their expiry even if they are not delivered to ALL or ANY subscribers.
There are further two policies in Durable Subscriptions.
-Shared, where there can be multiple subscribers in a subscription.
-Exclusive, where then can be only one subscriber at a time in a subscription. All non-durable subscriptions are Exclusive.
Some major performance improvements are made in this release. Core sub-systems are redesigned to gain better performance of cache operations. Some of these improvements include the incorporation of the latest libraries like System.IO.Pipelines from Microsoft. System.IO.Pipelines is a new library that is designed to make it easier to do high-performance IO in .NET.
All NCache events now internally use the more reliable NCache’s Pub/Sub framework. Following types are events are now based on Pub/Sub.
NCache’s SQL is enhanced now to have projections as well as FROM clause in an SQL statement. Previously, there were no projections in the SQL statement and as a result, complete cache items were returned matching the given criteria.
Support to search cache items by their ‘Group’ through SQL is provided. Using this feature, users can query cache to return cache items against a ‘Group’ just like they do it for ‘Tags’.
Traditionally NCache stores items in the cache as Binary data. Binary serialization can be expensive in terms of both time as well as the memory it consumes. In NCache 5.0, users can optionally configure Cache to have JSON serialized store. JSON serialization is efficient in most cases.
NCache now has distributed data types and data structures provided as implementations of .NET’s interfaces. Following implementations are provided.
System.Collections.Generic.IList<T>
. It allows duplicate keys and preserves their order.System.Collections.Generic.ICollection<T>
. It does not allow duplicate keys and does not preserve order. DistributedHashSet has additional methods for Union, Intersection, and Difference of two sets.System.Collections.Generic.IDictionary<TKey, TValue>
. It lets users store data in key-value pairs. Order is not preserved in this data structure.System.Collections.Generic.ICollection<T>
. However, data stored in this data structure is consumed in the FIFO model, as it is in the case of Queues.Stopping a server node in maintenance mode causes the redistribution of data between the remaining nodes. This can take a lot of time depending on the data in the cache. During this time, the cache is in a vulnerable state and some operations might fail or take longer to execute.
With this new feature, when a node is stopped for maintenance, the data in the cache is not redistributed. The feature is useful when a node in the cluster is stopped for a short time to apply patches or other maintenance work.
Location affinity means keeping the related cache items on one node. This feature can be helpful in many ways like faster queries and bulk operations etc.
Lucene.NET is a text searching engine library but it's not distributed. With NCache’s Lucene.NET SDK, users will be able to build distributed Lucene indexes and query them. NCache’s Lucene.NET SDK is similar to Lucene.NET library, therefore, users don’t have to learn much to use NCache’s DistributedLucene.NET API.
. NET Core based NCache Server will be available on Windows too. Previously, it was only available on Linux.
This is a new licensing scheme where licenses are only activated on cache servers. However, cache servers are also activated to allow a certain number of clients to connect with caches. The number of server and client licenses required is the same as in Client-Server activation scheme.
NCache configuration, management, and monitoring are done through a web-based application. By default, this application is installed on all cache servers and clients. Users can connect with any of the servers from their browsers to manage their cache clusters.
The application is ASP.NET Core based and therefore, can run on Windows as well as Linux. This application has all the features as the Desktop based NCache Manager had. Desktop-based NCache Manager and Monitor are discontinued.
Following few Powershell commands are added;
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.