• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle

  • Micro services are a lot easier to scale out since they behave independently from each other, you can have different levels of replication and concurrency based on the traffic that each part of your system receives.

    Something that I think is pretty huge is that, done right, you end up with a bunch of smaller databases, meaning you can save a lot of money by having different levels of security and replication depending on how sensitive the data is.

    This last part also helps with data residency issues, which is becoming a pretty big deal for the EU.


  • I somewhat agree but I find that the added complexity is segmented, you shouldn’t need to care about anything but the contracts themselves when working within a micro service.

    That means less code to take into account, less spaghetti and an easier time with local testing.

    Micro services also have a ton of advantages at the infrastructure level.







  • It’s a bit hard to figure out the issue with just the stack trace but I’ll give it a shot.

    You are using relative imports and it looks like all your files are in the root folder. I suggest using only absolute imports as a rule and importing only the parts of the code that you need instead of entire files.

    So, instead of doing:

    from . import crud, etc, etc

    You can do:

    from crud import [whatever you need] from models import [whatever you need] Etc

    What is important is that you understand what the pythonpath is and how to structure your code around it.