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

NEW ARCHITECTURE PROPOSAL #70

Open
juicycleff opened this issue Feb 26, 2020 · 13 comments
Open

NEW ARCHITECTURE PROPOSAL #70

juicycleff opened this issue Feb 26, 2020 · 13 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@juicycleff
Copy link
Owner

I have a new proposal to change the entire architecture to decoupled services and by that, I mean services not tied to APIs directly. For example, in the current implementation and design, the services are closely tied to GraphQL and that was the plan from the beginning, but moving forward, that will change and doing so we can have better control of our services. and graphql should be one means of talking to the services. below is a diagram of how the new architecture should look like. I would need your contributions is you are willing to share

Ultimate Backend Diagram

@juicycleff juicycleff added enhancement New feature or request question Further information is requested labels Feb 26, 2020
@juicycleff
Copy link
Owner Author

juicycleff commented Feb 26, 2020

Again the to level Graphql gateways can be omitted in this design giving for flexibility .on how much of your API you need in graphs or rest and the likes @av8ta @fabiofdsantos would love to hear your take on this

@juicycleff
Copy link
Owner Author

You can like this new design

@juicycleff juicycleff pinned this issue Feb 26, 2020
@fabiofdsantos
Copy link

I believe this new architecture makes more sense to build a generic starter kit..

@juicycleff
Copy link
Owner Author

As of today I have migrated to project to the new architecture. I'm still writing tests. I will make a push to a V2 branch this weekend. Stay safe

@juicycleff
Copy link
Owner Author

juicycleff commented Apr 3, 2020

Here is the new architecture https://github.com/juicycleff/ultimate-backend/tree/next . I Will add a multitenant project service to show multi-tenancy. You will notice things are more cleaner with a lot less boilerplate code. It should be out by tomorrow with test and DevOPS working. The GraphQL mutation API is also rewritten in a cleaner way mind you. In some circumstances, the mutation API structure in the master branch is better. Look at issues involved with GraphQL mutation namespace

Role-based access control, as well as tenant access token API, has been rewritten to match modern-day API key spec.

@juicycleff
Copy link
Owner Author

juicycleff commented Apr 23, 2020

Who uses Kubernetes and CoreDNS as a service registry?

@juicycleff
Copy link
Owner Author

Note next branch has been merged to master

@kamranblueeast
Copy link

Any one tried with consul configration in docker-compose.yml?

@kamranblueeast
Copy link

Hi @juicycleff , I am stuck at configring consul in docker-compose.yml.
Any directions?

@cemeheeb
Copy link

cemeheeb commented Oct 19, 2020

@kamranblueeast
for me, next steps solved issue:

  1. Define network in docker-compose:
    networks: backend: driver: bridge ipam: driver: default config: - subnet: 172.172.0.0/24

  2. Setup IP address for consul and define env variable CONSUL_HOST like below:
    ` consul:
    networks:
    backend:
    ipv4_address: 172.172.0.201
    container_name: consul
    ports:

    • "8400:8400"
    • "8500:8500"
    • "8600:53/udp"
      image: consul
      command: ["agent", "-server", "-bootstrap", "-ui", "-bind={{ GetInterfaceIP "eth0" }}", "-client", "0.0.0.0"]
      environment:
    • CONSUL_HOST={{ GetInterfaceIP "eth0" }}
      labels:
      kompose.service.type: nodeport
      kompose.service.expose: "true"
      kompose.image-pull-policy: "Always"
      `
  3. In every apps/service/src/bootstrap-development.yaml, also need to replace localhost to ${{CONSUL_HOST}}:
    consul: host: ${{CONSUL_HOST}} port: 8500

Note after change apps/service/bootstrap-development.yaml you must rebuild docker image.
I am not expert in docker and in this repo, but this helped me.

@kamranblueeast
Copy link

@cemeheeb thanks, let me try with this one.

@kamranblueeast
Copy link

@cemeheeb, if you can explain point 1?
and after setting networks:backend as you set in point 2, it prompts me network undefind error.

@duniapay
Copy link

duniapay commented Jan 8, 2021

anyone still working on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants