[Task] Design virtual thread support for ShenYu runtime and plugins
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
### Description
## Background
A future ShenYu main repo change may use Java virtual threads to improve blocking IO handling in runtime and plugin execution paths.
Before implementation, we need a design that identifies where virtual threads are useful, where they are risky, and how to keep a fallback path.
## Tasks
- [ ] Inventory current thread pool usage in bootstrap/runtime/plugin code.
- [ ] Identify blocking IO paths that may benefit from virtual threads.
- [ ] Identify CPU-bound paths that should not use virtual threads.
- [ ] Design a unified executor abstraction for plugin/runtime use.
- [ ] Define configuration flags for enabling/disabling virtual threads.
- [ ] Define fallback behavior when virtual threads are unavailable.
- [ ] Define observability requirements: thread naming, metrics, tracing, logs.
- [ ] Define benchmark scenarios comparing platform threads and virtual threads.
- [ ] Identify compatibility impact on plugins.
## Expected Output
A virtual thread design proposal covering:
- Candidate execution paths
- Non-candidate execution paths
- Executor abstraction
- Configuration model
- Fallback model
- Benchmark plan
- Risk analysis
## Acceptance Criteria
- The proposal does not require Java client code to upgrade JDK.
- The proposal includes a safe fallback path.
- The proposal includes measurable benchmark criteria.
### Task List
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inventorying thread-pool usage in the repository's bootstrap, runtime, and plugin code, then trace blocking I/O and CPU-bound execution paths. The work is done when the proposal covers candidate and non-candidate paths, executor and configuration models, safe fallback behavior, observability, benchmarks, compatibility, and the stated acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100