None of the gRPC++ stuff takes advantage of being built into a DLL at
the moment. But, we want to make sure that we don't regress on DLL
support for types. And, this can grow in the future if needed.
Services and servers can now use their own thread pool implementations
to control where the implementation of the service method runs.
Type aliases are provided for the normal use case: using an instance of
bond::ext:thread_pool.
By default, bond::ext::gRPC::io_manager now starts its polling threads
automatically. A new constructor overload has been added to permit a
delayed/manual start.
Unit tests have been added to test delay start, and existing code
refactored.
Replace BOND_CORE_ONLY with BOND_ENABLE_COMM and BOND_ENABLE_GRPC in cmake
scripts and configs for AppVeyor and Travis. Both BOND_ENABLE_COMM and
BOND_ENABLE_GRPC are set to TRUE by default.
Share constants across projects via enums defined in IDL. Remove
unnecessary COMM flag from compat exe. Use countdown and atomic
operations for improved stability.
gbc now generates service base clases that inherit from
bond::ext::gRPC::detail::service and can be used with
bond::ext::gRPC::server_builder. These generated service classes only
have asynchronous implementations.
Tests and examples have been updated to use the newly generated service
based classes.
The cq_poller class is responsible for maintaining a set of threads that
continually pull from the completion queue until a shutdown is
requested.
* Implemented cq_poller with a fixed number of threads.
* Added unit tests for cq_poller.
* Renamed io_mgr_tag to cq_poller_tag.
* Moved the event synchronization primitive code to produce code.
* Added countdown_event and barrier synchronization primitives.
Now building the documentation target will re-run Doxygen if any of the
public header files that comprise Bond have been changed.
CMake GLOB patterns can cause some problems: the glob is evaluated once
when the project files are generated. If files are added after
project generation, the project file won't know to re-run CMake.
Since we're just using this for documentation, and the official
documentation build always runs CMake, this trade off is acceptable.
Adds gRPC++ wrappers that provide asynchronous service dispatch. The
user implementation of the service method is not executed on the same
thread as processing network I/O.
Interesting new abstractions:
* server: a host for multiple services. Handles network I/O and routing
requests to the correct instances.
* server_builder: helper to create server instances.
* service: a helper class that codegen will use to generate abstract
server classes that a server hosts.
* unary_call: the context needed to response to the client's request.
* detail::unary_call_impl: the real implementation of unary_call, but
with a wider interface than we want to expose via unary_call. Also,
unary_call is move-only.
* detail::service_unary_call_data: context needed to receive one
request.
* Use Unicode jargon when it helps.
* Clarify that strings are UTF-8 and that wstrings are UTF16-LE, if
you're strictly following the spec.
* Copy simple binary spec from the .cs file to the .h file.
Closes https://github.com/Microsoft/bond/pull/440
The schema evolution documentation erroneously said that blobs were
compatible with list/vector<uint8>. They are compatible with
list/vector<int8>.
Closes https://github.com/Microsoft/bond/pull/444
Before, we were making two copies of the buffer given to us by gRPC in
the implementation of grpc::SerializationTraits::Deserialize for Bond
messages. This has been replaced with use of grpc_byte_buffer_reader to
only make one copy: from the grpc_byte_buffer to
boost::shared_ptr<char[]> that we then us to create the bonded<T>.
Visual C++ 2017 has a new compiler switch to enable a more
standards-compliant mode. Since we build cross-compiler and
cross-platform, this flag can help us catch certain errors faster, so we
now enable it if the compiler supports it.
Closes https://github.com/Microsoft/bond/pull/422
Fix regression introduced in https://github.com/Microsoft/bond/pull/418.
Shift Apply overload on CompactBinary protocol from OutputCounter to
CompactBinaryCounter so that the right Apply overload is pre-instantiated.
- FieldTemplate<> params were part of field reflection type. This
unnecessary increases size of generated symbol names, so instead we
generate an unnamed struct.
Closes https://github.com/Microsoft/bond/pull/374
After introducing the two simpler overloads of Apply in commit d2be63b30e, the case when passing a non-const reference to bonded<> selects an overload that takes non-const T& while corresponding *_apply.cpp compiles it with const argument. This change fixes it by making sure that Apply accepting T& participates in overload resolution only for modifying transforms.
Closes https://github.com/Microsoft/bond/pull/424
To build with Visual C++ 2017, we need a [fix from RapidJSON for the
_umul128 intrinsic][1]. This fix was first included in the v1.0.0
release of RapidJSON.
Fixes https://github.com/Microsoft/bond/issues/340
[1]: 4b4f726dd8
Users who are implementing custom streams are now required to provide
the free functions `CreateInputBuffer`, `CreateOutputBuffer` and
`GetBufferRange`, depending on which scenarios are used.
Closes https://github.com/Microsoft/bond/pull/410