ClickHouse / ClickHouse/clickhouse-java
[client-v2] Abstract a Transport Layer
- 主要语言
- Java
- 星标
- 1.6k
- 派生
- 636
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 29
描述
### Description
The current client implementation is built on top of the Apache HTTP client, which is configured internally by "com. click house.client.api.internal.HttpAPIClientHelper". This keeps things under the client's control and prevents users from misconfiguring the HTTP client.
However, some use cases may need to control the whole configuration of the HTTP client (security, performance considerations).
A series of changes is required to achieve the goal:
- Define boundaries and data crossing them between the client and a transport layer abstraction. The client mainly operates with SQL queries, server settings, request settings, and authentication context. Protocol defines how these things apply at the transport level. For example, server settings in HTTP are part of URL query parameters and authentication is part of headers. The transport layer should be able to translate a client request into understandable entities and apply them to a network request.
- Define a way in which transport abstraction is initialized. The main challenge is in passing settings. For example, connection request timeout for Apache HTTP Client, but not default server settings (applied when a request is made).
- Implement loading transport implementation pluggable with Service Loader. This is important to support use cases when the user has limited control of how the client is configured and instantiated (typically BI tools).
贡献指南
调研方向
首先阅读 com.click house.client.api.internal.HttpAPIClientHelper,并跟踪客户端当前如何配置 Apache HTTP Client。梳理 SQL 查询、服务器和请求设置以及身份验证上下文的边界,包括初始化设置。当针对所述用例定义好传输抽象及其可插拔的 Service Loader 实现时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api, networking
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100