What's New in NCache 5.3?

What's New in v5.3 SP1?

Following new features are provided in NCache v5.3 SP1.

What's New in v5.3?

Following new features are provided in NCache v5.3.

 

Registration of Evaluation through NCache Web Manager

For NCache images available on Azure and AWS, the registration for free evaluation of NCache is supported in NCache Web Manager. When a machine is not registered either with evaluation or a license key, the NCache Web Manager’s default screen takes users to a registration process to either start their evaluation or activate their boxes.

 

Renaming of NCache NoSQL to NCache Persistence

The feature 'NCache NoSQL' released in 5.3 has been renamed to 'NCache Persistence'. The working of the feature remains the same, however, the additional providers are removed. The NCache Persistence can now only be used with the built-in file system based store.

All NoSQL related PowerShell cmdlets have also been renamed.

 

Separate NuGet Package for NCache CLR Store Procedures

A separate NuGet Package is released for NCache CLR Stored Procedures. This helps in easily creating CLR Stored Procedures that use NCache API.

 

Support for Connection Options in NCache SignalR Backplane

Instead of using configurations specified in client.ncconf, users can force SignalR applications to use the connection options specified in web.config or appsettings.json files of the application. If specified, the application will use these settings.

 

Refresh Interval Value Changed from Minutes to Seconds

The refresh interval value can now be set in seconds instead of minutes. The change has been made to accommodate scenarios where refresher should run at an interval of less than a minute.

 

NoSQL Database (In-Memory with Persistence)

NCache is providing a new feature called NoSQL Database where the entire database is In-Memory and distributed but it is also persisted to a permanent storage in real-time (unlike other products that take a periodic snapshot or persist only a transaction log). This real-time persistence ensures that your In-Memory data is always in sync and never lost even when you restart all the NCache servers.

NCache NoSQL Database is super-fast and scalable because it is 100% In-Memory and distributed. At the same time, NCache NoSQL Database persists data just like all other databases so you don’t lose any data even if all NCache servers are brought down.

You can choose to persist you NoSQL Database in NCache Persistence that super-fast and very reliable. Or, if you prefer, you can persist the NoSQL Database in one of the leading third-party databases. NCache provides the following real-time persistence options For NoSQL Database:

  • NCache Persistence Provider: the default option. NCache uses LiteDB based file persistence in a shared network location (UNC Path). You can choose SSD / HDD, NAS / SAN, or Cloud storage based as your preference.
  • SQL Server Provider: all the data is stored in an SQL Server database. Since writes are usually less than 20% of operations while 80% are reads, saving data in SQL Server still keeps your application superfast and with linear scalability.
  • MongoDB Provider: all the data is stored in a MongoDB database. Since reads are 80% of the time and they’re all In-Memory, your application is much faster than if you accessed MongoDB directly.
  • Oracle / Cosmos DB / Others (coming soon): we’ll provide more third-party database storage options very soon as the NCache NoSQL Database storage architecture is provider based.

You can use NCache NoSQL Database in the following ways:

  • Create New NoSQL Database: this creates the database with your storage option and also creates an In-Memory distributed copy of it.
  • Open Existing NoSQL Database: this uses an already created NoSQL Database and creates an In-Memory distributed copy of it.

NOTE: you can use this feature from .NET, Java, Node.js, and Python applications.

 

Distributed Lucene for .NET (Full Text Search)

NCache provides Distributed Lucene for .NET applications using Lucene for Full Text Search. Distributed Lucene takes the standard Lucene.NET index and makes it distributed so you can scale the Lucene index to multiple NCache servers even at runtime. This not only allows you to increase your index size but also your application transaction capacity because your application now talks to multiple NCache servers for Lucene.

Here are some highlights of Distributed Lucene feature:

  • No Code Change Required to Use: you don’t have change any code in your existing Lucene application for using Distributed Lucene. The standard Lucene.NET API is supported.
  • Lucene Index Distributed to Multiple NCache Servers: NCache distributes Lucene index and persists it to multiple NCache servers. Each server persists a portion of the entire index. NCache has modified its Partitioned Cache and Partition-Replica Cache topology to handle distributed persistence.
  • Add / Remove NCache Servers at Runtime: you can add or remove NCache servers at runtime. Each time you add a server, the existing Lucene index is further partitioned and a portion is copied to this newly added server. When you remove a server, its index is copied and merged to other remaining NCache servers.
  • Directed Partitioning (Not Auto): due to the fact the most Lucene indexes are quite large, if an NCache server goes down at runtime, the partitioning is not redone automatically like it is done for non-Lucene situations in NCache. However, if you explicitly add or remove NCache servers with NCache admin tools then partitions are created or deleted and Lucene index is either further partitioned and copied to the new NCache server or Lucene index from the NCache server being deleted is copied and merged to other partitions in the cluster.
  • Partitioned Cache / Partition-Replica Cache only: Distributed Lucene feature is available only on these two caching topologies. The reason for this is that other two caching topologies (Mirrored Cache / Replicated Cache) don’t add a lot of value to this feature.
 

Python Client

NCache now provides a powerful Python Client on both Windows and Linux. This Python client has all of client-side API features of NCache that traditionally .NET and Java clients enjoyed.

 

Import / Export for NoSQL Database

NCache provides Import and Export tools as PowerShell Cmdlets. With these tools, you can import or export JSON / CSV data into the NoSQL Database or out of it. This allows you to extract all or portions of your NoSQL database.

 

Backup / Restore NoSQL Database

If you have selected NCache Persistence Provider for NoSQL Database, then all the data is kept in multiple files located in a shared network folder (based on UNC path).

You can use regular filesystem backup / restore tools on this data. However, please note that NCache provides you an admin tool (as PowerShell Cmdlet) to briefly suspend NCache writes to persistent storage while you’re performing your filesystem backup. However, all writes are being made to the In-Memory distributed copy of the data and logged so when you’re done with your backup, you can turn on the writes to persistence storage. And, then all those writes are applied to the persistence storage in the same manner as if they were real-time.

Despite providing you an online backup mechanism, it is recommended that you select a low-traffic time to do the backups. In future, NCache will provide a fully Online Backup feature for NCache Persistence Provider of NoSQL Database where you can even continue doing writes during backup.

However, if you’ve selected SQL Server or MongoDB as your storage option then you can use the backup / restore tools provided by those databases including online backup.

 

Import Lucene Index

If you already have a .NET application using Lucene, the chances are that you might have a fairly large Lucene index built. NCache gives you the ability to import an existing Lucene index into NCache Distributed Lucene in a bulk manner.

This is much faster than recreating that index by reading documents from it and adding those documents to NCache Distributed Lucene index. The reason for this is that NCache Distributed Lucene copies data at bulk file level and not at document level.

You can do the following types of import of Lucene index.

  • Import existing Lucene Index into NCache: if you already have a Lucene index built, you can use NCache import tools to import it quickly into NCache Distribute Lucene. And, your index is copied at file level and not document level which is much faster.
  • Import existing Distributed Lucene Index: if you already have an NCache Distributed Lucene index and you want to import it into another location / environment, you can do so easily. The index is copied at bulk file level and not document level so it is very fast.

Both of the above Import Lucene index options are possible through PowerShell Cmdlets.

 

Backup / Restore Distributed Lucene Index

NCache partitions and saves Lucene index into a distributed environment and on each NCache server. And, all index is stored as multiple files. Therefore, you can use regular filesystem backup / restore tools on them. However, in the current version of NCache, online backup is not provided so you will need a downtime to ensure correct backup. But, if your application is not updating Distributed Lucene index at runtime then you can also do online backups.

Restoring a Distributed Lucene index is the same as restoring file system files and therefore possible. You can have to restart your cache with the same distribution configuration information that you had when you did the backup.

 

.NET 6.0 Support

NCache now fully supports .NET 6.0. All NCache Servers are compiled in .NET 6.0 (or .NET Framework 4.8 if you’ve downloaded that version). NCache clients are also .NET 6.0. However, NCache also provides support for earlier version of both .NET Core and .NET Framework for NCache clients.

 

JSON Serialized Sessions (ASP.NET / ASP.NET Core)

NCache now allows you to use JSON Serialization for your ASP.NET / ASP.NET Core sessions. Previously, the only option you had was to use Binary Serialization provided by .NET. We still have Binary Serialization option but in .NET 6.0, Binary Serialization is disabled by default and is not recommended.

JSON Serialization also has the advantage where your .NET objects are not marked "Serializable". Previously, you had to either make code changes to mark all objects "Serializable" or use Compact Serialization feature of NCache. In both cases, it required a lot of extra work for you.

With JSON Serialization, you only have to make configuration setting change and not touch the code at all and you can now start to use objects that are not serializable in ASP.NET / ASP.NET Core sessions.

 

SQL Query Index using Annotations

In order to include any object attribute in NCache SQL Queries, you must index it first. Previously, the only way to index was to define an index as part of NCache configuration. That is still possible and a good way to do this.

However, now you can define query indexes programmatically using custom annotations. With this, you now have full support of different ways of creating query index in NCache.

 

Nullable Support in SQL Queries

NCache now supports nullable properties for creating an index and then using them in SQL Queries. This feature is provided because .NET properties and fields are nullable. But, previously NCache did not provide support searching based on null values and now it does.

 

Geospatial Indexes for Distributed Lucene

NCache now supports Geospatial indexes in Full Text Searching with Distributed Lucene. Just like regular Full Text Search Lucene index, the Geospatial indexes also use Lucene.NET internally to support Geospatial queries. The NuGet package for Geospatial indexes is separate from the Full Text Search index NuGet package.

Faceted Search for Distributed Lucene

NCache now supports Faceted Search with Distributed Lucene. Faceted Search is a technique that involves augmenting traditional search techniques with a faceted navigation system. This allows the user to narrow down search results by applying multiple filters based on a faceted classification of the items.

NCache provides a NuGet Package for Faceted Search that has all the APIs required to perform Faceted searches.

 

Memory Optimizations for Faster Performance

Since .NET CLR uses Managed Memory, Garbage Collection and Fragmentation cause major performance issues in any high transaction server application. NCache solved this problem earlier by implementing very smart object pooling and also breaking up larger objects into less than 80K objects so LOH is not frequently used.

This earlier memory optimization had already improved NCache performance quite a bit for most commonly used "atomic operations" like Get, Insert, Update, Delete of individual items. However, a number of other areas like bulk operations, query indexes, SQL searching, etc. were not fully optimized in this manner and therefore resulted in frequent use of LOH and Gen2 collections and hence not the best performance.

Now, this version of NCache has optimized memory management in all these areas that has resulted in an even faster performance of NCache all around.

Following optimizations have been made:

  1. Object pooling in new areas to ensure that bigger objects are reused instead of leaving them to be collected by GC.
  2. Avoiding allocation on LOH in new areas.
  3. Using latest version of Protocol Buffers (Protobuf) that has much better performance
 

Support for https (NCache Web Manager)

NCache traditionally ran in an on-premises environment and therefore there wasn’t any need for using https to access NCache Web Manager. But, now with Azure, AWS, and other clouds becoming very prevalent, more and more situations are arising where a user may need to access NCache Web Manager thru https.

NCache now provides support for https for accessing NCache Web Manager. By default, it is http but you can configure it to use https if you have a certificate.

 

Support for Machine Names (NCache Web Manager)

NCache has traditionally required that you specify NCache servers based on their ip-address and not machine names. The reason behind this was that in many situations, NCache servers have multiple Network Interface Cards (NICs) and you didn’t know which NIC did the machine name map to. Therefore, using ip-address for NCache servers and clients is still the preferred way.

But, now NCache provides you the ability to specify machine names instead of ip-address if you wish. You are be able to specify machine name for adding a cache server or a cache client to the cache configuration. Similarly, all views on NCache Web Manager continue to use ip-addresses by default.

Signup for monthly email newsletter to get latest updates.

© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.