Introduction to NCache Playground

Overview

Hi, this is Iqbal Khan. I am a Technology Evangelist at Alachisoft. Today I'm going to give you a quick walk through of NCache Playground. NCache Playground is an online working copy of NCache that you can use from your browser. You do not have to download and, install NCache on multiple servers and, you don't have to configure those caches to use them, instead everything is there preconfigured for you. And, the Playground comes with the NCache Management Center, both management and monitoring tools and also .NET and Java samples.

The goal of the NCache Playground is to give you a very quick and easy access to a working copy of NCache so, you can play with it without spending a lot of time setting things up. So that you can quickly see how powerful NCache really is for your .NET and Java applications. So, let's get started. If you come to our website you can press this Try Playground button or from any menu pick this Try Playground. It gives you two options, the basic and the sandbox option. I will pick the sandbox option because that's where I get the 2-Node NCache Cluster and, also the Management Center tools with the management and monitoring tools and, also both .NET and Java samples. That's going to give me pretty much access to majority of the important NCache features, not all but majority.

Start a Sandbox Session

There is no registration required to use NCache Playground at this time but you do have to login by copy pasting this dynamically generated username and password. The goal here is to make sure that you're a human and not a robot using Playground. As you can see there's a 30-minute session that is started for you.

NCache Manager

So, here are the NCache Management Center tools that you can start. Let me just start NCache manager first. NCache manager is the tool with which you can create caches, change cach configurations. There's a "demoCache" that is already created and configured for you and it's already running on a 2-node cluster. It's a partition replica caching topology with asynchronous replication. That's our most popular topologies please do read on the topologies in the NCache architecture page.

Management Center

This is a fully working tool that you have inside NCache Playground. This is exactly the same tool that you'll get when you install NCache. For example, you can come here and create a new cache if you want, I'm not going to do that but you can do that. And, obviously you can start and stop caches, you can monitor caches and, everything.

NCache Monitor

Okay, so the next tool is the NCache monitor tool. This is a very easy to use graphical dashboarding style monitoring tool that lets you monitor a really large set of counters or metrics for NCache, both on the server dashboard and on the client dashboard. And, you can also create your own custom dashboards. NCache monitor also comes with a stress test tool that lets you simulate some stress.

Just to make sure that everything is working properly I'm just going to start a one minute stress here and, there's a third tool called NCache statistics, that essentially shows you the same stuff in a more tabular form. So, for example, right now this stress test tool that I've started is doing about 1600, 1700 requests per second on per server so, about 3200 to 3500 requests per second on this cluster. Obviously as you add more clients and more load, this will increase, you haven't maxed out the capacity. So, those are the the NCache management and monitoring tools. You can obviously play with them more.

Sample Programs

.NET Sample Programs

The other part of the NCache Playground is the sample program. There is .NET and Java samples. I'm going to go into .NET first. I'll show you both .NET and Java. Let me minimize this. So, there are eight .NET samples provided with the Playground. There is the Basic Caching Operations, the Cache Item Locking, you can Group Cache Data based on Tags. You can use the EF Core Resultset Caching. You can use SQL Query. You can use EF Core LINQ Query. You can use Data Structures and, you can use Pub Sub Messaging. You can also, for example, take any sample and you can just say 'Run'. And, it is going to just successfully run it and, you can see that the counters just will take a jump because some activity happen. You can also, for example, I'm going to come to the EF Core sample here. This sample uses an SQLite in-memory database. Obviously in real life you will use your own database but, you know, this is is a very lightweight database. It was good for Playground so that's why we are using it. And, I can also change the sample code for example I'm going to put my name here and I want to do 'Compile & Run' instead of just 'Run'. So, this is going to compile this code and run it. And, you can see that now it has just run the EF core sample. And, you can see that the activity is just jumped up slightly.

.NET Sample Programs

Now if I were to go from EF Core sample to, let's say, another sample and come back here, it remembers my code changes. But, keep in mind it remembers only if you've at least done 'Compile & Run' once then it it remembers, otherwise it doesn't remember the code changes. But, let's say, if I don't like the code changes I want to go back to the factory default in terms of the samples that came I'm just going to say 'Reset Code' and that automatically resets the code to whatever it came.

Java Sample Programs

The other part is that you can go into the Java samples. Java samples are also eight samples just like .NET except there are two of them that are Java specific. Instead of having EF Core Resultset Caching it does 'Hibernate Caching' and instead of doing EF Core LINQ Query caching it does 'Spring Data Caching'. Otherwise, all the other samples are the same. And, I am going to go to the 'Hibernate Caching' since hibernate is a very popular way of using this. And, I am going to also, let's say, I'm going to put my name here, let me just say, 'IQBAL2' just to be different and, I will say 'Compile & Run' and, you'll see that it's going to compile this code and when it runs it it's going to have 'IQBAL2' right here. 'IQBAL2' is right here and, I can do that and, if I come to another sample, let's say, if I go to 'Spring Data Caching' because this Spring Data Caching is using annotations right here to do the @CachePut and everything. So, if I go from here come back to 'Hibernate' it remembers my code change. But, if I now come here and do 'Reset' it just resets it.

Java Sample Programs

So, you can see it has both Java and .NET samples. The nice thing about sample is that you can put your own code here, you can change this code and, test NCache anyway you like. The only limitation is it's not a very big program so, the purpose is not to do a full-blown proof of concept here but to just play with NCache's all the features so, that you become comfortable with them. And, the best way to start is to use the samples that we have. And, as I said there are eight samples in .NET and eight in Java. And, we are adding more samples as we speak. So, we are going to add more samples. So, it's going to be a more coverage of samples.

So, this is a quick overview of the NCache Playground. Please, just go ahead and try it yourself. It is really easy and you'll really like it. Thank you very much.

Signup for monthly email newsletter to get latest updates.

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