Internal binary protocol

214 views
Skip to first unread message

Alexandr Dubovikov

unread,
Mar 1, 2017, 3:45:37 AM3/1/17
to ClickHouse
Hi,

I have one question about internal binary protocol. Looks like the protocol was not designed to be asynchronous or maybe I didn't find the way to do it.

if you would like to insert data, first you have send a packet with type "Client Query == 1"  including a query (normally only table name and query_id )  and wait for a response on the request. 
ClickHouse tells you the field's types and names and only after you are able to send a data packet: "Client Data == 2" and after wait for HELLO Send/Receive.  Probably you have another way to send this
as a complete packet and just wait for the reply asynchronous ? This will speed up the insert time and allows you use Clickhouse without huge threadpool.

thank you in advance.

Wbr,
Alexandr

Pavel Artemkin

unread,
Mar 1, 2017, 2:40:15 PM3/1/17
to ClickHouse
Hi,

take a look here https://github.com/artpaul/clickhouse-cpp to see client side implementation of native protocol.

And yes, protocol is not asynchronous.


среда, 1 марта 2017 г., 13:45:37 UTC+5 пользователь Alexandr Dubovikov написал:

Alexandr Dubovikov

unread,
Mar 1, 2017, 2:56:25 PM3/1/17
to ClickHouse
Hi Pavel,

yes, I have checked the internal sources of CH and also yours as well ;-) therefore I dropped the mail here to ask if there is any way to implement it asynchronous.

IMHO the best way will be implement an asynchronous protocol and move from "own native binary protocol" implementation to the protobuf , because it looks very similar, except not included type of value, but with protobuf you will have a little bit more chances to implement native protocol clients in any languages.

again just my 5 cents :-)  

Wbr,
Alexandr

Павел Артёмкин

unread,
Mar 1, 2017, 5:54:44 PM3/1/17
to Alexandr Dubovikov, ClickHouse

Totally agree with you, but currently we have no plans about it.


чт, 2 марта 2017 г., 0:56 Alexandr Dubovikov <alexandr....@gmail.com>:
--
You received this message because you are subscribed to a topic in the Google Groups "ClickHouse" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clickhouse/Z6PkASfe5nQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clickhouse+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clickhouse/1dce6df2-9175-4f40-accd-ecd93692381f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages