Real-world scenarios where EdgeStream excels
EdgeStream is designed for systems that need reliable, efficient real-time message handling. Here are proven scenarios where it delivers exceptional value.
How EdgeStream powers a real-time trading platform:
const tradingStream = createEdgeStream({ logLevel: 'info' })
.register({
type: 'trading',
url: 'https://trading-server.example.com/signalr'
})
.transport({ type: 'signalr' })
.protocol('custom-binary') // Custom protocol parser
.incoming()
.add(new LogHook({ label: 'PRICE' }))
.add(new DecryptHook({ privateKeyId: 'trader-key' }))
.add(new ValidationHook({ schema: priceSchema }))
.add(new FilterHook({
predicate: (envelope) => {
// Only process significant price movements
return envelope.body.priceChange > 0.5;
}
}))
.add(new PublishToSubscribersHook())
.done()
.done()
.build();
// React component updates live
function TradingDashboard() {
const prices = useMessages('trading', 'price.*');
const status = useConnectionStatus('trading');
return (
<>
{prices.map(p => (
<PriceCard
key={p.meta.id}
currency={p.body.currency}
price={p.body.price}
change={p.body.priceChange}
/>
))}
</>
);
}
Pro: Low overhead
Con: No fallback, no protocol abstraction, manual message handling
Pro: Automatic fallback
Con: Single protocol, no composable hooks, no pause/resume
Pro: Good for real-time
Con: Tightly coupled to Node.js, not portable
Pro: Multi-transport, protocol-agnostic, composable, scalable
Con: Slight overhead vs raw WebSocket (but gains outweigh)
EdgeStream is for teams that: