Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3673

Decentralize DB & Enforce Service Data Ownership

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • swatch-database
    • None
    • enforce db service ownership
    • False
    • Hide

      None

      Show
      None
    • False
    • To Do
    • 100% To Do, 0% In Progress, 0% Done

      What We Need to Do: We will refactor our shared PostgreSQL database to assign dedicated schemas and database roles (users) to each service. This involves creating new schemas and roles, migrating existing service-specific tables into their new respective schemas, and configuring each service to connect using its own dedicated role and default schema. We will revoke default CREATE privileges on the public schema.

      Why We Should Do It: Currently, all services share the same database and user, leading to blurred ownership and a high risk of accidental cross-service data interactions or schema conflicts. This initiative directly supports our Service-Oriented Architecture (SOA) principles by enforcing strict separation of concerns at the database level. It will prevent naming collisions, clarify data ownership, and reduce coupling between services.

      What Benefit We Get From It: This effort will provide clear data ownership for each service, enabling independent schema evolution and reducing the "blast radius" of database changes. It will simplify testing, improve deployment confidence, and significantly reduce the risk of unintended side effects from database interactions, ultimately leading to a more robust, maintainable, and scalable architecture.

      https://docs.google.com/document/d/13EPptVE77ygwbSjxVWJfBPFmromFaOys4x2lOdF5uzc/edit

              Unassigned Unassigned
              lburnett0 Lindsey Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: