The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
h-vetinari 2d1595c9af
[Build] Shared builds on windows (#34103)
1 year ago
..
internal [slice] Mutable slice cast (#31959) 2 years ago
README.md gRPC EventEngine Interface (#25795) 4 years ago
endpoint_config.h Revert "Revert "Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args"" (#30509) 2 years ago
event_engine.h [Build] Shared builds on windows (#34103) 1 year ago
memory_allocator.h [chttp2] Use RefCountedPtr for grpc_chttp2_transport (#33746) 1 year ago
memory_request.h Reland resource quota work (#28017) 3 years ago
port.h Add NetBSD support (Community-supported) (#29542) 3 years ago
slice.h Expand SliceCast to support casts to MutableSlice type (#31996) 2 years ago
slice_buffer.h [fixup] EventEngine Nomenclature (#32195) 2 years ago

README.md

gRPC EventEngine

An EventEngine handles all cross-platform I/O, task execution, and DNS resolution for gRPC. A default, cross-platform implementation is provided with gRPC, but part of the intent here is to provide an interface for external integrators to bring their own functionality. This allows for integration with external event loops, siloing I/O and task execution between channels or servers, and other custom integrations that were previously unsupported.

WARNING: This is experimental code and is subject to change.

High level expectations of an EventEngine implementation

Provide their own I/O threads

EventEngines are expected to internally create whatever threads are required to perform I/O and execute callbacks. For example, an EventEngine implementation may want to spawn separate thread pools for polling and callback execution.

Provisioning data buffers via Slice allocation

At a high level, gRPC provides a ResourceQuota system that allows gRPC to reclaim memory and degrade gracefully when memory reaches application-defined thresholds. To enable this feature, the memory allocation of read/write buffers within an EventEngine must be acquired in the form of Slices from SliceAllocators. This is covered more fully in the gRFC and code.

Documentating expectations around callback execution

Some callbacks may be expensive to run. EventEngines should decide on and document whether callback execution might block polling operations. This way, application developers can plan accordingly (e.g., run their expensive callbacks on a separate thread if necessary).

Handling concurrent usage

Assume that gRPC may use an EventEngine concurrently across multiple threads.

TODO: documentation

  • Example usage
  • Link to gRFC