Soheil Hassas Yeganeh
c060d55cc7
Revert "Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing."
6 years ago
Vijay Pai
05d8ddfc6e
Support callback-based generic service
6 years ago
Soheil Hassas Yeganeh
509e77a5a3
Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
...
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.
A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.
This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.
QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.
Also add tests and benchmarks for byte_buffer_reader_peek()
6 years ago
Vijay Pai
2eb25c871e
Avoid build errors
6 years ago
Vijay Pai
147c61b2a4
Exclude StartCall from starting callback counter value
6 years ago
Yuwei Huang
3cbf4f50ea
Remove extra semicolons after function definitions
...
We are planning to enable -Wextra-semi flag in our project but some
header files in gRPC have extra semicolons that violates the check and
blocks us from enabling the flag.
This change removes unnecessary semicolons in the code. Note that having
semicolon after the GRPC_ABSTRACT macro technically also violates the
check, but it's fine for us since they are not used in public headers,
and it will be confusing to have lines ending only with GRPC_ABSTRACT,
so I keep them as-is.
6 years ago
Nicolas Noble
2ad245cb0c
Revert "Folding the Channel class into the grpc_impl namespace."
6 years ago
Yash Tibrewal
89ee1a8b10
Improved interception docs
6 years ago
Yash Tibrewal
5e2e61b6e5
Note on conditions of usage
6 years ago
Yash Tibrewal
3a2cfe50ec
Rever copyright changes
6 years ago
Yash Tibrewal
9dd8a13439
Restructure code to handle cases exposed by the callback api
6 years ago
Nicolas "Pixel" Noble
cabbd35014
Reformat.
6 years ago
Yash Tibrewal
4dcb14ec9e
Fix codegen_test_minimal
6 years ago
Yash Tibrewal
d347ec7ce0
Register for cq avalanching when interceptors are going to be run
6 years ago
Nicolas "Pixel" Noble
2fd079ff7c
Channel folding.
6 years ago
Yash Tibrewal
73b1a918e4
Slight update to grammar. Can probably be improved more
6 years ago
Yash Tibrewal
b8a542cd23
Update Send message interception methods docs
6 years ago
Yash Tibrewal
361acdbed1
Use the WriteOptions in Client Callback API
6 years ago
Yash Tibrewal
b35b449166
Update docs according to #17630
6 years ago
Yash Tibrewal
34d77aae5e
Always nullify serializer to free memory
6 years ago
Yash Tibrewal
7d1491d64c
Address reviewer comments
6 years ago
Yash Tibrewal
9b9ef64027
Add more information on the usage of FailHijackedRecvMessage
6 years ago
Yash Tibrewal
2b4781ca52
Use Status() instead of Status::OK to avoid issues with codegen_test_minimal
6 years ago
Yash Tibrewal
7eeda22d9e
s/two/three
6 years ago
Yash Tibrewal
df49204b97
Remove unused variable
6 years ago
Yash Tibrewal
4224384d39
Modifying semantics for GetSendMessage and GetSerializedSendMessage.
...
Also adding ModifySendMessage
6 years ago
Yash Tibrewal
50c60f03ba
Rename GetSendMessage to GetSerializedSendMessage and GetOriginalSendMessage to GetSendMessage
6 years ago
Yash Tibrewal
c6261f4b91
Rename new SendMessage types to SendMessagePtr
6 years ago
Yash Tibrewal
4aeba42528
Provide GetOriginalSendMessage for some APIs
6 years ago
Vijay Pai
cfe08f35f3
Add comments explaining purpose and validity of interception API
6 years ago
Yash Tibrewal
31a775b425
Add missing argument
6 years ago
Yash Tibrewal
d590583456
Allow interceptor creators to return nullptr
6 years ago
Hope Casey-Allen
233123ae3f
Improve metadata documentation for the user
6 years ago
Vijay Pai
f2324e1c05
Reset the SendMessage pointer before post-interception
6 years ago
Vijay Pai
b0b4c0d9c3
Add API comments indicating that byte buffer copy is size-independent
6 years ago
Vijay Pai
e7be6223d8
Delete unwanted constructor/assignment
6 years ago
Vijay Pai
97de30d7b3
Allow the interceptor to know the method type
6 years ago
Vijay Pai
13a4977c23
Treat StartCall like a reserved callback since it is required
6 years ago
Vijay Pai
eb0b39df3d
Do OnDone as the actual last thing so that the reactor can be reused.
6 years ago
Vijay Pai
606177bbc8
Document that ClientContext must remain alive for duration of RPC
6 years ago
Vijay Pai
2a0c0d7ad6
Streaming API for callback servers
6 years ago
Vijay Pai
2b5d45ab38
Fix clang-tidy and golden file issues
6 years ago
Vijay Pai
28dd7981d6
clang-format
6 years ago
Vijay Pai
ea1156da3f
Stop exposing streaming object class
6 years ago
Vijay Pai
dac2066a1c
Make StartCall() a releasing operation so that you can pile up ops
6 years ago
Vijay Pai
fa45ffd418
Address reviewer comments
6 years ago
Vijay Pai
d7eb26648d
Client callback streaming
6 years ago
Yash Tibrewal
8fb11e6d5e
Apply the conversion on the status irrespective of whether Pluck returned true
6 years ago
Yash Tibrewal
544f2a5abb
Necessary change after #17219
6 years ago
Yash Tibrewal
00c9c40004
Remove extraneous logging statements
6 years ago