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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating non-core functionality into separate modules #708

Open
eutkin opened this issue Feb 17, 2020 · 0 comments
Open

Separating non-core functionality into separate modules #708

eutkin opened this issue Feb 17, 2020 · 0 comments

Comments

@eutkin
Copy link

eutkin commented Feb 17, 2020

Problem

ScaleCube Services has supporting subsystems that allow it to be self-contained. For now, I want to highlight two subsystems:

  • subsystem IoC (DI): @Inject, etc;
  • subsystem Security: @Principal, Authenticator, etc.

These subsystems are hardcoded into the project, which prevents ScaleCube Services from integrating with third-party implementations of IoC/Security frameworks: Spring IoC, Guice, Spring Security, Okta, etc.

Problems that prevent integration:

  • duplication of functionality;
  • conflict of namespaces of different frameworks: the same for annotations @Principal, @Inject ;
  • cyclical dependence in ScaleCube IoC between instance service and instance Microservices;
  • a mechanism for solving the type of parameter corresponding to the user's profile in the service method.

Solution

I propose the following algorithm:

  1. to separate the subsystems described above into separate modules;
  2. to replace them with SPI interfaces;
  3. to connect modules from item 1 as default implementations
  4. write modules implementation using popular frameworks (I can take over completely).

Motivation

I faced this problem when integrating the project with the Spring Framework. Integration is possible, but it looks redundant and crooked.

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

Successfully merging a pull request may close this issue.

4 participants