Skip to content

Why two table for the same model? #201

Open
@videni

Description

@videni

Hi, thanks for creating this repo which is what I want badly😃. after check all source codes of this repo, I have a few questions in my head.

this repo has three apps, so I assume each one is a micro service

  1. How do micro services interact with each other, via HTTP or grpc? how to use the Saga pattern for distributed transaction? are these subjects in the scope of this repo? there are so many things to talk about if this DDD example goes into micro service .

  2. The Backoffice and the Mooc subdomains use a different db table for the same cource model, how do we keep data in sync, is it neccesaary to create two models for the same data, why not use the same one?

CREATE TABLE `courses` (
  `id` CHAR(36) NOT NULL,
  `name` VARCHAR(255) NOT NULL,
  `duration` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `backoffice_courses` (
    `id` CHAR(36) NOT NULL,
    `name` VARCHAR(255) NOT NULL,
    `duration` VARCHAR(255) NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions