Commit Graph

15 Commits

Author SHA1 Message Date
Krisztian Litkey
b5cd6e4b32
channel: allow discovery of overflown message size.
Use a dedicated, grpc Status-compatible error to wrap the
unique grpc status code, the size of the rejected message
and the maximum allowed size when a message is rejected
due to size limitations by the sending side.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-08-27 11:23:20 +03:00
Krisztian Litkey
de273bf751
channel: reject oversized messages on the sender side.
Reject oversized messages on the sender side, keeping the
receiver side rejection intact. This should provide minimal
low-level plumbing for clients to attempt application level
corrective actions on the requestor side, if the high-level
protocol is designed with this in mind.

Co-authored-by: Alessio Cantillo <cantillo.trd@gmail.com>
Co-authored-by: Qian Zhang <cosmoer@qq.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-08-21 17:52:38 +03:00
Vincent Batts
6eee73df5d
*.go: organize errors to one spot
And add a little documentation.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-19 14:40:16 -04:00
Derek McGowan
d28bc92657 Introduce streaming to client and server
Implementation of the 1.2 protocol with support for streaming. Provides
the client and server interfaces for implementing services with
streaming.

Unary behavior is mostly unchanged and avoids extra stream tracking just
for unary calls. Streaming calls are tracked to route data to the
appropriate stream as it is received.

Stricter stream ID handling, disallowing unexpected re-use of stream
IDs.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
zounengren
81faa3ee80 replace pkg/errors from vendor
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-25 22:46:36 +08:00
Michael Crosby
d4834b09f5 Revert "Copy codes and status from grpc project"
This reverts commit f02233564f.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-10-28 14:46:51 -04:00
Michael Crosby
f02233564f Copy codes and status from grpc project
This copies the codes and status package from grpc as it is the only references
to the grpc project from ttrpc. This will help ensure that API breaking changes
in grpc do not affect ttrpc.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-10-28 12:33:50 -04:00
Michael Crosby
f3eb35b158 Refactor close handling for ttrpc clients
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-06-13 16:52:46 +00:00
Michael Crosby
0690b20898 Add apache license to files
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-06-27 17:49:06 -04:00
Stephen J Day
c575201d9a
ttrpc: refactor channel to take a conn
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-01-16 15:29:07 -08:00
Stephen J Day
2a1ad5f6c7
ttrpc: increase maximum message length
This change increases the maximum message size to 4MB to be inline
with the grpc default. The buffer management approach has been changed
to use a pool to minimize allocations and keep memory usage low.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-29 13:30:41 -08:00
Stephen J Day
7f752bf263
ttrpc: handle concurrent requests and responses
With this changeset, ttrpc can now handle mutliple outstanding requests
and responses on the same connection without blocking. On the
server-side, we dispatch a goroutine per outstanding reequest. On the
client side, a management goroutine dispatches responses to blocked
waiters.

The protocol has been changed to support this behavior by including a
"stream id" that can used to identify which request a response belongs
to on the client-side of the connection. With these changes, we should
also be able to support streams in the future.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-21 21:38:38 -08:00
Stephen J Day
f147d6ca77
ttrpc: rename project to ttrpc
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-15 17:04:16 -08:00
Stephen J Day
52978c11e8
mgrpc: decrease size of channel buffers
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-15 17:01:30 -08:00
Stephen J Day
789a1bff64
mgrpc: initial implementation of message channel
A varint prefixed framing format is defined for transport messages for
mgrpc. We may make changes to include a more structured frame, but this
initial work can be used to validate the concepts.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-14 12:04:48 -08:00