Company
Date Published
Author
Konstantin Lutovich
Word count
1314
Language
English
Hacker News points
None

Summary

The new 1.5.0-beta03 pre-release version of the Bolt Java driver for Neo4j is built on an asynchronous, Netty-based infrastructure, allowing for non-blocking I/O and reducing the number of threads needed to handle N concurrent connections from N. This release introduces a new set of asynchronous methods that enable queries and transactions to be executed without blocking. The driver now requires Java 8, with previous versions still available but no longer maintained. The async API provides various entry points for transactions, including `Session#readTransactionAsync()` and `Session#writeTransactionAsync()`, which allow for execution of Cypher queries in an asynchronous fashion. Transactions will automatically commit when successful and roll back when failing. The driver can be closed explicitly to prevent file descriptor leaks or prevent the application from exiting. This release also includes new features such as improved connection pooling, a new load-balancing strategy, and maximum connection lifetime configuration options. The async API is still under community input and feedback, with the goal of fine-tuning the design to provide value to async code bases.