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 using metropc.frontend.StageGroup
  • The ZeroMQ protocol can be en- and decoded using metropc.frontend.encode_protocol() and metropc.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 implementations metropc.stage.ThreadRunner or metropc.stage.ProcessRunner. A StageRunner is associated with a specific stage by passing it the corresponding context class such as metropc.stage.PoolContext or metropc.stage.ReduceContext (note not an instance!).