Releases: Tradias/asio-grpc
Releases · Tradias/asio-grpc
v3.4.0
Features
- (experimental) RPC handlers passed to
register_x
functions may now have a member function calledrequest_message_factory()
whose return object will be used to create the initial request message in unary and server-streaming rpcs. This can be used to allocate the message in a protobuf arena (example) or reuse it between rpcs. - Make Asio based
register_x
functions compatible withGrpcContext::run_completion_queue/poll_completion_queue()
- Cleanup
asio-grpc.natvis
and add support for Asio+libunifex/stdexec mixed builds.
Performance
- Changed
GrpcContext::shutdown_
from atomic to regularbool
. This bool is checked at the start and end of every asynchronous operation.
Documentation
- Add server example showing how to use an
asio::io_context
as the main execution context and aGrpcContext
on a separate thread withGrpcContext::run_completion_queue()
.
v3.3.0
Features
- (experimental) Add
agrpc::register_coroutine_rpc_handler
, a generic version ofagrpc::register_awaitable_rpc_handler
that can be used to handle RPCs with all kinds of awaitable types likeasio::experimental::coro
andboost::cobalt::task
. This can, for example, be used to implement async generator style rpc handler:
asio::experimental::coro<const example::v1::Response*, grpc::Status>
handle_server_streaming_request(agrpc::GrpcExecutor executor, example::v1::Request& request)
{
example::v1::Response response;
response.set_integer(request.integer());
agrpc::Alarm alarm{executor};
for (size_t i{}; i != 5; ++i)
{
response.set_integer(response.integer() + 1);
co_yield &response;
co_await alarm.wait(std::chrono::system_clock::now() + std::chrono::seconds(1));
}
co_return grpc::Status::OK;
}
Fixes
- Fix compilation of
health_check_service.hpp
with recent gRPC versions by removing use ofGPR_ASSERT
macro.
Documentation
- Code snippets now have a copy button in the top right corner.
- Improve several links between classes/functions in the documentation.
- Document
agrpc::DefaultServerRPCTraits
. - Fix empty documentation of
agrpc::ClientRPC<GENERIC_STREAMING>
andagrpc::ServerRPC<GENERIC>
.
Chore
- Replace Clang 12 build with Clang 18.
- Update doxygen to 1.12.0 and doxygen-awesome to 2.3.4.
- Update vcpkg, includes Boost 1.86 update.
v3.2.1
Fixes
- Fix compilation when
ASIO_USE_TS_EXECUTOR_AS_DEFAULT
is defined. Note thatasio::experimental::parallel_group
does not seem to support it and therefore any asio-grpc example that makes use of parallel groups will not compile. Additionally, asio-grpc does not guarantee that future versions remain compatible withASIO_USE_TS_EXECUTOR_AS_DEFAULT
since this preprocessor definition is meant as a migration aid for Boost.Asio 1.73->1.74 and asio-grpc requires Boost.Asio 1.74. Please update your code so that it no longer needs the definition.
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.