You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add language-level event pub/sub built on BEAM distribution. on :event_name do handlers auto-register as processes. Event.emit(:event_name, data) broadcasts across all nodes. No Redis/RabbitMQ needed — the BEAM IS the message bus.
Extends the existing roadmap item "Distributed Events" (#33) with concrete syntax.
Syntax
module OrderEvents
on :order_placed do |order|
Logger.info("New order: #{order.id}")
Notification.send(order.user)
end
on :payment_failed, retry: 3 do |order|
PaymentService.retry(order)
end
end
# Anywhere in the app
Event.emit(:order_placed, order)
# Works across BEAM nodes automatically
Design
on keyword registers event handlers as supervised processes
Summary
Add language-level event pub/sub built on BEAM distribution.
on :event_name dohandlers auto-register as processes.Event.emit(:event_name, data)broadcasts across all nodes. No Redis/RabbitMQ needed — the BEAM IS the message bus.Extends the existing roadmap item "Distributed Events" (#33) with concrete syntax.
Syntax
Design
onkeyword registers event handlers as supervised processesagentkeyword — stateful actors as a language primitive #102) under the hood — stateful, fault-tolerantEvent.emitbroadcasts viapg(process groups) for distributed supportretry,timeout,async(fire-and-forget vs acknowledged)Dependencies
agentkeyword — stateful actors as a language primitive #102 (agentkeyword) as foundation