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.Contextand the pipeline can be spawned in a default configuration usingmetropc.frontend.StageGroupThe 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.StageRunnerobjects or more specifically its implementationsmetropc.stage.ThreadRunnerormetropc.stage.ProcessRunner. AStageRunneris associated with a specific stage by passing it the corresponding context class such asmetropc.stage.PoolContextormetropc.stage.ReduceContext(note not an instance!).