Spring Cloud Alibaba is a multi-module Java framework (not an application) that provides Spring Boot auto-configuration starters integrating Alibaba's middleware stack into the Spring Cloud ecosystem. The core production capabilities are: service discovery and distributed configuration via Nacos (including a modern `spring.config.import` ConfigData-based loader plus a legacy bootstrap path), flow control and circuit breaking via Sentinel (with Feign, RestTemplate, WebFlux, and Spring Cloud Gateway integrations), messaging via a RocketMQ Spring Cloud Stream binder, distributed transactions via Seata (with XID propagation interceptors for Feign, RestTemplate, WebClient, and WebFlux), and distributed scheduling via SchedulerX/ShedLock. A sidecar starter allows non-JVM services to register into Nacos or Consul. The repository is structured as a Maven multi-module build: a central BOM (`spring-cloud-alibaba-dependencies`), individual starter modules, a large examples corpus demonstrating every feature, and integration test infrastructure built on Testcontainers with pinned middleware versions. In production, consuming applications depend on the starters and the framework handles the rest via idiomatic `@ConditionalOn*` auto-configuration: services register with Nacos and resolve peers through a cluster-aware reactive load balancer; configuration is pulled from Nacos with hot refresh and snapshot fallback; HTTP clients are wrapped with Sentinel circuit breakers; Spring Cloud Stream channels are bound to RocketMQ producers/consumers with transactional, broadcast, orderly, and SQL-filter semantics; Seata transactions propagate XID context across HTTP boundaries; and Sentinel rules can be hot-loaded from Nacos, Apollo, ZooKeeper, Redis, Consul, or local files through a property-driven datasource registry. The codebase demonstrates strong Spring craftsmanship - clean SPI implementations (ConfigData, ReactorServiceInstanceLoadBalancer, MessageChannelBinder, CircuitBreakerFactory), GraalVM native-image reflection hints, and comprehensive unit tests with Docker-based integration tests. Notable weaknesses: duplicated utility classes across modules (two `StringUtils`, two `PropertySourcesUtils`), some fragile reflection (e.g., `SmartConfigurationPropertiesRebinder` accessing private fields, `SentinelFeign` using `Field.setAccessible`), a large and sometimes confusing configuration surface, and version fragmentation across multiple maintained release branches. This is purely an infrastructure/framework repository - there are no data pipelines, notebooks, or research artifacts; the SQL and YAML files in examples are static demo assets. Technical drift is low: the project targets current Spring Boot 4.1.x / Spring Cloud 2025.1.x, uses recent middleware client versions (Nacos 3.1.1, RocketMQ 5.3.1, Seata 2.6.0, Sentinel 1.8.10), and is actively maintained with frequent commits and current release-train branches.
This repository provides TransmittableThreadLocal (TTL), a Java library that extends InheritableThreadLocal to propagate thread-local values across threads even when using thread pools, executors, ForkJoinPool, and other asynchronous constructs. It solves the common problem of context loss (e.g., tracing, security, session) in asynchronous Java applications. The library offers three usage modes: manual wrapping of Runnable/Callable via TtlRunnable/TtlCallable, wrapping executors via TtlExecutors, and transparent bytecode transformation via a Java Agent (TtlAgent) that automatically instruments JDK thread pool classes. The architecture is modular: ttl-core contains the core API and CRR (Capture-Replay-Restore) pattern, ttl-agent provides the agent with Javassist-based transformlets, ttl-kotlin adds Kotlin extensions, and ttl-integrations includes Vert.x 3/4 support. A ttl2-compatible module maintains backward compatibility with the v2 API. The library is widely adopted in the Java ecosystem (e.g., Apache ShardingSphere, SOFARPC) and is under active development with a v3 branch introducing a refined API. While primarily a library, it includes a Java Agent component that operates at the JVM level, making it a hybrid of library and instrumentation tool.
Arthas is a production-grade Java diagnostic and monitoring agent developed by Alibaba. It attaches to running JVMs without code changes or restarts, enabling real-time inspection of threads, memory, classes, method invocations, and system properties through an interactive shell (telnet/HTTP/WebSocket) or programmatic APIs. The architecture consists of a core agent (bytecode instrumentation via ASM/ByteKit), a command framework with over 40 built-in commands (watch, trace, stack, dashboard, profiler, etc.), multiple transport protocols (telnet, HTTP, gRPC, MCP for AI integration), and a tunnel server for remote connectivity. It also includes experimental modules for JFR analysis, cluster management, and gRPC-web proxies. Key external dependencies include Netty, OGNL, CFR decompiler, and async-profiler.