AGENTS.md
src/core/call/AGENTS.mdAGENTS.md
Quality
48/100
Scores the file, not the repository.Length
640 words
7 headings · 0 code blocksRepository
45k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# gRPC Core Call23This directory is the heart of the gRPC C++ core, defining the fundamental data4structures and mechanisms for representing and managing a single RPC.56See also: [gRPC Core overview](../AGENTS.md)78## Overarching Purpose910The code in this directory provides the client and server-side representations11of a call, the central "spine" that connects them, and the various components12needed to manage the lifecycle of an RPC, including metadata, messages, and13status.1415## Core Concepts1617* **`CallSpine`**: The `CallSpine` is the central component of a gRPC call. It18 encapsulates the call's context, including the arena allocator, call19 filters, and the pipes for message and metadata communication. The20 `CallSpine` is shared between a `CallInitiator` (the client-side) and a21 `CallHandler` (the server-side).22* **`CallInitiator`**: The `CallInitiator` is the client-side view of a call.23 It is used for initiating requests and receiving responses.24* **`CallHandler`**: The `CallHandler` is the server-side view of a call. It25 is used for handling incoming requests and sending responses.26* **`ClientCall`**: The `ClientCall` is the public client-side API for a call.27 It wraps the `CallInitiator` and `CallSpine`.28* **`ServerCall`**: The `ServerCall` is the public server-side API for a call.29 It wraps the `CallHandler` and `CallSpine`.3031## Differentiating Call V1 and Call V3 Code3233* **Implementation Class**: The classes used to represent the call interface.34 * Call Interface (Common for V1 and V3) : [call.h](../lib/surface/call.h)35 * Call V1: `FilterStackCall`36 ([filter_stack_call.h](../lib/surface/filter_stack_call.h))37 * Call V3:38 * `ClientCall`39 ([client_call.h](client_call.h))40 * and `ServerCall`41 ([server_call.h](server_call.h))42* **Concurrency Model**: Concurrency and thread safety mechanism.43 * Call V1: [Combiner](../lib/iomgr/combiner.h) and44 [WorkSerializer](src/core/util/work_serializer.h)45 * Call V3: gRPC Promise library with [`Party`](../lib/promise/party.h)46* **Companion Transports**: Transport layers compatible with each stack.47 * Call V1: CHTTP2 transport, Legacy InProc48 * Call V3: PH2, Chaotic Good, InProc transports49 * For details about the transports see50 [chttp2/AGENTS.md](../ext/transport/chttp2/AGENTS.md) and51 [chaotic_good/AGENTS.md](../ext/transport/chaotic_good/AGENTS.md)52* **Creation Method**: The entry point used to instantiate new calls.53 * Call V1: `grpc_call_create`54 * Call V3: `MakeClientCall` and `MakeServerCall`55* **Exclusive Files**: C++ source files exclusive to each stack model.56 * Call V1:57 * `src/core/lib/surface/filter_stack_call.{h,cc}`58 * `src/core/lib/surface/legacy_channel.{h,cc}`59 * `src/core/lib/channel/channel_stack.{h,cc}`60 * `src/core/lib/channel/channel_stack_builder.{h,cc}`61 * `src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc`62 * Call V3:63 * `src/core/call/client_call.{h,cc}`64 * `src/core/call/server_call.{h,cc}`65 * `src/core/call/call_spine.{h,cc}`66 * `src/core/call/call_filters.{h,cc}`67 * `src/core/client_channel/direct_channel.{h,cc}`68* **Shared Files**: Source files used by both Call V1 and Call V3.69 * `src/core/lib/surface/call.{h,cc}`70 * `src/core/lib/surface/call_utils.{h,cc}`71 * `src/core/call/metadata.{h,cc}`72 * `src/core/call/metadata_batch.{h,cc}`7374## Call V3 Stack757677<!--78Can add a text based version of this diagram if needed. It will be more79accessible to the AIs80-->8182* **`src/core/call/call_spine.{h,cc}`**: The `CallSpine` is the key83 abstraction to understand in this directory. It's the "glue" that holds a84 call together.85* The use of `CallInitiator` and `CallHandler` provides a clean separation of86 concerns between the client and server sides of a call.87* In a CallSpine we always have a `CallInitiator` and `CallHandler` pair.88* `CallInitiator` is always near/towards the client side.89* `CallHandler` is always near/towards the server side.90* When CallInitiator sends metadata, it flows into the spine. The spine91 executes filter hooks before reaching CallHandler.92* Similarly, response metadata and messages from CallHandler pass through93 filters and reach the CallInitiator.9495## Files9697* **`src/core/call/client_call.{h,cc}`**: These files define the `ClientCall`98 class.99* **`src/core/call/server_call.{h,cc}`**: These files define the `ServerCall`100 class.101* **`src/core/call/metadata.{h,cc}`**,102 **`src/core/call/metadata_batch.{h,cc}`**: These files provide the data103 structures for representing and manipulating RPC metadata.104* **`src/core/call/message.{h,cc}`**: Defines the `Message` class, which is a105 container for RPC messages.106* **`src/core/call/call_filters.{h,cc}`**: These files define the107 `CallFilters` class, which is responsible for managing the filters for a108 call.109* **`src/core/call/interception_chain.{h,cc}`**: These files define the110 `InterceptionChain` class, which is used to manage the execution of a set of111 interceptors.112113## Notes114115* This directory is heavily based on the116 [gRPC Core Promise API](../lib/promise/AGENTS.md). Familiarity with that API117 is essential for understanding the code here.118* The `CallFilters` class is responsible for managing the filters for a call.119 See the [channel documentation](../lib/channel/AGENTS.md) for more120 information about filters.121
Also in grpc/grpc
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| grpc/grpcsrc/core/ext/filters/census/AGENTS.md · 45k | AGENTS.md | no sections | 25/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/gcp_authentication/AGENTS.md · 45k | AGENTS.md | security | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/http/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/stateful_session/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chaotic_good/AGENTS.md · 45k | AGENTS.md | no sections | 48/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/inproc/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/filter/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/handshaker/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/server/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/service_config/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/telemetry/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/transport/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/transport/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/backend_metrics/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/alts/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/call/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chttp2/AGENTS.md · 45k | AGENTS.md | testarchdependencies | 48/100 | 3 days ago | |
| grpc/grpcAGENTS.md · 45k | AGENTS.md | styledependenciesdo-not | 54/100 | 3 days ago |
Diff against src/core/ext/filters/census/AGENTS.md Diff against src/core/ext/filters/gcp_authentication/AGENTS.md Diff against src/core/ext/filters/http/AGENTS.md Diff against src/core/ext/filters/stateful_session/AGENTS.md Diff against src/core/ext/transport/chaotic_good/AGENTS.md Diff against src/core/ext/transport/inproc/AGENTS.md Diff against src/core/filter/AGENTS.md Diff against src/core/handshaker/AGENTS.md Diff against src/core/server/AGENTS.md Diff against src/core/service_config/AGENTS.md Diff against src/core/telemetry/AGENTS.md Diff against src/core/transport/AGENTS.md Diff against src/core/credentials/transport/AGENTS.md Diff against src/core/ext/filters/backend_metrics/AGENTS.md Diff against src/core/credentials/AGENTS.md Diff against src/core/tsi/AGENTS.md Diff against src/core/tsi/alts/AGENTS.md Diff against src/core/credentials/call/AGENTS.md Diff against src/core/ext/transport/chttp2/AGENTS.md Diff against AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| vllm-project/vllmAGENTS.md · 88k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| react/react-nativepackages/react-native-compatibility-check/AGENTS.md · 126k | AGENTS.md | testlint-formatstylearch+4 | 99/100 | 3 days ago | |
| netdata/netdatasrc/go/plugin/ibm.d/AGENTS.md · 80k | AGENTS.md | buildtestlint-formatarch+3 | 99/100 | 3 days ago | |
| dragonflydb/dragonflyAGENTS.md · 31k | AGENTS.md | setupbuildtestlint-format+10 | 96/100 | 2 days ago | |
| dotnet/aspnetcoresrc/Components/AGENTS.md · 38k | AGENTS.md | buildteststylearch+3 | 96/100 | 3 days ago | |
| duckdb/duckdbAGENTS.md · 40k | AGENTS.md | buildtestlint-formatstyle+8 | 96/100 | today | |
| steipete/CodexBarAGENTS.md · 20k | AGENTS.md | buildteststylearch+4 | 93/100 | 3 days ago |
