Hazelcast Cpp Client Versions Save

Hazelcast IMDG C++ Client

v4.0-BETA

3 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 4.0-BETA release.

This is a major API breaking release. We switched to the new Hazelcast Open Binary Protocol v2.0 with this release of the client so that it can used with server versions 4.0 and later.

The following are the major changes performed in this release:

New Features

  • New Client Protocol: We have implemented the new Hazelcast Open Binary protocol version 2. This new protocol eliminates some of the size limitations of the previous version and solves the problems of backward compatibility of custom field definitions.

  • C++11 Support: The client code has been upgraded to use the C++11 features. The API has been changed to reflect the C++11 usages.

  • Fully Async API: Almost all API methods now return boost::future which allows async programming for all the API calls. boost::future also supports continuations which can be very useful for async programming. You can also use utilities such as boost::when_all, boost::wait_for_all, boost::when_any to handle multiple futures.

  • CP Subsystem: Hazelcast IMDG 4.0 has introduced CP concurrency primitives with respect to the CAP principle, i.e., they always maintain linearizability and prefer consistency over availability during network partitions and client or server failures. All data structures within CP Subsystem are available through the hazelcast_client::get_cp_subsystem() API. In favor of CP subsystem API, we have removed the legacy IAtomicLong, ISemaphore, and ICountDownLatch.h APIs. The new API provides CP atomic_long, latch, counting_semaphore, fenced_lock and atomic_reference.

  • optional: The new API uses boost::optional for return types where it is possible to return nullable objects. This is more efficient and simpler API than using the shared_ptr approach.

  • New Backup Aware Client: The client is now by default processing the backup event notifications. When an operation with sync backup is sent by a client to the Hazelcast member(s), the acknowledgment of the operation's backup is sent to the client by the backup replica member(s). This improves the performance of the client operations. You can turn off this feature back to the old behavior using the client_config::backup_acks_enabled(bool) API.

Enhancements

  • API Mixed Type Support: We have removed the old RawPointer API. The new API allows you to pass the type of object for each method call. Hence, this new API can now support mixed types, and you do not need to provide a specific object type when instantiating a Hazelcast structure such as imap.

  • Single External Dependency: We only depend on the Boost library. You need to have Boost installed in your environment. Particularly, we depend on boost::thread and boost::asio.

  • IO Level Design Change: We now use asio for SSL and non-SSL sockets. This eliminates the socket descriptor number limitation of the previous implementation which used the select system API. We also utilize asio::thread_pool for our internal executor implementation.

  • Non-blocking Atomics: We have eliminated the previous lock based atomic implementations and switched fully to the std::atomic standard library.

  • Serialization Changes: We have changed the way how object serializations are coded so that the serialization is mostly resolved at compile-time. The new serialization does not need any specific configurations but it simply fails at compile-time if not implemented correctly, e.g., missing method). The new serialization also allows keeping your legacy classes (see hz_serializer<T> specializations).

  • Group Name Removal: Group configuration has been removed. We now have cluster_name in the ClientConfig API which has replaced the GroupConfig.

  • New Listener API: You can now use the listener APIs with lambda and std::function objects.

  • New Logger Configuration: We have introduced a new logger_config API and a new way to configure integrating your logger.

  • Snake Case: API naming changed from camelCase to snake_case.

  • Version API. [#612]

Fixes

The following major issue has been fixed for this release.

  • Missing default ctor for HazelcastJsonValue. [#589]

You can find the full list of closed issues here.

Known Issues

There are no known issues for this release.

Downloads

  • The Windows binaries are built with Visual Studio 2019 compiler.
  • The Linux 64-bit binaries are built using gcc 5.3.1 compiler and 32-bit binaries are built using gcc 10.2.1 compiler.
  • The mac OS binaries are built at clang 11.0.3 compiler.

See Reproducing Released Libraries From Source for generating custom built-binaries for your environment.

v3.12.1

4 years ago

This document includes the fixed issues for Hazelcast C++ Client 3.12.1 release.

New features

No new features in this release.

Enhancements

No enhancements in this release.

Fixes

There is only one major issue fixed in this release which is listed below. You can find the full list of closed issues and closed PRs.

  • Pipeline functionality causes an assertion failure in Debug build and a crash in Release build. [#569 ]

Known Issues

There are no known issues for this release.

v3.12

5 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.12 release.

New features

  • JSON Serializer: You can now use the JSON formatted strings as objects in the Hazelcast cluster. Starting with Hazelcast IMDG 3.12, the JSON serialization is one of the formerly supported serialization methods. Creating JSON objects in the cluster does not require any server side coding and hence you can just send a JSON formatted string object to the cluster and query these objects by fields. See the JSON Serialization for details. Examples can be found here.

  • Async API: Asynchronous methods are added for more powerful operations like batched writing or reading. The asynchronous methods do not block but return immediately with an ICompletableFuture interface. You can later query the result of the operation using this interface or even provide a callback method to be executed on the user executor threads when the response to the call is received. The IMap, Ringbuffer and IAtomicLong support asynchronous operations. See the Using IMap Non-Blocking Async Methods, Using Ringbuffer Non-Blocking Async Methods and Using Atomic Long Non-Blocking Async Methods for details. Examples can be found here.

  • Distributed Executor Service: Hazelcast C++ client allows you to asynchronously execute your tasks (logical units of work) in the cluster, such as database queries, complex calculations and image rendering. With IExecutorService, you can execute tasks asynchronously and perform other useful tasks. If your task execution takes longer than expected, you can cancel it. See the Distributed Executor Service for details. Examples can be found here.

  • Pipelining API: With the new Pipelining API, you can send multiple requests in parallel using a single thread and, therefore, increase the throughput. See the Pipelining for details. Examples can be found here.

Enhancements

  • Added the missing HazelcastClient::getLocalEndpoint() API so that you can get the client UUID. [#524]

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs.

  • Fixed an issue in 3.10.1 where there was a leak in the client memory (thread allocation). [#455]
  • Fixed an issue where TopologyChangedException was retryable. [#522]

Known Issues

There are no known issues for this release.

v3.11

5 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.11 release.

New features

  • Replicated Map: Hazelcast Replicated Map is a distributed key-value data structure where the data is replicated to all members in the cluster. It provides full replication of entries to all members for high speed access. See the Using Replicated Map section for details. Examples can be found here.

  • Client Statistics: You can now monitor C++ client statistics including Near Cache metrics on the Hazelcast Management Center console. See the Enabling Client Statistics section for details. Examples can be found here.

  • Logger Configuration: Introduced new logger capabilities such as redirecting the client logs to a file and filtering certain log levels, and integrated the easylogging++ library. You can configure a custom logger using the ClientConfig::getLoggerConfig()::setConfigurationFileName("logger config file path"); method, See the Logging Configuration section for details. Examples can be found here.

Enhancements

  • Introduced external Boost and ASIO library support for using with Conan package manager. [#474]
  • Added the proxy creation support for the client's getMap() method. [#54]

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with the 3.11 milestone.

  • Fixed an issue where large value sized IMap.set performance was decreasing without the suitable socket options setting - send/receive buffer sizes. [#465]

  • Fixed an issue in 3.10.1 where there was a leak in the client memory (thread allocation). [#455]

  • Fixed an issue where the client was trying to connect to the cluster and got a context:asio.ssl error. Introduced SSL FIPS compliance for auto-discovery on AWS for this. [#337]

  • Fixed an error in asio while compiling it with SSL enabled. [#284]

Known Issues

There are no known issues for this release.

v3.10.1

5 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.10.1 release.

New features

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with milestone 3.10.1

  • C++ client crashes when server doesn't respond to HB. [#429]
  • Compilation with clang 6.0 fails because __USE_GNU is implicitly defined by clang. [#435]
  • testAsyncStartTrue fails at ConfiguredBehaviourTest.cpp:100. [#431]
  • ClientFlakeIdGeneratorConfig is missing support wildcard usage. [#446]

Known Issues

There are no known issues for this release.

v3.10

5 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.10 release.

New features

  • Invocation And Retry Mechanism: Introduced the new system properties "hazelcast.client.invocation.retry.pause.millis" and "hazelcast.client.invocation.timeout.seconds".
  • Client Backpressure: Sometimes, e.g., when your servers are overloaded, you may want to slow down the client operations to the cluster. Then the client can be configured to wait until number of outstanding invocations whose reponses are not received to become less than a certain number. This is called "Client Backpressure". By default, the backpressure is disabled. There are a few properties which control the backpressure. These client configuration properties are:
    • "hazelcast.client.max.concurrent.invocations"
    • "hazelcast.client.invocation.backoff.timeout.millis"
  • Client Connection Strategy: Hazelcast client-cluster connection and reconnection strategy can be configured. Sometimes, you may not want your application to wait for the client to connect to the cluster, you may just want to get the client and let the client connect in the background. This is configured using the following:
ClientConfig::getConnectionStrategyConfig().setAsyncStart(bool);
  • Client Reconnect Strategy: You can configure how the client should act when the client disconnects from the cluster for any reason. This is configured using the following:
ClientConfig::getConnectionStrategyConfig().setReconnectMode(const hazelcast::client::config::ClientConnectionStrategyConfig::ReconnectMode &);

Possible values for the ReconnectMode are:

  • OFF: Prevents reconnect to cluster after a disconnect.
  • ON: Reconnect to cluster by blocking invocations.
  • ASYNC: Reconnect to cluster without blocking invocations. Invocations will receive HazelcastClientOfflineException.

Enhancements

  • Shuffle Cluster Connection Member List: When the client is connecting to the cluster, by default the configured and discovered member addresses are tried randomly. If you would like the client to try connecting in a configured order, you can set the hazelcast.client.shuffle.member.list configuration property to false.

  • Listener Events: When a listener is added then the events are being delivered to the listener as they are received. The events are delivered to your listener implementation via event threads. The number of these event threads can be configured using this property:

config.setProperty("hazelcast.client.event.thread.count", "7");

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with milestone 3.10

  • Resend mechanism blocking valuable io thread. [#66]
  • Remove seperate owner connection. [#18]
  • Response Thread missing. [#321]
  • C++ client should use RemoteController during the tests [#366]

Known Issues

There are no known issues for this release.

v3.10-BETA-1

6 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.10-BETA-1 release.

New features

  • Invocation And Retry Mechanism: Introduced the new system properties "hazelcast.client.invocation.retry.pause.millis" and "hazelcast.client.invocation.timeout.seconds".
  • Client Backpressure: Sometimes, e.g., when your servers are overloaded, you may want to slow down the client operations to the cluster. Then the client can be configured to wait until number of outstanding invocations whose reponses are not received to become less than a certain number. This is called "Client Backpressure". By default, the backpressure is disabled. There are a few properties which control the backpressure. These client configuration properties are:
    • "hazelcast.client.max.concurrent.invocations"
    • "hazelcast.client.invocation.backoff.timeout.millis"
  • Client Connection Strategy: Hazelcast client-cluster connection and reconnection strategy can be configured. Sometimes, you may not want your application to wait for the client to connect to the cluster, you may just want to get the client and let the client connect in the background. This is configured using the following:
ClientConfig::getConnectionStrategyConfig().setAsyncStart(bool);
  • Client Reconnect Strategy: You can configure how the client should act when the client disconnects from the cluster for any reason. This is configured using the following:
ClientConfig::getConnectionStrategyConfig().setReconnectMode(const hazelcast::client::config::ClientConnectionStrategyConfig::ReconnectMode &);

Possible values for the ReconnectMode are:

  • OFF: Prevents reconnect to cluster after a disconnect.
  • ON: Reconnect to cluster by blocking invocations.
  • ASYNC: Reconnect to cluster without blocking invocations. Invocations will receive HazelcastClientOfflineException.

Enhancements

  • Shuffle Cluster Connection Member List: When the client is connecting to the cluster, the configured and discovered member addresses are being tried sequentially. The order with which the addresses are tried is by default in a randomly shuffled list. But for some reason, you may want the client try only in the order as provided. To achieve this you need to set this configuration:
config.setProperty("hazelcast.client.shuffle.member.list", "false")
  • Listener Events: When a listener is added then the events are being delivered to the listener as they are received. The events are delivered to your listener implementation via event threads. The number of these event threads can be configured using this property:
config.setProperty("hazelcast.client.event.thread.count", "7");

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with milestone 3.10

  • Resend mechanism blocking valuable io thread. [#66]
  • Remove seperate owner connection. [#18]
  • Response Thread missing. [#321]
  • C++ client should use RemoteController during the tests [#366]

Known Issues

There are no known issues for this release.

v3.9.1

6 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.9.1 release.

New features

  • Global Serializer: This release adds the support for the Global Serializer. Global Serializer allows you to use objects for which you have not defined any serializers. It also lets you compile your code without the need to write the free function getHazelcastTypeId.

Enhancements

There are no enhancements for this release.

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with milestone 3.9.1.

  • Inefficient ObjectDataInput::readByteArray(). [#328]
  • Windows refreshPartition sleep is not working. [#293]
  • Windows builds fail on client shutdown. [#369]

Known Issues

There are no known issues for this release.

v3.9

6 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.9 release.

New features

There are no new features for this release.

Enhancements

  • Polymorphic Object Support: This release adds the polymorphic object support for all serialization types; IdentifiedDataSerializable, Portable and custom types. You can now use the base type when you get a data structure, for example client.getMap<BaseKey, BaseValue>("mymap"), and put and get derived polymorphic objects to the same data structure.

  • Mixed Type Unrelated Object Support: This release adds the support for all serialization types for completely unrelated object types to be used at the Hazelcast data structures. You can do this by using the mixed type adopted HazelcastClient. You can adopt the client in this way:

    ClientConfig config;
    HazelcastClient client(config);
    mixedtype::HazelcastClient &hazelcastClient = client.toMixedType();

The mixedtype::HazelcastClient interface is designed to provide you the data structures which allows you to work with any object types in a mixed manner. For example, the interface allows you to provide the key and value type differently for each map.put call. An example usage is shown below:

    mixedtype::IMap map = hazelcastClient.getMap("MyMap");

    map.put<int, int>(3, 5);
    map.put<string, std::string>("string key1", "MyStringValue");
    map.put<int, MyCustomObject>("string key1", myCustomInstance);
    TypedData result = map.get<int>(3);

As you can see in the above code snippet, we are putting int, string and MyCustomObject to the same map. Both the key and value can be of different type for each map.put call.

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with milestone 3.9

  • Build lib in a context of bigger project. [#332]
  • Unable to specify include and lib dirs for OpenSSL on Windows and on Linux. [#330]

Known Issues

There are no known issues for this release.

v3.8.3

6 years ago

This document includes the new features, enhancements, and fixed issues for Hazelcast C++ Client 3.8.3 release.

New features

  • IMap::removeAll: This release adds the IMap::removeAll API. This API allows you to remove entries from the map based on the criteria (predicate) that you provide.

Enhancements

There are no enhancements for this release.

Fixes

Some of the major bug fixes for this release are listed below. You can find the full list of closed issues and closed PRs at the repo with milestone 3.8.3.

  • Cluster connection retry does not sleep if AttemptPeriod is 1 second or less. [#322]

Known Issues

There are no known issues for this release.