How jwcjlu/oannes-parent works
Project’s Main Components
• RPC FRAMEWORK CORE: Encompasses the primary modules that implement the RPC logic. This includes:
• oannes-common: Contains general utilities, serialization, logging, service definitions, protocol abstractions, and helpful utilities.
• oannes-cluster: Implements clustering functionality with multiple strategies (failover, fast-fail, load balancing).
• oannes-rpc: Contains the invocation mechanism, proxies, and protocol implementations specifically for the RPC call handling.
• oannes-transport: Provides the underlying network transport via Netty. It also includes the codec implementations, client pool mechanisms, and exchange protocol.
• SERVICE DISCOVERY / REGISTRY: Provided via:
• oannes-registry: Split into separate modules for the API and a Zookeeper-based implementation.
• CONFIGURATION & SPRING INTEGRATION:
• oannes-config: Manages configurable beans, annotation scanning, custom XML schemas, and proper integration with Spring.
• FILTER CHAIN/MIDDLEWARE:
• oannes-filter: Implements the filtering mechanism (e.g., metrics, timeouts, TPS limiting) that intercept RPC calls.
• DEMO APPLICATIONS:
• oannes-demo: Contains examples (demo-service, demo-consumer, demo-api) that demonstrate usage and integration of the entire framework.
Relationships and Interactions
• The core modules (common, cluster, rpc, transport) interact closely:
• The rpc module calls into the common utilities for protocol handling and error handling.
• The transport module (built on Netty) is used by the rpc module to handle the underlying network communication.
• The cluster module builds on the basic RPC functions (via common and rpc) and adds load balancing and failover capability.
• The oannes-config module integrates with Spring, enabling seamless Spring configuration. It scans for annotated components in the other modules (especially consumers and service providers) and initializes them.
• The oannes-registry module supports service registration and discovery, which is core for distributed communication.
• The filter module establishes a pipeline (filter chain) that can process requests/responses, and is likely applied within the rpc invocation or transport layers.
• Demo applications reference the API (and sometimes Spring configurations) to start a service provider (demo-service) and a consumer (demo-consumer).