Create Development Clusters with the Coherence CLI

Just released, the latest version of the Coherence CLI allows you to create and start a development cluster with just a few key-strokes!

The Coherence CLI was initially released in January 2022 and allows you to manage and monitor Coherence clusters from a command line. Over the last 8 months or so we have added news features and functionality to the CLI.

With the latest release (1.4.2), we have added a new experimental feature which allows you to easily create, start and managed local development clusters. See the original Medium post. Once you have created the clusters, you can manage and monitor them using the CLI.

Pre-Requisites

You must have the following installed to use the CLI.

Creating a Cluster

To create a cluster with the name my-cluster, issue the following:

$ cohctl create cluster my-cluster

Cluster name:         my-cluster
Cluster version:      22.09
Cluster port:         7574
Management port:      30000
Replica count:        3
Initial memory:       512m
Persistence mode:     on-demand
Group ID:             com.oracle.coherence.ce
Additional artifacts: 
Startup Profile:      
Dependency Tool:      mvn
Are you sure you want to create the cluster with the above details? (y/n) 

Once you confirm this operation, the CLI will download the required dependencies using Maven and configure and start the cluster.

Checking 3 Maven dependencies...
- com.oracle.coherence.ce:coherence:22.09
- com.oracle.coherence.ce:coherence-json:22.09
- org.jline:jline:3.20.0
Starting 3 cluster members for cluster my-cluster
Starting cluster member storage-0...
Starting cluster member storage-1...
Starting cluster member storage-2...
Current context is now my-cluster
Cluster added and started

Note: The cluster created is scoped to the local machine by using the loopback address for the cluster address.

Displaying the Members

You can issue the following command to display the members in the created clusters:

$ cohctl get members

Scaling the Cluster

You can scale the cluster to 6 members by using the following:

$ cohctl scale cluster my-cluster -r 6

Exploring More Commands

Once your cluster is up and running, you can manage monitor and work with the cluster using the vast number of CLI commands, a few of which are included below:

  • Start the Coherence console against the newly created cluster – cohctl start console
  • Start CohQL – cohctl start cohql
  • Display services – cohctl get services
  • Display caches – cohctl get caches
  • Show the cluster information – cohctl describe cluster my-cluster
  • Retrieve Thread Dumps – cohctl retrieve thread-dumps
  • Display Coherence Reporters – cohctl get reporters
  • Display Persistence information – cohctl get persistence

There are many more commands available for monitoring and managing Coherence clusters, both manually created development clusters and your production clusters.

For an extensive list of these commands, see the online command reference.

Next Steps

This is only a short introduction to the new features of the CLI. If you would like to know more information, see the following resources:

Enjoy!

Advertisement
Posted in Uncategorized | Tagged , , , | Leave a comment

Coherence Guides and Tutorials now on GitHub

With the latest release of Coherence CE 22.06 and Coherence Feature Pack 14.1.1.2206, the guides and tutorials have now been moved to GitHub. By doing this, it has made it much easier for us to get new examples out to the community to show the breadth and depth of the Coherence features.

The guides and tutorials are a great way to learn about and see Coherence features in action.

Below is a list of some of the examples available. More and more are being added, so make sure to check back.

  • Bootstrap Coherence – walks you through various methods to configure and bootstrap a Coherence instance
  • Querying Caches – walks you through the basic concepts of querying Coherence caches
  • Built-in Aggregators – walks you through how to use built-in aggregators within Coherence
  • Custom Aggregators – walks you through how to create custom aggregators within Coherence
  • Views – Learn about the basic concepts of working with views using the ContinuousQueryCache
  • Streams – walks you through how to use the Streams API with Coherence
  • Entry Processors – walks you through how to use Entry Processors with Coherence
  • Federation – walks you through how to use Federation within Coherence
  • Topics – walks you through how to use Topics within Coherence
  • Near Caching – walks you through how to use near caching within Coherence
  • Client Events – walks you through how to use client events within Coherence
  • Server-Side Events – walks you through how to use server-side events within Coherence
  • Cache Stores – walks you through how to use and configure Cache Stores
  • Securing With SSL – walks you through how to secure Coherence using SSL/TLS
  • Key Association – walks you through a use case for key association in Coherence
  • Multi-Cluster Client – An example of how to connect an Extend or gRPC client to multiple Coherence clusters
  • GraphQL – walks through the steps to enable access to Coherence data from GraphQL
  • Persistence – walks through Coherence Persistence by using Coherence Query Language (CohQL) to create, recover and manage snapshots, monitor snapshot operations

Other Resources

Enjoy!

Posted in Examples | Tagged , , , , | Leave a comment

Two new Coherence Releases Available Now!

Introduction

Well, its been a while since I last posted. The reason being that we have been flat out preparing two new Coherence releases!

  • Coherence Community Edition (CE) 22.06; and
  • Oracle Coherence Commercial 14.1.1.2206 Feature Pack
New Coherence Versions!

Firstly, Coherence CE is a continuation of the great work of our Open Source edition of Coherence over the last couple of years.

The even bigger news is the release of the Oracle Coherence 14.1.1.2206 Feature Pack, which now makes all the new features included in Coherence CE over the last two years available for Enterprise and Grid Edition commercial customers!

This Feature Pack patch can be applied to a Standalone or Weblogic Server version 14.1.1.0.0 release to allow you to use all the new features.

Note: You must used JDK 11 or above with the new Coherence releases.

New Features and Improvements

You can refer to the official blog post below to see the full list of new features, but I have included a few of my favourite here:

Core Improvements

There has been many core improvements, a few of which I have included below:

  • The new Bootstrap API enables you to configure and start a Coherence application by building a com.tangol.net.Coherence instance and starting this instance. This is now the preferred way to start Coherence members.
  •  The Coherence Repository API provides you with a higher-level, DDD-friendly way to access data managed in Coherence
  • Similar to the Coherence Cluster override, you can now specify a cache configuration override to override elements of existing cache configuration with new elements at runtime.
  • You can now run Coherence using Java modules.
  • This release introduces Portable Types, which provide a way to add support for POF serialization to your classes by using annotations and without the requirement to implement serialization code by hand.
  • Persistent Backups – You can now enable and configure persistent backups which stores backup partitions on a disk, as additional copies of persisted primary one.
  • Distributed Concurrency – The Coherence Concurrent module provides distributed implementations of the concurrency primitives from the java.util.concurrent package such as executors, atomics, locks, semaphores, and latches.

Microservices and Open Source Integrations

The microservice and open source integrations that have been available to Coherence CE users are now available to commercial customers. These include Helidon support, CDI, Microprofile, Spring, Micronaut, GraphQL and many more.

This release of Coherence introduces the ability to use gRPC to access Coherence caches.

Management/ Administrations Improvements

There are many management and administration improvements including:

  • A new health check API to enable application code to determine the health of the local Coherence member.
  • The dependencies required to enable Management over REST have been reduced significantly. The only additional dependency required to enable management over REST is coherence-json.jar.
  • New Reports – Executor, View, Storage, and Proxy Connections.
  • Additional dependencies are no longer required when using the coherence-metrics module.
  • The coherence-micrometer module provides integration between Coherence metrics and Micrometer allowing Coherence metrics to be published through any of the Micrometer registries.

Conclusion

There are too many new features to include them all there, but suffice to say this is an exciting new release for both Commercial and Community Edition customers.

Look out for some more posts on the upcoming Coherence VisualVM Plugin and Coherence CLI releases that support the above new features!

Enjoy!

More Information

Posted in News | Tagged , , , , | Leave a comment

10 Years of Coherence Down Under!

Can’t believe it has been 10 years since my first post on Coherence Down Under!

10 Years of Coherence Down Under

Over that time there have been so many exciting features and changes to Coherence. There are too many to list all of them but here are a few highlights we have covered here:

Hope you have enjoyed the posts and information. Keep your eye out for many more exciting and informative articles.

Enjoy!

Posted in News | Tagged , | Leave a comment

Introducing the Coherence CLI

We are exciting to announce the availability of the Coherence Command Line Interface, or CLI!

The Coherence CLI orcohctl, is a lightweight tool, in the tradition of tools such as kubectl, which can be scripted or used interactively to manage and monitor Coherence clusters. You can use cohctl to view all cluster information such as clusters, machines, members, services, caches, federation, persistence and much more, as well as perform various management operations against clusters.

Coherence CLI Overview

The CLI is a great tool to augment your existing Coherence management and monitoring toolkit, especially when you want to do this via a lightweight terminal interface.

Here are a few resources to get you started:

Enjoy!

Posted in Uncategorized | Tagged , , , | Leave a comment

Announcing Coherence CE 21.12

Happy New Year to all!

The Coherence team is excited to announce the latest release of Coherence Community Edition (CE) 21.12. You can read in detail the announcement on Medium here but i’ll outline a few of my favourite new features below.

Coherence Concurrent

The new coherence-concurrent module contains Coherence-backed implementations of components from the java.util.concurrent package such as executors, semaphores, locks, atomics and latches.

The Coherence documentation has full details on all the new features with examples on how to use them.

Partition Backup Enhancements

You now have the ability to specify Coherence to read from a backup copy rather than the primary, which is the default. This can help to improve data access times if applications can tolerate potentially stale reads.

By default backups are synchronous meaning you have the guarantee of data integrity once a mutation operation is complete. We have been able to otpimize performance at the reduction of data integrity by configuring async-backups and now we have the ability to schedule backups to further optimize the process.

You can see all the information on the new enhancements in Coherence 21.12 documentation.

New Coherence VisualVM Plugin Release

To coincide with the 21.21 release, an updated version (1.2.0) of the Coherence VisualVM Plugin has also been released. This has support for the new Executor service plus a number of addition enhancements.

Coherence VisualVM Plugin – Executor Tab

You can see more information on the Plugin on the GitHub repository here – https://github.com/oracle/coherence-visualvm/releases/tag/1.2.0.

More Inforation

You can check out the following links for more information on the above

Enjoy!

Posted in New Features, News | Tagged , , , | Leave a comment

Exploring Coherence Open Source Projects

As we near the end of 2021, the Coherence team is working hard on the latest 6 monthly release of Coherence Community Edition (CE) – 21.12. Can’t say too much about the contents, but safe to say that there are some pretty exciting features coming out, so stay tuned!

I’ll leave the detail on 21.12 for a post in the new year, but in the meantime I’d like to outline some of the other great Open Source projects you can explore and possibly utilize in your Coherence ecosystem.

I’ve broken down the projects into categories below:

Clients

JavaScript – https://github.com/oracle/coherence-js-client

Coherence JavaScript Client allows Node applications to act as cache clients to a Coherence Cluster using gRPC framework as the network transport.

C++ – https://github.com/oracle/coherence-cpp-extend-client

Coherence C++ Client allows C++ applications to access Coherence clustered services, including data, data events, and data processing from outside the Coherence cluster.

.NET – https://github.com/oracle/coherence-dotnet-extend-client

Coherence .NET Client allows .NET applications to access Coherence clustered services, including data, data events, and data processing from outside the Coherence cluster.

Note: Coherence CE also includes native support for REST and gRPC based clients as well as support for GraphQL via integration with Helidon.

Management

Coherence Operator – https://github.com/oracle/coherence-operator

The Coherence Kubernetes Operator allows management of Coherence clusters in Kubernetes making tasks such as configuration, installation, safe scaling, management and metrics easier.

Coherence VisualVM Plugin – https://github.com/oracle/coherence-visualvm

The Coherence-VisualVM Plugin provides management and monitoring of a single Coherence cluster using the VisualVM management utility.

Integrations

Spring – https://github.com/coherence-community/coherence-spring

The Coherence Spring project provides bootstrapping support of Oracle Coherence for Spring Framework and Spring Boot.

Micronaut – https://github.com/micronaut-projects/micronaut-coherence/

The Micronaut project provides integrations between Micronaut and Oracle Coherence.

Hibernate – https://github.com/coherence-community/coherence-hibernate

The Oracle Coherence Hibernate project implements integration points between Coherence/Coherence CE and the Hibernate Object/Relational Mapping (ORM) framework.

Development Tools

Oracle Bedrock – https://github.com/coherence-community/oracle-bedrock

Oracle Bedrock provides a general purpose Java framework for the development, orchestration and testing of highly concurrent distributed applications.

Coherence Eclipse Plugin – https://github.com/oracle/coherence-eclipse-plugin/

This plugin provides various features to help developer productivity when working with Coherence in Eclipse.

Coherence Idea Plugin – https://github.com/oracle/coherence-idea-plugin

This plugin adds features to IntelliJ to assist in development of applications using Oracle Coherence.

Hope this gives you a taste of some of the Open Source projects available in the Coherence ecosystem. Keep your eyes peeled for some exciting announcements on Coherence CE and some new Coherence projects coming in the new year!

As always stay up to date with Coherence on our Coherence Community site.

Happy Holidays!

Posted in News | Tagged , , , , , , , , | Leave a comment

Medium Post: Monitoring Clusters During Rolling Restarts

We have just published a post on Medium on how to monitor rolling restarts of Coherence clusters using a new example just released in the latest SNAPSHOT build of Coherence CE.

Carrying out a rolling restart to apply application changes or patches to a cluster is a common way to eliminate downtime for Coherence applications. As part of this process, as described in the documentation, checking StatusHA of partitioned services is essential to ensure that services have rebalanced all the data and are in a safe state to continue before the next cluster member is restarted.

View the Medium post for the full article which includes step-by-step instructions on how to use the example which can be found here.

Enjoy!

Posted in Examples | Tagged , , | Leave a comment

Coherence VisualVM Plugin 1.1.0 Released

We are pleased to announce the latest release of Coherence VisualVM Plugin which includes updated support for Coherence CE 21.06 including following additional features:

  • A new experimental option allowing you to analyze log files that have been created from cache servers using the new “Partition Events Logging” feature. This capability, introduced in Coherence CE 21.06, creates additional logging to identify times that partitions are unavailable to to events such as index builds, partition transfers and persistence events.
  • In Coherence CE 21.06, new index related JMX attributes have been added to the StorageManager MBean and you can now view them in the VisualVM Plugin in the Cache Storage tab.
  • Various other minor improvements and bug fixes
Partition Logging Analysis

Please see the Original Medium Post or visit the Coherence VisualVM release page.

Enjoy!

Posted in News | Tagged , , | Leave a comment

Coherence Community Edition 21.06 Released!

While I was on my two week road trip up the North of Western Australia, Coherence CE 21.06 was released!

On our road trip up north of Western Australia

My holiday was great, but now I’m back at work, I’d like to share some exciting new features introduced in the Coherence CE 21.06 release. The full list is available at the Coherence CE release page, but I have included a few of these below:

  • The Repository API
  • Durable Events (Experimental)
  • Topics Improvements
  • Partition Event Logging
  • Non-Blocking Entry Stores

Repository API

This new higher-level API for Coherence implements the Repository Pattern and provides Domain Driven Design (DDD) friendly way of accessing Coherence on top of the NameMap API.

Below is a simple example of a CustomerRepository:

public static class CustomerRepository 
        extends AbstractRepository<Integer, Customer> {

        private NamedMap<Integer, Customer> customers;

        public CustomerRepository(NamedMap<Integer, Customer> customers) {
            this.customers = customers;
        }

        @Override
        protected NamedMap<Integer, Customer> getMap() {
            return customers;
        }

        @Override
        protected Integer getId(Customer customer) {
            return customer.getId();
        }

        @Override
        protected Class<? extends Customer> getEntityType() {
            return Customer.class;
        }
    }

To use this, with Coherence we can do the following:

CustomerRepository customers = new
    CustomerRepository(Session.create().getMap("customers"));

// create a new customer
customers.save(new Customer(1, "Tim", "Address", Customer.GOLD, 1000));

// find the customer
Customer c = customers.get(1);

// update the customer address
customers.update(1, Customer::setAddress, "New Address");

There is so much more you can do with the Repository API, including, but not limited to: searching, aggregations, streaming and integration with our Spring and Micronaut implementations.

There is also an Async implementation of the API as well and it it works nicely with standard Java applications as well as applications that use CDI. As Aleks Seovic mentioned in his Medium post:

“The Repository API was introduced to make the implementation of data access layer within the applications easier, regardless of which framework you use to implement applications that use Coherence as a data store.”

Original Medium Post

See the full documentation here.

Durable Events (Experimental)

This new experimental feature extends the Coherence events features so you never lose an events if your client has disconnected and re-connects, allowing clients to keep track of event versions and request replay of events

See the Durable Events documentation and sample guide here.

Topics Improvements

There has been some significant changes to the Coherence Topics feature to support explicit client acknowledgements. You can browse the documentation here.

Partition Events Logging

This new feature allows you to get more information on when and for how long partitions may be blocked due to partition transfer, restore or any other reason. There is extensive documentation on how to enable and understand the messages here.

Non-Blocking Entry Stores

Coherence provides a means of integrating with underlying data sources using a number of existing strategies; namely, read-through, write-through, write-behind and refresh-ahead. Coherence now also provides a NonBlockingEntryStore interface for integrating with data sources that provide non-blocking APIs.

This new strategy is similar in nature to write-behind, as it is asynchronous to the original mutation, however does not require a queue to defer the call to the store and immediately passes the intent to store to the implementer. The implementer can in-turn immediately call the non-blocking api of the data source and on success or failure a future can pass that information to the provided StoreObserver via onNext or onError respectively.

Resources

Enjoy!

Posted in New Features | Tagged , , , , , | Leave a comment