GRPC Core  9.0.0
Polling Engines

Author: Sree Kuchibhotla () - Sep 2018

Why do we need a 'polling engine' ?

Polling engine component was created for the following reasons:

Polling Engine Implementations in gRPC

There are multiple polling engine implementations depending on the OS and the OS version. Fortunately all of them expose the same interface

Polling Engine Interface

Opaque Structures exposed by the polling engine

The following are the Opaque structures exposed by Polling Engine interface (NOTE: Different polling engine implementations have different definitions of these structures)

Polling engine API

grpc_fd

grpc_pollset

grpc_pollset_set

Recap:

Relation between grpc_pollset_worker, grpc_pollset and grpc_fd:

image

grpc_pollset_set

image

Polling Engine Implementations

epoll1

image

Code at src/core/lib/iomgr/ev_epoll1_posix.cc

epollex

image

Code at src/core/lib/iomgr/ev_epollex_posix.cc

Other polling engine implementations (poll and windows polling engine)