How supabase-community/realtime-go works
• Library Interface: The core client functionality exposed by “realtime_client.go”. This component provides the API for initiating connections and sending/receiving realtime messages.
• Feature Handlers:
• Events Handler: Represented by “events.go”, which manages subscription events or state updates.
• Message Handler: Represented by “messages.go”, handling the actual messaging logic for broadcast and CDC.
Relationships and Interactions
• That messages are received, processed, and then forwarded appropriately through the handlers.
Architectural Patterns and Technologies
• That this client library abstracts complex realtime interactions, possibly using Go’s concurrency features (goroutines, channels) even if they’re implicit from the language choice.
• Mention that the design follows a modular approach where each file (or module) encapsulates distinct responsibilities (separation of concerns).
• A note that the system relies on external CRDTs for the Presence feature and utilizes Postgres CDC to monitor database changes.