Граф коммитов

828 Коммитов

Автор SHA1 Сообщение Дата
Chad Walters ceac8d748c Update Travis CI script to reflect master changes 2017-05-23 22:50:54 -07:00
Chad Walters 47795c72f3 [c++ grpc] Add stub Windows DLL example
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.
2017-05-23 22:50:53 -07:00
Chad Walters 743cde24a4 [c++ grpc] Add static library example 2017-05-23 22:50:49 -07:00
Eduardo Salinas 26674d3943 [c++ grpc] Add threadpool to client side
- user can specify thread pool to be used to run the user's callbacks
- type aliases added for the common case when bond::ext::thread_pool is
  used
2017-05-23 21:17:30 -07:00
Christopher Warrington 66f89d0ba7 [c++ grpc] Document thread pool concept
Also, minor unit test improvements.
2017-05-23 21:10:56 -07:00
Christopher Warrington 7bbc2c034c [c++ grpc] Parameterize service thread pool impl
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.
2017-05-23 21:10:56 -07:00
Christopher Warrington c75cfebf30 [c++ grpc] Switch from comm's message to bonded
The use of bond::comm::message was just a placeholder. Its functionality
is not needed, so it has been replaced with just bond::bonded.
2017-05-23 18:20:22 -07:00
Eduardo Salinas 85bdd21d80 [appveyor] Remove submodule --depth
- Did not work as expected and caused an error when cloning
2017-05-23 15:23:51 -07:00
Eduardo Salinas 60137ee263 [c++ grpc] Add Bond-over-gRPC AppVeyor support
* Install yasm
* Handle CMake stderr output
* For minor performance improvement, only clone submodules with a depth of 5
2017-05-23 14:57:36 -07:00
Christopher Warrington 1f1ccb1e06 [c++ grpc] Make io_manager start automatically
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.
2017-05-23 14:24:02 -07:00
Christopher Warrington 2198a1f4a0 [c++ grpc] Minor clean up to pingpong_server.cpp 2017-05-22 21:46:06 -07:00
Eduardo Salinas fc3b96ca23 [c++ grpc] Generate async client proxies
* The generated C++ code now includes async proxy classes.
* Examples and tests updated to use the async proxies.
* Golden tests updated.
2017-05-22 21:40:45 -07:00
Christopher Warrington 4c41818ca1 [c++ grpc] Add Clang/GCC fixes
Minor fixes to get the new gRPC++ code building and the tests passing
with Clang and GCC.
2017-05-19 15:33:25 -07:00
Chad Walters 731d7dc137 [C++ gRPC] Update cmake flags in scripts/configs
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.
2017-05-19 13:15:03 -07:00
Chad Walters 36eebc250e Add gRPC compatibilty tests for C++ and C# 2017-05-19 13:09:06 -07:00
Chad Walters 6d8000695e [C#/C++ Comm] Improvements to Comm compat tests
Share constants across projects via enums defined in IDL. Remove
unnecessary COMM flag from compat exe. Use countdown and atomic
operations for improved stability.
2017-05-19 13:09:06 -07:00
Chad Walters faa77931b5 [C# grpc] Move to gRPC 1.3 2017-05-19 13:09:06 -07:00
Eduardo Salinas a7f272ddf4 [c++ grpc] Add Bond async client plumbing
- update test
- helloworld_proxy.h will be codegened in a future commit
2017-05-18 18:10:31 -07:00
Eduardo Salinas cbf5e5721a [c++ grpc] Fix Clang build
- shuffle CMakelists to ignore unused var warning in BoringSSL
- fix codegen to avoid Clang errors
2017-05-18 17:38:27 -07:00
Christopher Warrington 131326bb02 [c++ grpc] Update service gbc golden test files
These were inadvertently left out of commit bca06c22.
2017-05-18 16:49:59 -07:00
Chad Walters fcd492dfd7 Update BOND_TOKEN for documentation build (again) 2017-05-16 17:40:54 -07:00
Chad Walters 0a96fb6e64 Update BOND_TOKEN for documentation build 2017-05-16 17:09:54 -07:00
Christopher Warrington bca06c229c [c++ grpc] Generate async service base classes
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.
2017-05-15 16:34:41 -07:00
Christopher Warrington d760aed019 [c++ grpc] Standardize generated code indentation
The generated gRPC++ code now matches the indentation style used by the
rest of Bond (4 spaces, Allman-style braces).
2017-05-15 15:42:43 -07:00
Christopher Warrington 0a4a7d5dc9 [c++ grpc] Add gbc golden tests for gRPC codegen 2017-05-12 16:53:14 -07:00
Christopher Warrington 005c6f4987 [c++ grpc] Add cq_poller class to pull from cqs
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.
2017-05-12 16:44:31 -07:00
Chad Walters 46660fc217 Add third-party notices file 2017-05-12 14:48:26 -07:00
Christopher Warrington e895bcd753 [c++ grpc] Handle hardware_concurrency returning 0 2017-05-12 01:10:41 -07:00
Christopher Warrington d4d9c0a108 [doc] Make all public sources a Doxygen dependency
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.
2017-05-11 19:32:18 -07:00
Christopher Warrington 19057ee1ce [c++ grpc] Add Bond async server and server_builder
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.
2017-05-11 19:32:05 -07:00
Christopher Warrington bcabcd0aac Clarify string encoding in binary protocol specs
* 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
2017-05-10 18:45:04 -07:00
Christopher Warrington 2e02caafd8 Fix blob type compatibility in documentation
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
2017-05-10 18:36:45 -07:00
Christopher Warrington 966f4cd288 [c++ grpc] Avoid one buffer copy when deserializing
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>.
2017-05-10 18:33:22 -07:00
Eduardo Salinas 2fbb3611af [c++ grpc] Add initial codegen and library code
* Initial shape of proxies and services.
* Synchronous example that sends/receives Bond messages.
* Simple thread pool for dispatching work.
2017-05-10 18:33:14 -07:00
Christopher Warrington 52c05125df [c++] Use /permissive- for Visual C++ 2017
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
2017-04-28 11:44:34 -07:00
Christopher Warrington c969e2167f [c++ grpc] Add gRPC to CMake-based build
* Integrates building gRPC via its CMakeList
* Includes a dummy project to test that gRPC++ builds and can be linked
  correctly.
2017-04-27 17:58:54 -07:00
Christopher Warrington 7219f5c851 Add breaking changes between Bond C# 3.x and 4.x 2017-04-26 18:35:15 -07:00
Chad Walters 1d59ba1026 [c++] Cover CBv2 Pass0 counter in Apply test
Extend Apply test to prevent regression of Apply overload
for CompactBinary v2 Pass0.
2017-04-26 17:53:30 -07:00
Chad Walters f98e4403e3 [gbc] Change C++ Apply overload for output counter
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.
2017-04-26 10:25:09 -07:00
Veselin Petrov 906272b521 [c++] Remove FieldTemplate<> from field reflection
- 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
2017-04-25 16:48:33 -07:00
Christopher Warrington bf7129cc11 Merge 5.3.1 release changes into master 2017-04-25 15:21:44 -07:00
Christopher Warrington c402ec7cb3 Update Nuget test to version 5.3.1 2017-04-25 15:08:10 -07:00
Christopher Warrington cc8ecf23e1 Update changelog for 5.3.1 release 2017-04-25 14:48:01 -07:00
Christopher Warrington 431e245ffa [c#] Copy edit documentation comments 2017-04-25 14:48:01 -07:00
Ara Ayvazyan 0c3920afd6 [c++] Fixing a regression in pre-compiled Apply functions (#424)
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
2017-04-24 17:22:39 -07:00
Chad Walters 85148e4fe1 Point AppVeyor badge URL to team account 2017-04-24 11:26:30 -07:00
Christopher Warrington 183c617d45 [c++] Upgrade RapidJSON dependency to v1.0.0 (#421)
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
2017-04-21 09:53:25 -07:00
Christopher Warrington c494bd370b Link directly to diffs for buffer changelog entry 2017-04-20 10:25:45 -07:00
Ara Ayvazyan 11beaf5319 [c++] Fixing broken custom buffer support
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
2017-04-20 10:21:42 -07:00
Ara Ayvazyan 2cf11c5168 [gbc c++] Generate extern templates for bond::Apply
extern templates are now generated instead of overloads. This helps
reduce compiler memory use when building.

Closes https://github.com/Microsoft/bond/pull/419
2017-04-20 10:19:40 -07:00