Qoollo.ClickHouse.Net is a library of useful classes for working with ClickHouse in .NET Core.
ClickHouseConnectionPool), working with a list of connection strings and automatically reconnecting in the event of a disconnection.IClickHouseRepository), using a thread pool and allowing:
IClickHouseAggregatingQueueProcessor). The most common scenario is the aggregation of single incoming events into packages for writing to ClickHouse.In this library, ClickHouse-Net is used as a driver, that implements the native protocol, which positively affects performance.
Qoollo.ClickHouse.Net can be installed via the nuget UI (as Qoollo.ClickHouse.Net preview version), or via the nuget package manager console:
PM> Install-Package Qoollo.Redis.Net -Version 1.0.1-preview
After that you need to specify configuration section in appsettings.json
"ClickHouse": {
"ConnectionStrings": [
"Host=Host;Port=Port;Database=default;User=default;Password="
],
"ConnectionPoolMaxCount": 4,
"ConnectionPoolName": "ClickHouseConnectionPool"
},Finally you can simply registry ClickHouseRepository in ConfigureServices
services.AddClickHouseRepository(Configuration.GetSection("ClickHouse"));
Installation for ClickHouseAggregatingQueueProcessor, more information about using the library and code samples you can see in the wiki.
Qoollo.ClickHouse.Net - библиотека полезных классов для работы с ClickHouse в .NET Core.
ClickHouseConnectionPool), работающий со списком строк подключений и автоматически переподключающийся в случае разрыва соединения.IClickHouseRepository), использующий пул потоков и позволяющий:
IClickHouseAggregatingQueueProcessor). Наиболее частый сценарий - агрегация одиночных приходящих событий в пакеты для записи в ClickHouse.В качестве драйвера используется ClickHouse-Net реализующий нативный протокол, что положительно сказывается на производительности.
Более подробное описание библиотеки и примеры кода вы можете найти в wiki.