FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
event_sink.hpp File Reference

EventSink (5.15): the net -> engine seam. More...

#include "fastmm/core/messages.hpp"
#include "fastmm/core/msg_ring.hpp"
#include "fastmm/core/shm_ring.hpp"
#include <x86intrin.h>
#include <cstddef>
#include <cstdint>
#include <cstring>

Go to the source code of this file.

Classes

class  fastmm::venues::EventSink
 

Namespaces

namespace  fastmm
 
namespace  fastmm::venues
 

Enumerations

enum class  fastmm::venues::SinkPolicy : std::uint8_t { fastmm::venues::Drop = 0 , fastmm::venues::Spin = 1 }
 

Detailed Description

EventSink (5.15): the net -> engine seam.

A thin wrapper over the per-venue inbound MsgRing that the parsers write normalised events into. Two sinks per venue: market data (lossy: a full ring drops the delta and the book resyncs) and order events (never dropped: bounded spin then overflow callback, which the venue treats as fatal).

Run-to-completion (fastmm-live [engine] threading = "single"): the engine runs on the venue's thread and a drain hook hands it the ring's events in place. With on_commit the hook runs after every commit, so the engine takes each event as soon as it is decoded; a full ring runs it before the policy's spin either way.

fastmm-gateway points the sinks at ShmRings the attached strategy process reads (attach(ShmRing*)) and back at a local ring it discards while no strategy is attached. Switch only on the thread that pushes (a posted reactor task), never between a reserve and its commit.