Hazelcast Node.js Client 4.0.0
This document includes the new features, enhancements, and fixed issues for Hazelcast Node.js Client 4.0.0 release.
New Features
- Hazelcast IMDG 4.0 Changes: Client protocol enhancements, architectural improvements, serialization improvements. #522
- Ownerless Client: Simpler design to track member leaves and joins to the cluster. #522
- CP Subsystem Support: New concurrency APIs including
AtomicLong,AtomicReference,FencedLock,Semaphore, andCountDownLatch. Hazelcast IMDG 4.0 introduces CP Subsystem powered by Raft consensus protocol. It provides CP concurrency primitives with respect to the CAP principle, i.e., they always maintain linearizability and prefer consistency to availability during network partitions and client or server failures. #577, #580, #582, #591, #593 - Backup Acknowledgment: Node.js client now supports backup acks (aka boomerang backups). So far the client was waiting for the sync backups to complete on the member. Boomerang backups decrease the number of network hops, thus improving the performance. #573
Enhancements
- Configuration Redesign: Programmatic configuration was simplified. The configuration is now represented with a plain object. #554
- Idiomatic Node.js API: Redesign of the API in a way that Node.js developers used to. #563
- Performance: The number of allocated
Buffers was reduced for writes. #585, #605 - Private APIs were removed from the documentation. #568
- Default serialization now supports native
Buffertype. #572 - Default serialization now supports Java
UUIDtype. #586 - New
serverStackTraceproperty was added intoHazelcastErrorclass. It contains server-side stack trace elements and may be useful for debugging and diagnostics. #576 - The client now uses native promises instead of promises provided by
bluebirdlibrary. #587 - Built-in benchmark now includes warm-up phase and support command-line arguments. #596
Fixes
- Redo configuration option was ignored by the client. It is handled correctly now. #590
- The member list could be broken after Hot Restart enabled member restart. Now the client handles the restart correctly. #575
- Previously
client.getDistributedObjects()call could lead to an unhandled promise rejection. #522
Breaking Changes
- Minimal required Node.js version is now 10. #574
- AP-based concurrency primitives (
Lock,Semaphore,AtomicLong) were removed from the client. #522 - Programmatic configuration API was changed to work with plain objects and declarative configuration support was removed. Certain configuration options were renamed to match option names from the old declarative configuration and Java client's XML/YAML configuration. #554
- Client API was improved to a more idiomatic JS way. This means introducing properties instead of methods where possible and similar changes. #563
Buffertype is not used for mappingbyte[]Java type. #572
Known Issues
- Client statistics format in Node.js client v4.0 is compatible with Management Center v4.0. Support for format compatible with Management Center v4.2020.08 and newer will be added in one of the upcoming minor releases of the client. #556