cuba-platform / cuba-zk

Application component for coordinating CUBA cluster using ZooKeeper
6 stars 1 forks source link
cluster cuba-component cuba-platform zookeeper

CUBA ZooKeeper Integration Add-on

Overview

The add-on is designed for coordinating CUBA cluster using ZooKeeper.

Standard CUBA implementation of service discovery assumes that there is a static fixed list of available middleware servers. This list must be provided both for inter-server communication mechanism based on JGroups and for clients connecting to the cluster.

The add-on allows cluster members and clients to communicate through a ZooKeeper instance or ensemble. It enables simple and uniform configuration of middleware and client blocks: they need only the ZooKeeper address to form the cluster and to connect to it. In other words, the add-on provides dynamic service discovery.

Installation

The add-on can be added to your project in one of the ways described below. Installation from the Marketplace is the simplest way. The last version of the add-on compatible with the used version of the platform will be installed. Also, you can install the add-on by coordinates choosing the required version of the add-on from the table.

In case you want to install the add-on by manual editing or by building from sources see the complete add-ons installation guide in CUBA Platform documentation.

From the Marketplace

  1. Open your application in CUBA Studio. Check the latest version of CUBA Studio on the CUBA Platform site.

  2. Go to CUBA -> Marketplace in the main menu.

    marketplace

  3. Find the ZooKeeper add-on there.

    addons

  4. Click Install and apply the changes. The add-on corresponding to the used platform version will be installed.

By coordinates

  1. Open your application in CUBA Studio. Check the latest version of CUBA Studio on the CUBA Platform site.

  2. Go to CUBA -> Marketplace in the main menu.

  3. Click the icon in the upper-right corner.

    by-coordinates

  4. Paste the add-on coordinates in the corresponding field as follows:

    com.haulmont.addon.zookeeper:cubazk-global:<add-on version>

    where <add-on version> is compatible with the used version of the CUBA platform.

    Platform Version Add-on Version
    7.1.x 1.7.0
    7.0.x 1.6.0
    6.10.x 1.5.0
    6.9.x 1.4.0
    6.8.x 1.3.1
    6.7.x 1.2.0
    6.6.x 1.1.0
    6.5.x 1.0.0
  5. Click Install and apply the changes. The add-on will be installed to your project.

Usage

Launch ZooKeeper on your network. Further, it is assumed that the ZooKeeper address is 192.168.0.1:2181.

Configure your middleware and client blocks using application properties as described below. You can specify default values of the properties in a project's app.properties file and later override them on the deployment stage with Java system properties for a particular server instance.

Configuring Middleware Servers

Configuring Web Client Blocks