Changelog
Boost 1.88
-
(Issue 233) To deal with keys that might not exits in the Redis server, the library supports
std::optional, for exampleresponse<std::optional<std::vector<std::string>>>. In some cases however, such as the MGET command, each element in the vector might be non exiting, now it is possible to specify a response asresponse<std::optional<std::vector<std::optional<std::string>>>>. -
(Issue 225) Use
deferredas the connection default completion token. -
(Issue 128) Adds a new
async_execoverload that allows passing response adapters. This makes it possible to receive Redis responses directly in custom data structures thereby avoiding unnecessary data copying. Thanks to Ruben Perez (@anarthal) for implementing this feature. -
There are also other multiple small improvements in this release, users can refer to the git history for more details.
Boost 1.87
-
(Issue 205) Improves reaction time to disconnection by using
wait_for_one_errorinstead ofwait_for_all. The functionconnection::async_runwas also changed to return EOF to the user when that error is received from the server. That is a breaking change. -
(Issue 210) Fixes the adapter of empty nested responses.
-
(Issues 211 and 212) Fixes the reconnect loop that would hang under certain conditions, see the linked issues for more details.
-
(Issue 219) Changes the default log level from
disabledtodebug.
Boost 1.85
-
(Issue 170) Under load and on low-latency networks it is possible to start receiving responses before the write operation completed and while the request is still marked as staged and not written. This messes up with the heuristics that classifies responses as unsolicited or not.
-
(Issue 168). Provides a way of passing a custom SSL context to the connection. The design here differs from that of Boost.Beast and Boost.MySql since in Boost.Redis the connection owns the context instead of only storing a reference to a user provided one. This is ok so because apps need only one connection for their entire application, which makes the overhead of one ssl-context per connection negligible.
-
(Issue 181). See a detailed description of this bug in this comment.
-
(Issue 182). Sets
"default"as the default value ofconfig::username. This makes it simpler to use therequirepassconfiguration in Redis. -
(Issue 189). Fixes narrowing conversion by using
std::size_tinstead ofstd::uint64_tfor the sizes of bulks and aggregates. The code relies now onstd::from_charsreturning an error if a value greater than 32 is received on platforms on which the size ofstd::size_tis 32.
Boost 1.84 (First release in Boost)
-
Deprecates the
async_receiveoverload that takes a response. Users should now first callset_receive_responseto avoid constantly and unnecessarily setting the same response. -
Uses
std::functionto type erase the response adapter. This change should not influence users in any way but allowed important simplification in the connections internals. This resulted in massive performance improvement. -
The connection has a new member
get_usage()that returns the connection usage information, such as number of bytes written, received etc. -
There are massive performance improvements in the consuming of server pushes which are now communicated with an
asio::channeland therefore can be buffered which avoids blocking the socket read-loop. Batch reads are also supported by means ofchannel.try_sendand buffered messages can be consumed synchronously withconnection::receive. The functionboost::redis::cancel_onehas been added to simplify processing multiple server pushes contained in the samegeneric_response. IMPORTANT: These changes may result in more than one push in the response whenconnection::async_receiveresumes. The user must therefore be careful when callingresp.clear(): either ensure that all message have been processed or just useconsume_one.
v1.4.2 (incorporates changes to conform the boost review and more)
-
Adds
boost::redis::config::database_indexto make it possible to choose a database before starting running commands e.g. after an automatic reconnection. -
Massive performance improvement. One of my tests went from 140k req/s to 390k/s. This was possible after a parser simplification that reduced the number of reschedules and buffer rotations.
-
Adds Redis stream example.
-
Renames the project to Boost.Redis and moves the code into namespace
boost::redis. -
As pointed out in the reviews the
to_bulkandfrom_bulknames were too generic for ADL customization points. They gained the prefixboost_redis_. -
Moves
boost::redis::resp3::requesttoboost::redis::request. -
Adds new typedef
boost::redis::responsethat should be used instead ofstd::tuple. -
Adds new typedef
boost::redis::generic_responsethat should be used instead ofstd::vector<resp3::node<std::string>>. -
Renames
redis::ignoretoredis::ignore_t. -
Changes
async_execto receive aredis::responseinstead of an adapter, namely, instead of passingadapt(resp)users should passrespdirectly. -
Introduces
boost::redis::adapter::resultto store responses to commands including possible resp3 errors without losing the error diagnostic part. To access values now usestd::get<N>(resp).value()instead ofstd::get<N>(resp). -
Implements full-duplex communication. Before these changes the connection would wait for a response to arrive before sending the next one. Now requests are continuously coalesced and written to the socket.
request::coalescebecame unnecessary and was removed. I could measure significative performance gains with these changes. -
Improves serialization examples using Boost.Describe to serialize to JSON and protobuf. See cpp20_json.cpp and cpp20_protobuf.cpp for more details.
-
Upgrades to Boost 1.81.0.
-
Fixes build with libc++.
-
Adds high-level functionality to the connection classes. For example,
boost::redis::connection::async_runwill automatically resolve, connect, reconnect and perform health checks.
v1.4.0-1
-
Renames
retry_on_connection_losttocancel_if_unresponded. (v1.4.1) -
Removes dependency on Boost.Hana,
boost::string_view, Boost.Variant2 and Boost.Spirit. -
Fixes build and setup CI on windows.
v1.3.0-1
-
Upgrades to Boost 1.80.0
-
Removes automatic sending of the
HELLOcommand. This can’t be implemented properly without bloating the connection class. It is now a user responsibility to send HELLO. Requests that contain it have priority over other requests and will be moved to the front of the queue, seeaedis::request::config -
Automatic name resolving and connecting have been removed from
aedis::connection::async_run. Users have to do this step manually now. The reason for this change is that having them built-in doesn’t offer enough flexibility that is need for boost users. -
Removes healthy checks and idle timeout. This functionality must now be implemented by users, see the examples. This is part of making Aedis useful to a larger audience and suitable for the Boost review process.
-
The
aedis::connectionis now using a typeddef to anet::ip::tcp::socketandaedis::ssl::connectiontonet::ssl::stream<net::ip::tcp::socket>. Users that need to use other stream type must now specializeaedis::basic_connection. -
Adds a low level example of async code.
v1.2.0
-
aedis::adaptsupports now tuples created withstd::tie.aedis::ignoreis now an alias to the type ofstd::ignore. -
Provides allocator support for the internal queue used in the
aedis::connectionclass. -
Changes the behaviour of
async_runto complete with success if asio::error::eof is received. This makes it easier to write composed operations with awaitable operators. -
Adds allocator support in the
aedis::request(a contribution from Klemens Morgenstern). -
Renames
aedis::request::push_range2topush_range. The suffix 2 was used for disambiguation. Klemens fixed it with SFINAE. -
Renames
fail_on_connection_losttoaedis::request::config::cancel_on_connection_lost. Now, it will only cause connections to be canceled whenasync_runcompletes. -
Introduces
aedis::request::config::cancel_if_not_connectedwhich will cause a request to be canceled ifasync_execis called before a connection has been established. -
Introduces new request flag
aedis::request::config::retrythat if set to true will cause the request to not be canceled when it was sent to Redis but remained unresponded afterasync_runcompleted. It provides a way to avoid executing commands twice. -
Removes the
aedis::connection::async_runoverload that takes request and adapter as parameters. -
Changes the way
aedis::adapt()behaves withstd::vector<aedis::resp3::node<T>>. Receiving RESP3 simple errors, blob errors or null won’t causes an error but will be treated as normal response. It is the user responsibility to check the content in the vector. -
Fixes a bug in
connection::cancel(operation::exec). Now this call will only cancel non-written requests. -
Implements per-operation implicit cancellation support for
aedis::connection::async_exec. The following call willco_await (conn.async_exec(…) || timer.async_wait(…))will cancel the request as long as it has not been written. -
Changes
aedis::connection::async_runcompletion signature tof(error_code). This is how is was in the past, the second parameter was not helpful. -
Renames
operation::receive_pushtoaedis::operation::receive.
v1.1.0-1
-
Removes
coalesce_requestsfrom theaedis::connection::config, it became a request property now, seeaedis::request::config::coalesce. -
Removes
max_read_sizefrom theaedis::connection::config. The maximum read size can be specified now as a parameter of theaedis::adapt()function. -
Removes
aedis::syncclass, see intro_sync.cpp for how to perform synchronous and thread safe calls. This is possible in Boost. 1.80 only as it requiresboost::asio::deferred. -
Moves from
boost::optionaltostd::optional. This is part of moving to C++17. -
Changes the behaviour of the second
aedis::connection::async_runoverload so that it always returns an error when the connection is lost. -
Adds TLS support, see intro_tls.cpp.
-
Adds an example that shows how to resolve addresses over sentinels, see subscriber_sentinel.cpp.
-
Adds a
aedis::connection::timeouts::resp3_handshake_timeout. This is timeout used to send theHELLOcommand. -
Adds
aedis::endpointwhere in addition to host and port, users can optionally provide username, password and the expected server role (seeaedis::error::unexpected_server_role). -
aedis::connection::async_runchecks whether the server role received in the hello command is equal to the expected server role specified inaedis::endpoint. To skip this check let the role variable empty. -
Removes reconnect functionality from
aedis::connection. It is possible in simple reconnection strategies but bloats the class in more complex scenarios, for example, with sentinel, authentication and TLS. This is trivial to implement in a separate coroutine. As a result theenum eventandasync_receive_eventhave been removed from the class too. -
Fixes a bug in
connection::async_receive_pushthat prevented passing any response adapter other thatadapt(std::vector<node>). -
Changes the behaviour of
aedis::adapt()that caused RESP3 errors to be ignored. One consequence of it is thatconnection::async_runwould not exit with failure in servers that required authentication. -
Changes the behaviour of
connection::async_runthat would cause it to complete with success when an error in theconnection::async_execoccurred. -
Ports the buildsystem from autotools to CMake.
v1.0.0
-
Adds experimental cmake support for windows users.
-
Adds new class
aedis::syncthat wraps anaedis::connectionin a thread-safe and synchronous API. All free functions from thesync.hppare now member functions ofaedis::sync. -
Split
aedis::connection::async_receive_eventin two functions, one to receive events and another for server side pushes, seeaedis::connection::async_receive_push. -
Removes collision between
aedis::adapter::adaptandaedis::adapt. -
Adds
connection::operationenum to replacecancel_*member functions with a single cancel function that gets the operations that should be cancelled as argument. -
Bugfix: a bug on reconnect from a state where the
connectionobject had unsent commands. It could causeasync_execto never complete under certain conditions. -
Bugfix: Documentation of
adapt()functions were missing from Doxygen.
v0.3.0
-
Adds
experimental::execandreceive_eventfunctions to offer a thread safe and synchronous way of executing requests across threads. Seeintro_sync.cppandsubscriber_sync.cppfor examples. -
connection::async_read_pushwas renamed toasync_receive_event. -
connection::async_receive_eventis now being used to communicate internal events to the user, such as resolve, connect, push etc. For examples see cpp20_subscriber.cpp andconnection::event. -
The
aedisdirectory has been moved toincludeto look more similar to Boost libraries. Users should now replace-I/aedis-pathwith-I/aedis-path/includein the compiler flags. -
The
AUTHandHELLOcommands are now sent automatically. This change was necessary to implement reconnection. The username and password used inAUTHshould be provided by the user onconnection::config. -
Adds support for reconnection. See
connection::enable_reconnect. -
Fixes a bug in the
connection::async_run(host, port)overload that was causing crashes on reconnection. -
Fixes the executor usage in the connection class. Before these changes it was imposing
any_io_executoron users. -
connection::async_receiver_eventis not cancelled anymore whenconnection::async_runexits. This change makes user code simpler. -
connection::async_execwith host and port overload has been removed. Use the otherconnection::async_runoverload. -
The host and port parameters from
connection::async_runhave been move toconnection::configto better support authentication and failover. -
Many simplifications in the
chat_roomexample. -
Fixes build in clang the compilers and makes some improvements in the documentation.
v0.2.0-1
-
Fixes a bug that happens on very high load. (v0.2.1)
-
Major rewrite of the high-level API. There is no more need to use the low-level API anymore.
-
No more callbacks: Sending requests follows the ASIO asynchronous model.
-
Support for reconnection: Pending requests are not canceled when a connection is lost and are re-sent when a new one is established.
-
The library is not sending HELLO-3 on user behalf anymore. This is important to support AUTH properly.
v0.1.0-2
-
Adds reconnect coroutine in the
echo_serverexample. (v0.1.2) -
Corrects
client::async_wait_for_datawithmake_parallel_groupto launch operation. (v0.1.2) -
Improvements in the documentation. (v0.1.2)
-
Avoids dynamic memory allocation in the client class after reconnection. (v0.1.2)
-
Improves the documentation and adds some features to the high-level client. (v.0.1.1)
-
Improvements in the design and documentation.