[Cluster-refactor] About refine classes name
- Lenguaje dominante
- Java
- Estrellas
- 6.4k
- Forks
- 1.2k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 115
Descripción
> Background: we're working together with @jixuan1989 to refactor cluster module. The dev branch is `cluster-`
## Why
When I first looked at the codes of IoTDB, I lost in the kinds of `***Services`, I want to make it clear to let more dev can hand on codes a bit easier by the opportunity.
After reviewing the code, I think the request process flow could be divided into 3 layers as show in the image. The structure is clear but not classes name. So, I think we can refine the class names in **Transport layer** and **RPC interface layer** to make codes clearer.

## Suggestions
I don't align the suggestion changes with the class names in the server module because I don't think sever module is clear enough according to my understanding. And let's go through these layers.
### Cluster Instance
`ClusterIoTDB` is the server instance which control the sub servers lifecycle.
### Transport Layer
I call this layer as transport layer because the instances in the layer take charge of setup port listening, setup TCP work threads, establish connection, hand over requests... via thrift APIs.
Right now the class in this layer are called `***Service` which I don't think is clear. An idea is rename the classes as `***SubServer`.
### RPC interface Layer
The classes in this layer are the implementation of thrift RPC interfaces which handle the RPC call from thrift client.
Right now the class in this layer are called `***Service`. If we can change the classes name in the `transport port` layer, I think `***Service` here is acceptable. A suggestion is `***RPCHandler` which is better than `***Service` in current implementation IMO. `***Service` could be used to hide the concrete RPC framework like thrift but right now we don't have that layer.
### Executor Layer
The classes in the layer encapsulate the concrete execution logic. Won' analysis here.
Finally, welcome join the discussion and every idea is import for us.
Guía de contribución
Línea de trabajo
Comienza revisando el módulo de cluster en la rama de desarrollo `cluster-` y mapeando las clases de las capas de interfaz de Transport y RPC. Determina si las clases de transporte deben usar `***SubServer` y las implementaciones de RPC deben usar `***Service` o `***RPCHandler`; se considera terminado cuando la nomenclatura se haya acordado y aplicado de forma coherente en todo el refactoring.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- distributed-systems
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100