Writing a frontendΒΆ
The Frontend API is mostly incomplete as of now and requires manual creation and management of several fairly low-level objects. Most commonly needed symbols can be imported from the Frontend API module.
- A context object must be created by instantiating
metropc.frontend.Context
and the pipeline can be spawned in a default configuration usingmetropc.frontend.StageGroup
- The ZeroMQ protocol can be en- and decoded using
metropc.frontend.encode_protocol()
andmetropc.frontend.decode_protocol()
, respectively. - To aid with matching data received individually to the same event, there are several matching strategies available via
metropc.frontend.EventBuffer
. - Arbitrary pipeline configurations are possible by manually creating the respective
metropc.stage.StageRunner
objects or more specifically its implementationsmetropc.stage.ThreadRunner
ormetropc.stage.ProcessRunner
. AStageRunner
is associated with a specific stage by passing it the corresponding context class such asmetropc.stage.PoolContext
ormetropc.stage.ReduceContext
(note not an instance!).