Skip to content

Server

The gRPC server implementation for MEF3 file access.

mef3io_server.server.mef3_server

gRPCMef3Server

gRPCMef3Server(file_manager)

Bases: gRPCMef3ServerServicer

gRPC servicer for MEF3 files. Stateless, delegates all requests to FileManager.

Initializes the gRPC servicer.

Parameters:

Name Type Description Default
file_manager FileManager

The FileManager instance to delegate requests to.

required

gRPCMef3ServerHandler

gRPCMef3ServerHandler(port, max_workers=4, tile_duration_s=60, tile_cache_bytes=512 * 1024 * 1024, use_process_pool=True, reader_processes=None, prefetch_processes=None, min_parallel_tiles=2, prefetch_ahead_windows=1, prefetch_behind_windows=1, cache_ttl_s=1800)

Handler to launch and manage the gRPC MEF3 server lifecycle.

Initializes the gRPC server and FileManager.

Parameters:

Name Type Description Default
port int

Port to listen on.

required
max_workers int

Max worker threads for the prefetch thread fallback.

4
tile_duration_s float

Tile length (seconds) for timestamp-based access.

60
tile_cache_bytes int

Global tile cache byte budget.

512 * 1024 * 1024
use_process_pool bool

Decode in worker processes for parallel decode.

True
reader_processes int or None

Total decode worker processes (auto cpu-1).

None
prefetch_processes int or None

Background prefetch lane size (auto half).

None
min_parallel_tiles int

Min missing tiles before fanning out to the pool.

2
prefetch_ahead_windows int

Windows to prefetch ahead (page forward).

1
prefetch_behind_windows int

Windows to prefetch behind (page backward).

1
cache_ttl_s float or None

Discard tiles idle longer than this.

1800