How apache/helix works
Apache Helix is a cluster-management framework for partitioned, replicated resources. The principal workflow starts with an operator or application configuring a cluster, proceeds through controller-driven assignment and failure recovery, and reaches participants that execute state transitions; Helix publishes resulting cluster state for clients to observe. The repository also includes messaging, REST management, and a gRPC gateway. The README documents the high-level workflow and capabilities; sampled source and the source index support selected internal relationships, while unsampled subsystem internals are represented conservatively.
Main entry points: GenericHelixController.java Controller event loop · HelixManager.java Cluster manager · ClusterService.java REST cluster services · HelixDataAccessor.java Cluster data access
Components 20
Cluster APIs
- Cluster manager
helix-core/src/main/java/org/apache/helix/HelixManager.java - Cluster administration
helix-core/src/main/java/org/apache/helix/HelixAdmin.java - Config access
helix-core/src/main/java/org/apache/helix/ConfigAccessor.java - Cluster data access
helix-core/src/main/java/org/apache/helix/HelixDataAccessor.java - ZooKeeper coordination
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
Controller
- Controller event loop
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java - Cluster state cache
helix-core/src/main/java/org/apache/helix/common/caches/BasicClusterDataCache.java - Rebalancers
helix-core/src/main/java/org/apache/helix/controller/rebalancer/AutoRebalancer.java - Assignment strategies
helix-core/src/main/java/org/apache/helix/controller/rebalancer/strategy/ConstraintRebalanceStrategy.java - External view
helix-core/src/main/java/org/apache/helix/controller/ExternalViewGenerator.java
Participants
- Cluster messaging
helix-core/src/main/java/org/apache/helix/messaging/DefaultMessagingService.java - State machine engine
helix-core/src/main/java/org/apache/helix/participant/HelixStateMachineEngine.java - Participant state
helix-core/src/main/java/org/apache/helix/model/Message.java
Services
- gRPC gateway
helix-gateway/src/main/java/org/apache/helix/gateway/service/GatewayServiceManager.java - Gateway channel
helix-gateway/src/main/java/org/apache/helix/gateway/channel/HelixGatewayServicePollModeChannel.java - REST cluster services
helix-rest/src/main/java/org/apache/helix/rest/server/service/ClusterService.java - Maintenance checks
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/MaintenanceManagementService.java - Virtual topology
helix-rest/src/main/java/org/apache/helix/rest/server/service/VirtualTopologyGroupService.java
Other components
- Operator / app
- Gateway client
Connections 21
- Operator / app → Cluster manager: connects
helix-core/src/main/java/org/apache/helix/HelixManager.java - Operator / app → Cluster administration: manages cluster
README.md - Cluster administration → Config access: sets configuration
- Cluster manager → Cluster data access: accesses state
helix-core/src/main/java/org/apache/helix/HelixManager.java - Cluster data access → ZooKeeper coordination: reads and writes
- Controller event loop → Cluster state cache: loads state
- Controller event loop → Rebalancers: computes placement
README.md - Rebalancers → Assignment strategies: selects assignments
- Controller event loop → Cluster messaging: dispatches transitions
- Cluster messaging → State machine engine: delivers messages
helix-core/src/main/java/org/apache/helix/messaging/DefaultMessagingService.java - State machine engine → Participant state: executes transitions
helix-core/src/main/java/org/apache/helix/participant/HelixStateMachineEngine.java - Participant state → Cluster data access: persists state
helix-core/src/main/java/org/apache/helix/HelixDataAccessor.java - Controller event loop → External view: generates view
- External view → Operator / app: exposes cluster state
README.md - Gateway client → Gateway channel: connects by gRPC
README.md - Gateway channel → gRPC gateway: routes events
helix-gateway/src/main/java/org/apache/helix/gateway/channel/HelixGatewayServicePollModeChannel.java - gRPC gateway → Cluster manager: joins cluster
README.md - Operator / app → REST cluster services: requests management
- REST cluster services → Maintenance checks: checks stoppability
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/MaintenanceManagementService.java - REST cluster services → Virtual topology: configures topology
helix-rest/src/main/java/org/apache/helix/rest/server/service/VirtualTopologyGroupService.java - Cluster manager → External view: observes cluster state