{"id":21430144,"url":"https://github.com/cuba-platform/cuba-zk","last_synced_at":"2025-07-14T11:31:14.730Z","repository":{"id":37752432,"uuid":"88536078","full_name":"cuba-platform/cuba-zk","owner":"cuba-platform","description":"Application component for coordinating CUBA cluster using ZooKeeper","archived":false,"fork":false,"pushed_at":"2020-05-06T07:36:31.000Z","size":150,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-15T02:04:36.385Z","etag":null,"topics":["cluster","cuba-component","cuba-platform","zookeeper"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuba-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-17T18:10:11.000Z","updated_at":"2023-07-26T07:26:47.000Z","dependencies_parsed_at":"2022-09-20T05:26:51.089Z","dependency_job_id":null,"html_url":"https://github.com/cuba-platform/cuba-zk","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fcuba-zk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fcuba-zk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fcuba-zk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fcuba-zk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuba-platform","download_url":"https://codeload.github.com/cuba-platform/cuba-zk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225972030,"owners_count":17553574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","cuba-component","cuba-platform","zookeeper"],"created_at":"2024-11-22T22:20:59.227Z","updated_at":"2024-11-22T22:21:00.421Z","avatar_url":"https://github.com/cuba-platform.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUBA ZooKeeper Integration Add-on\n\n## Overview\n\nThe add-on is designed for coordinating CUBA cluster using [ZooKeeper](https://zookeeper.apache.org/).\n\nStandard 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.\n\nThe 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.\n\n## Installation\n\nThe 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.\nAlso, you can install the add-on by coordinates choosing the required version of the add-on from the table.\n\nIn 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](https://doc.cuba-platform.com/manual-latest/manual.html#app_components_usage).\n\n### From the Marketplace\n\n1. Open your application in CUBA Studio. Check the latest version of CUBA Studio on the [CUBA Platform site](https://www.cuba-platform.com/download/previous-studio/).\n2. Go to *CUBA -\u003e Marketplace* in the main menu.\n\n ![marketplace](img/marketplace.png)\n\n3. Find the *ZooKeeper* add-on there.\n\n ![addons](img/addons.png)\n\n4. Click *Install* and apply the changes.\nThe add-on corresponding to the used platform version will be installed.\n\n### By coordinates\n\n1. Open your application in CUBA Studio. Check the latest version of CUBA Studio on the [CUBA Platform site](https://www.cuba-platform.com/download/previous-studio/).\n2. Go to *CUBA -\u003e Marketplace* in the main menu.\n3. Click the icon in the upper-right corner.\n\n ![by-coordinates](img/by-coordinates.png)\n\n4. Paste the add-on coordinates in the corresponding field as follows:\n\n `com.haulmont.addon.zookeeper:cubazk-global:\u003cadd-on version\u003e`\n\n where `\u003cadd-on version\u003e` is compatible with the used version of the CUBA platform.\n\n | Platform Version | Add-on Version |\n|------------------|----------------|\n| 7.1.x            | 1.7.0          |\n| 7.0.x            | 1.6.0          |\n| 6.10.x           | 1.5.0          |\n| 6.9.x            | 1.4.0          |\n| 6.8.x            | 1.3.1          |\n| 6.7.x            | 1.2.0          |\n| 6.6.x            | 1.1.0          |\n| 6.5.x            | 1.0.0          |\n\n5. Click *Install* and apply the changes. The add-on will be installed to your project.\n\n## Usage\n\nLaunch ZooKeeper on your network. Further, it is assumed that the ZooKeeper address is `192.168.0.1:2181`.\n\nConfigure 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.\n\n### Configuring Middleware Servers\n\n* Set up `cuba.webHostName`, `cuba.webPort`, `cuba.webContextName` application properties to form a unique [Server ID](https://doc.cuba-platform.com/manual-latest) for each middleware block.\n\n* Set the following application properties for work in cluster:\n\n        # Turn on cluster communication\n        cuba.cluster.enabled = true\n\n        # Use ZooKeeper for inter-server discovery\n        cuba.cluster.jgroupsConfig = jgroups_zk.xml\n\n        # Specify the address of the current server\n        jgroups.bind_addr = 192.168.0.10\n\n        # Specify ZooKeeper address\n        jgroups.zkping.connection = 192.168.0.1:2181\n\n### Configuring Web Client Blocks\n\n* Set the following application properties to connect to the middleware cluster:\n\n        # Use remote invocation\n        cuba.useLocalServiceInvocation = false\n\n        # Specify ZooKeeper address\n        cubazk.connection = 192.168.0.1:2181\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuba-platform%2Fcuba-zk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuba-platform%2Fcuba-zk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuba-platform%2Fcuba-zk/lists"}