Java Library for Distributed Services
Open source Apache License v2.0
-
Distributed Service Discovery
- Decentralized Service Discovery (based on performance-optimized Gossip protocol)
- Easy integration into existing infrastructure
- Clouds (based on Apache JClouds)
- Amazon EC2 and S3
- Google Cloud Storage and Compute Engine
- Azure Blob Storage
- etc
- Kubernetes
- ZooKeeper
- Etcd
- Consul
- IP Multicast
- Shared Database (JDBC-based)
- Shared File System
- Clouds (based on Apache JClouds)
- User-defined Service Properties and Roles
- Cluster Event Listeners
- Service Topology Views and Filtering APIs
- Health Monitoring and Split-brain Detection
-
Messaging
- Synchronous and Asynchronous Messaging (backed by Netty)
- Cluster-aware Load Balancing and Routing
- SSL/TLS Encryption of Network Communications (optional)
- Back Pressure Policies
- Error Retry Policies
- Pluggable Serialization
- Kryo
- FST
- Protocol Buffers (work in progress)
- JDK Serialization
- Manual Serialization
-
Remote Procedure Calls (RPC)
- Type-safe Invocation of Remote Java Services
- Automatic Discovery and Load Balancing
- Synchronous and Asynchronous APIs
- Multi-node Broadcasting and Aggregation of Results
- Back Pressure Policies
- Error Retry Policies
- ...and everything from the "Messaging" section above:)
-
Cluster-wide Singleton Service (aka Leader Election )
- Decentralized Leader Election
- Followers are Aware of the Current Leader
- Leader can Dynamically Yield Leadership
-
Distributed Locks
- Synchronous and Asynchronous Reentrant Locks
- Decentralized Lock Management
- Configurable Lock Groups (aka Lock Regions)
-
Spring Boot/Framework Support (optional)
- Spring Boot Auto-configurations and @Annotations
- Spring-compliant Beans
- Spring XML Schema to Simplify Configuration
-
Metrics
- Internal Metrics Recording and Publishing via Micrometer.io
-
Raft-based Replicated State Machines (planned)
For now, the most detailed documentation is provided as part of javadocs. Complete reference guide is coming soon.
Quickstart for Standalone Java Application
public class MyApplication{
public static void main(String[] args) throws Exception {
Hekate hekate = new HekateBootstrap()
.withClusterName("my-cluster")
.withNodeName("my-node")
.join();
System.out.println("Cluster topology: " + hekate.cluster().topology());
}
}
Quickstart for Spring Boot Application
@EnableHekate // <-- Enable Hekate integration.
@SpringBootApplication
public class MyApplication {
@Autowired
private Hekate hekate;
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
@PostConstruct
public void start(){
System.out.println("Cluster topology: " + hekate.cluster().topology());
}
}
More Examples: Please see the hekate-io/hekate-examples project for more examples.
- For projects based on Spring Boot:
<dependency>
<groupId>io.hekate</groupId>
<artifactId>hekate-spring-boot</artifactId>
<version>3.4.1</version>
</dependency>
- For projects based on Spring Framework:
<dependency>
<groupId>io.hekate</groupId>
<artifactId>hekate-spring</artifactId>
<version>3.4.1</version>
</dependency>
- For standalone applications:
<dependency>
<groupId>io.hekate</groupId>
<artifactId>hekate-core</artifactId>
<version>3.4.1</version>
</dependency>
- Other artifacts:
- Cluster Bootstrapping (seed node discovery)
- hekate-jclouds-core - Integration with Apache JClouds for cloud environments.
- hekate-jclouds-aws - Extended integration with Amazon EC2 cloud.
- hekate-kubernetes - Integration with Kubernetes
- hekate-zookeeper - Integration with Apache ZooKeeper
- hekate-etcd - Integration with Etcd
- hekate-consul - Integration with Consul
- Serialization Codecs
- hekate-codec-kryo - Integration with Kryo for data serialization.
- hekate-codec-fst - Integration with FST for data serialization.
- Cluster Bootstrapping (seed node discovery)
cd
to the project's root folder- run
./mvnw clean package -DskipTests=true
- cd to the project's root folder
- make a copy of
test.properties
file with namemy_test.properties
- edit
my_test.properties
according to your environment - run
docker-compose up -d
to prepare Docker-based testing infrastructure - run
./mvnw clean package
-
v.3.4.1 (4-Jul-2019) - [release notes]
-
v.3.4.0 (29-Jun-2019) - [release notes]
-
v.3.3.0 (19-Apr-2019) - [release notes]
-
v.3.2.0 (5-Apr-2019) - [release notes]
-
v.3.1.0 (28-Mar-2019) - [release notes]
-
v.3.0.0 (19-Mar-2019) - [release notes]
-
v.2.6.0 (22-Aug-2018) - [release notes]
-
v.2.5.0 (4-Aug-2018) - [release notes]
-
v.2.4.1 (15-Jul-2018) - [release notes]
-
v.2.4.0 (15-Jul-2018) - [release notes]
-
v.2.3.1 (18-May-2018) - [release notes]
-
v.2.3.0 (4-May-2018) - [release notes]
-
v.2.2.2 (21-Apr-2018) - [release notes]
-
v.2.2.1 (12-Apr-2018) - [release notes]
-
v.2.2.0 (11-Apr-2018) - [release notes]
-
v.2.1.0 (22-Feb-2018) - [release notes]
-
v.2.0.0 (2-Jan-2018) - [release notes]
-
v.1.0.2 (23-Sep-2017) - [release notes]