This project is part of the real-time system contest designed to test your expertise in Go and PostgreSQL. You will build a real-time backend system that leverages PostgreSQL’s LISTEN/NOTIFY mechanism and logical replication to demonstrate event-driven data updates and synchronization. The backend must be implemented in Go, and the system should showcase your understanding of both technologies.
You are required to create a real-time system that solves a problem of your choice, demonstrating the following:
- PostgreSQL LISTEN/NOTIFY for real-time event notifications.
- PostgreSQL Logical Replication for synchronizing data across databases.
- A Go backend that efficiently listens for and processes database events.
- Implement the backend entirely in Go.
- The Go service should establish a connection to PostgreSQL and use LISTEN/NOTIFY to handle real-time notifications.
- Ensure that the Go service manages database events efficiently, utilizing Go’s concurrency mechanisms (e.g., channels, goroutines) where necessary.
- Create a PostgreSQL source database that triggers notifications on data changes, such as insertions or updates.
- Set up logical replication to ensure changes in the source database are mirrored in a subscriber database.
- Your Go application should handle the data replication process or subscribe to the replicated changes.
- The Go backend should provide a simple interface (e.g., via WebSockets, HTTP streaming, or gRPC) to broadcast real-time updates to connected clients.
- Clients should be able to subscribe to specific event types if applicable, demonstrating granular control over real-time updates.
- Create a pull request with your solution