Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why two table for the same model? #201

Open
videni opened this issue Sep 12, 2020 · 0 comments
Open

Why two table for the same model? #201

videni opened this issue Sep 12, 2020 · 0 comments

Comments

@videni
Copy link

videni commented Sep 12, 2020

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant