wild-workouts-go-ddd-example icon indicating copy to clipboard operation
wild-workouts-go-ddd-example copied to clipboard

How would you transform this architecture into Microservices?

Open JustJakeCalifornia opened this issue 2 years ago • 2 comments

sup, Im currently struggling to find an appropriate architecture for building Microservices in Go. Everyone says something different - no crystal-clear standardization.

It'd be great if you can show me how you would transform this approach to Microservices, bc I pretty like this architecture

JustJakeCalifornia avatar Jul 18 '22 21:07 JustJakeCalifornia

Hey -

So for the most part the code base is already split into services..

You have

internal/Trainings internal/Trainer internal/Users

There's absolutely nothing stopping you from copying this three layers and spliting them up into single repositories and or layers. In fact that's the benefit of using something like DDD-lite because you're effectively serpeating your business logic by domain boundary whether your making microservices or not.

In general though, you should be using what ever standardisation is best for you, or your company. DDD / DDD-lite / Ports & Adapters / Hexagonal aren't sliver bullets. Start of simple, refactor when needed.

abbott-m avatar Aug 01 '22 15:08 abbott-m

Sounds coherent ty. I've found my way of structuring my project and it's pretty clean in my opinion. If you're interested, check it out: https://github.com/NicoMarksman/go-license-v2. I also use the workspace feature in VSCode to separate them.

JustJakeCalifornia avatar Aug 01 '22 15:08 JustJakeCalifornia