Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest to separate write and read from module clickhouse.js #71

Open
yi opened this issue Dec 28, 2020 · 0 comments
Open

Suggest to separate write and read from module clickhouse.js #71

yi opened this issue Dec 28, 2020 · 0 comments

Comments

@yi
Copy link

yi commented Dec 28, 2020

From a real-world production scenario, we've found the current implementation of httpRequest in clickhouse.js is a bit too complicated. It handles both reads (select) and writes (insert). That makes the httpRequest part too hard to be extended and brings some limitations.
e.g.

  1. No way to buffer the write response by setting wait_end_of_query. This causes the whole system to fail to handle clickhouse server data-parsing error.
  2. No way to read back response.headers['X-ClickHouse-Summary'] without hacking into the source code of this module.
  3. No way to fetch X-ClickHouse-Progress upgrades when reading back a large chunk of data.

Thus, I'd like to suggest to separate write and read from module clickhouse.js for their significant different behaviours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant