Giter VIP home page Giter VIP logo

vertx-ignite's Introduction

Apache Ignite Cluster Manager for Vert.x

This is a cluster manager implementation for Vert.x that uses Apache Ignite.

Vert.x cluster manager is pluggable component. So you can replace default Vert.x cluster manager by this implementation.

How to use

If the jar is on your classpath then Vert.x will automatically detect this and use it as the cluster manager. Please make sure you don’t have any other cluster managers on your classpath or Vert.x might choose the wrong one.

Using Vert.x from command line

vertx-ignite-${version}.jar should be in the lib directory of the Vert.x installation.

Using Vert.x in Maven or Gradle project

Add a dependency to the artifact.

Maven:

<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-ignite</artifactId>
  <version>${version}</version>
</dependency>

Gradle:

io.vertx:vertx-ignite:${version}:jar

Programmatically specifying cluster manager

You can also specify the cluster manager programmatically. In order to do this just specify it on the options when you are creating your Vert.x instance, for example:

ClusterManager clusterManager = new IgniteClusterManager();

VertxOptions options = new VertxOptions().setClusterManager(clusterManager);

Vertx.clusteredVertx(options, res -> {
  if (res.succeeded()) {
    Vertx vertx = res.result();
  } else {
    // failed!
  }
});

How to build

In order to build this cluster manager from sources just use the following command:

mvn clean package -DskipTests

If you want to build this cluster manager with specific Apache Ignite version:

mvn clean package -Dignite.version=${version} -DskipTests

Configuring cluster manager

Using configuration file

The cluster manager is configured by a file default-ignite.xml which is packaged inside the jar.

If you want to override this configuration you can provide ignite.xml file on your classpath and this will be used instead.

The xml file is a Ignite configuration file and is described in details in Apache Ignite documentation.

Configuring programmatically

You can also specify configuration programmatically:

IgniteConfiguration cfg = new IgniteConfiguration();

// Configuration code (omitted)

ClusterManager clusterManager = new IgniteClusterManager(cfg);

VertxOptions options = new VertxOptions().setClusterManager(clusterManager);

Vertx.clusteredVertx(options, res -> {
  if (res.succeeded()) {
    Vertx vertx = res.result();
  } else {
    // failed!
  }
});

Discovery and network transport configuration

The default configuration uses TcpDiscoveryMulticastIpFinder so you must have multicast enabled on your network. For cases when multicast is disabled TcpDiscoveryVmIpFinder should be used with pre-configured list of IP addresses. Please see Cluster Configuration section at Apache Ignite documentation for details.

vertx-ignite's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.