Releases: Tradias/asio-grpc
Releases Β· Tradias/asio-grpc
v3.2.0
Features
- Add multi-threading support to GrpcContext's
run
andpoll
functions if the context has been constructed with one of the new constructors and the providedconcurrency_hint
is greater than one. Note that just like withasio::io_context
you still have to callGrpcContext::run/poll
from the desired numbers of threads. Also note thatagrpc::HealthCheckService
is incompatible with the new multi-threaded GrpcContext. - Add static_asserts to
register_
functions that improve compilation error messages when providing an incompatibleRPCHandler
. - Add support for custom allocators that use fancy pointers.
Performance
- The thread local memory pool will now grow up to a maximum of 127008 bytes. Allocations beyond that and individual allocations larger than 1024 byte will be served by
std::allocator
. Overaligned types no longer trigger a static assertion. register_callback_rpc_handler
now uses the user-provided allocator to wait fornotify_when_done
.
Documentation
- Add gRPC client and server example that use the new multi-threaded GrpcContext.
- Add note that only one call to
ServerRPC::wait_for_done
may be outstanding at a time.
Chore
- No longer add standalone asio-grpc target when only building examples. All examples use Boost.Asio.
v3.1.0
v3.0.0
Features
- De-experimentalize
agrpc::ServerRPC
,agrpc::ClientRPC
andagrpc::register_x
functions. - Remove several functions and classes. See migration guide for details.
asio-grpcConfig.cmake
no longer callsfind_package
for all possible backends.- Remove support for deprecated
asio::execution
functions. - Remove deprecated
ASIO_GRPC_USE_BOOST_CONTAINER
andASIO_GRPC_USE_RECYCLING_ALLOCATOR
cmake options.
The agrpc::Server/ClientRPC
API is not understood by Microsoft's Intellisense. If that bothers you then please react to this bug ticket.
v2.9.3
v2.9.2
Features
- Add support for
stdexec::schedule(grpc_executor)
.
Fixes
- Fix deadlock when the rpc handler passed to
agrpc::register_sender_rpc_handler
in stdexec returnsexec::task
. - Add missing includes for
grpc::ServerAsyncX
types in several places. This only lead to compilation errors in certain gRPC versions (~1.30-1.40). - Fix compilation of tests with Boost 1.84 due to removed header file.
Performance
- No longer perform
writes_done
duringfinish
if a previouswrite
orread_initial_metadata
ended infalse
in the streaming ClientRPCs.
Documentation
- Add v2 to v3 migration guide.
- Adjust some wording in the
ServerRPC::finish
documentation.
Chore
- Use
file(GLOB)
to createcheck-header-syntax
target to avoid forgetting to add a new header to the list. - Unify common parts of stdexec und unifex tests into one file.
- Build
asio-grpc-check-header-syntax
target in the Ubuntu/20.04/Default pipeline.
v2.9.1
Fixes
- Add workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102229 (affects GCC 11.1-11.2)
v2.9.0
This will likely be the last release before v3. Migration guide
Features
- Breaking change: When using sender/receiver,
agrpc::Alarm
will now use theset_done
/set_stopped
channel when cancelled, instead of sending abool
through theset_value
channel. - Breaking change: When using
asio::execution
the StopToken was obtained by callingasio::get_associated_cancellation_slot
on the receiver. An unstoppable token is now used instead. Note thatasio::execution
is deprecated and should no longer be used. - Asio and
execution
may now be used within the same application. Simply link withasio-grpc::asio-grpc(-standalone-asio)
andasio-grpc::asio-grpc-(unifex|stdexec)
. - Add
execution::get_scheduler
support to I/O objects. - Mark senders
[[nodiscard]]
. - Fix and improve
asio-grpc.natvis
. Also add support forstdexec
. To learn how natvis files can improve your debugging experience check out the Visual Studio or Visual Studio Code documentation.
Fixes
- Partially fix
agrpc::Waiter.initiate
for sender/receiver. Currently only theset_value
channel is forwarded to the waiting operation. - Make
agrpc::process_grpc_tag
work properly with unifex/stdexec instead of silently be a no-op. - Use of
register_yield_rpc_handler
with standalone Asio 1.24.0+. - Conditional detection of
asio::execution
with Asio 1.30.0+ / Boost 1.84+.
Chore
- Change the Boost.Asio+stdexec test to now use standalone Asio.
- Update Boost to 1.83.0.
- Update doxygen-awesome to 2.3.1.
v2.8.0
Features
- Add
agrpc::register_callback_rpc_handler
for setting up request handling withagrpc::ServerRPCPtr
, a dynamically allocated ServerRPC which can be used to implement non-coroutine based gRPC servers. - Add experimental support for P2300R7 (
std::execution
) in the form of a new CMake targetasio-grpc::asio-grpc-stdexec
. - Breaking change: Certain completion token like
asio::experimental::use_promise
might now return a different type due to the implementation of Asio's optional requirement on asynchronous operations: The operation's associated I/O executor may be exposed via the Initiation function object's executor_type type alias and get_executor() member function.
Fixes
- Removed all usage of pointer tagging. Although Asio uses it, it is technically undefined behavior.
Performance
- Use Asio's immediate_executor in
ServerRPC::wait_for_done
andWaiter::wait
.
Documentation
- Use Asio's default completion token mechanism in examples.
- Avoid using
asio::detached
in examples since it swallows exceptions. - Document how
register_awaitable_rpc_handler
andregister_yield_rpc_handler
obtain the executor used to spawn the coroutine. - Removed documentation of deprecated CMake options.
Chore
- Remove codeql pipeline
v2.7.0
This release prepares asio-grpc for a large trim down in the next major release by adding an API that follows Asio's I/O object model more closely, avoids the pitfalls of the current API and provides more customization options.
The following headers should be considered deprecated:
bind_allocator.hpp
, cancel_safe.hpp
, default_completion_token.hpp
, get_completion_queue.hpp
, grpc_initiate.hpp
, grpc_stream.hpp
, notify_when_done.hpp
, repeatedly_request_context.hpp
, repeatedly_request.hpp
, rpc.hpp
, use_awaitable.hpp
, wait.hpp
Features
- Add
agrpc::ServerRPC
, new API for asynchronous servers. - Add
agrpc::register_awaitable_rpc_handler
,agrpc::register_yield_rpc_handler
andagrpc::register_sender_rpc_handler
functions for setting up request handling withagrpc::ServerRPC
. - Breaking change in experimental
agrpc::ClientRPC
API:- Rename
agrpc::ClientRPCGenericUnary
toagrpc::GenericUnaryClientRPC
. - Rename
agrpc::ClientRPCGenericStreaming
toagrpc::GenericStreamingClientRPC
.
- Rename
- Make unary ClientRPCs constructible and add
start
,read_initial_metadata
andfinish
member functions.
Fixes
- Avoid UB from casting function pointer to
void*
inClientRPC
,BasicAlarm
andnotify_one_state_change
asynchronous operations. - Consistently take CompletionToken by forwarding-reference.
Performance
- Improve compile times of
ClientRPC
,BasicAlarm
andnotify_one_state_change
asynchronous operations.
Documentation
- Remove documentation of old API.
Chore
- Run sonarscanner on Ubuntu 22.04 with GCC 11 and Java 17.
- Use vcpkg binarycaching with Github Caches.
v2.6.0
Features
- Breaking change in experimental agrpc::RPC API:
- Rename to
agrpc::ClientRPC
andagrpc::ClientRPCType
. - Header name changed to
client_rpc.hpp
. asio::use_awaitable
is no longer the default completion token.- Remove third template parameter.
- For streaming specializations:
- ClientRPC now creates and owns the
grpc::ClientContext
, it can be customized during construction or later access usingcontext()
. - Must now be started by calling
start()
,request()
has been removed. finish()
andwrites_done()
no longer guard against being called multiple times.
- ClientRPC now creates and owns the
- For generic specializations:
- Replace marker values
agrpc::CLIENT_GENERIC_X_RPC
withagrpc::ClientRPCType::GENERIC_X
. - Add type aliases
agrpc::ClientRPCGenericUnary<Executor>
andagrpc::ClientRPCGenericStreaming<Executor>
.
- Replace marker values
- Rename to
- De-experimentalize
agrpc::HealthCheckService
. - Add
cancel()
toagrpc::Alarm
. - Add support for libunifex v0.2.0 to
agrpc::repeatedly_request
.
Fixes
- Typo in
NotfiyWhenDoneFn
Documentation
- Simplify file-transfer example.
Chore
- Update libunifex to v0.2.0. Version 0.3.0 is also supported by held back due to an ICE in clang 10.