RpcServerMessageStream和RpcMessageStream类是否可抽取公共父类
Open
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 650
- PR merge metrics
- No merged PRs in 30d
Description
这两个类都继承自RpcByteStream,而且大多数成员函数及其实现都是相同的,是否可抽取公共父类。我看里面都有RoleType类型的成员变量,但似乎都是在其派生类构造时直接写死的,并没有由创建者指定不同类型。这两个类分开实现是基于什么考虑的
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the RpcServerMessageStream and RpcMessageStream declarations and implementations, then compare their shared behavior with RpcByteStream and inspect how each constructor sets RoleType. The issue is complete only when the maintainers decide whether the separation is justified and, if not, agree on the scope and design of a shared parent class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design, distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100