helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.5k stars 566 forks source link

Add UCP connection pool support in dbclient #1589

Open romain-grecourt opened 4 years ago

romain-grecourt commented 4 years ago

Add UCP connection pool support in DBClient as an alternative to Hikari. Also take the opportunity to review the API by trying to implement this in user space.

E.g.

DbClient dbClient = new JdbcDbClientProvider().builder()
    .config(config)
    .connectionPool(UCPConnectionPool.create(config))
    .build()
    .build();

The above snippet doesn't look right. We also need to make sure the programmatic way can be used to setup the connection.

romain-grecourt commented 4 years ago

CC @Tomas-Kraus @tomas-langer

tomas-langer commented 4 years ago

Now we can use JdbcDbClientProviderBuilder.create()

danielkec commented 3 years ago

Also ability to setup UCP with SslContext and tns names would make integration with #3072 great.

UCPConnectionPool.builder()
  .sslContext(sslCtx) 
  .tnsNames(stringInMemory)
  ...
  .build()

Depends on #3384

MohanramGovindarasu commented 7 months ago

@arjav-desai : Just adding the comment to the existing bug. We are also using Helidon's dbclient obj for all the DB interactions. I don't see any methods which can accept "UCP" as the connection object from DbClient class(I can see only support for Hikari CP as of now in Helidon SE 4.0.2 SE version). It was recommended by helidon framework team to move from Hikari CP to UCP. This will definitely help us understand which JDBC connection pool would be relevant for our use case for both OP and k8's deployment. Also we are planning to include "Observability and tracing" as part of our next phase, so UCP support in dbclient will be very crucial for our product.

Note: The key selling point for our product is performance.

Please share your thoughts on this.