Draft
Add PlantUML high-level functional architecture diagram for AReaLite system#4
Conversation
Co-authored-by: zhshgmail <126103537+zhshgmail@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] 参考@zhshgmail/AReaL/pull/3的做法,为lite分支也进行类似的分析并生成一样的plantuml,用于描述lite分支的高层功能视图。并将这个plantuml加入到当前的pr中
以下是提示词
我需要一个platuml绘制的AReal...
Add PlantUML high-level functional architecture diagram for AReaLite system
Jul 29, 2025
zhshgmail
pushed a commit
that referenced
this pull request
Oct 29, 2025
This commit addresses design issues #1-#4 by reorganizing interfaces: ## Changes **1. Moved to api module (proper location for interfaces):** - `QueueAPI` → `areal/api/queue_api.py` - `CacheAPI` → `areal/api/cache_api.py` - `EventType`, `EventContext`, `EventHandler` → `areal/api/event_api.py` - `QueueFilter` → `Filter` in `areal/api/filter_api.py` **2. Created separate queue/cache event handler protocols:** - `QueueEventHandler` + `QueueEventContext` in `areal/api/queue_event_handler.py` - `CacheEventHandler` + `CacheEventContext` in `areal/api/cache_event_handler.py` **3. Simplified event_system.py:** - Now only contains `EventRegistry` class - Imports interfaces from api module - No longer defines protocols **4. Renamed QueueFilter → Filter:** - Generic name since it applies to both queue and cache - Located in api module as proper interface - StalenessFilter now implements Filter protocol ## Why Protocol as superclass? (Answer to #4) Protocol enables **structural subtyping** (duck typing with types): ```python from typing import Protocol class QueueAPI(Protocol): def put(self, item): ... # No need to inherit! class MyQueue: def put(self, item): pass # Type checker accepts this ✓ def foo(q: QueueAPI): q.put(1) foo(MyQueue()) # Works! Structural typing ``` vs ABC (requires inheritance): ```python from abc import ABC class QueueAPI(ABC): ... class MyQueue: # Must inherit from QueueAPI ... ``` **Protocol = Interface without inheritance requirement** ## Remaining Work Still TODO (per user feedback): - Redesign ProximalRecomputer with propagator pattern (#3) - Fix AsyncTaskRunner to require QueueAPI/CacheAPI (#5) - Remove executor._filter_context (#6) - Add CacheFilter or apply Filter to all operations (areal-project#7, areal-project#8) - Fix RemoteInfEngine to not expose queue/cache (areal-project#9) - Merge event_factory into workflow_factory (areal-project#10) - Add vLLM recompute support (areal-project#11) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive PlantUML diagram that visualizes the high-level functional architecture of the AReaLite system, following the same approach as PR #3 but specifically focused on the lite branch components.
What's Added
🏗️ Architecture Diagram (
AReaLite_architecture.puml)📚 Documentation (
AReaLite_architecture_README.md)Architecture Overview
The diagram organizes AReaLite into 6 functional layers:
Key Features
Comparison with Main AReaL
Unlike the main AReaL system's complex worker-based architecture, AReaLite focuses on:
The diagram can be viewed using online PlantUML editors, local PlantUML tools, or IDE extensions that support PlantUML rendering.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.