• draughtcyclist@lemmy.world
    link
    fedilink
    arrow-up
    78
    arrow-down
    5
    ·
    6 months ago

    As an operator, this who thread reads like a bunch of devs who don’t understand networking and refuse to learn.

    Sure, for smaller applications or small dev teams it doesn’t make sense. But for so many other things it does.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      37
      arrow-down
      2
      ·
      6 months ago

      The problem is that all projects start small, and frankly most of them die small. Aiming for microservices architecture right away is a surefire way to get the project killed before anyone would benefit off of the microservices.

      • whoisearth@lemmy.ca
        link
        fedilink
        arrow-up
        45
        ·
        6 months ago

        The other angle is the majority of Devs are just… Not good…

        A good Dev in the situation you mention will design the solution needed now not the one you hope for later.

        I’m saying this as someone who has been mired in scope creep and over engineering solutions many times in my life because “what if 5000 people need to use it at once?!”

        In most cases all you need is a database, a single thread and a simple API. Build it and then as the problems come grow with them. Try to take into account issues of scale but realize you can’t and shouldn’t solve every scenario because there are too many variables which may never exist.

        • Korne127@lemmy.world
          link
          fedilink
          arrow-up
          29
          arrow-down
          1
          ·
          6 months ago

          A good Dev in the situation you mention will design the solution needed now not the one you hope for later.

          Maintainability is one of the most important if not the most important goal when programming. If a dev only designs a solution that fits for exactly the current situation but doesn’t allow any changes, it’s not a good dev.
          But yeah, if you start small, a solution that’s made for that is preferable. You can still refactor things when you get magnitudes larger and have the budget.

          • floofloof@lemmy.ca
            link
            fedilink
            English
            arrow-up
            21
            ·
            edit-2
            6 months ago

            The tricky thing about software development is this balance: you don’t want to hobble your system by designing only for today, because that could waste a whole lot of time later when needs change, but you also mustn’t paralyze the project by designing for all possible tomorrows. Finding a middle path is the art, and the only proof that you got it somewhat right is that things get done with relatively few crises.

            • reflectedodds@lemmy.world
              link
              fedilink
              arrow-up
              6
              ·
              6 months ago

              Microservice from the start may be a lot of overhead, but it should at least be made with that scalability in mind. In practice to me, that just means simple things like make sure you can configure it via environment vars, run it out of docker compose or something because you need to be able install it on all your dev systems and your prod server. That basic setup will let you scale if/when you need to, and doesn’t add anything extra when planned from the start.

              Allocating infrastructure on a cloud service with auto scaling is the hard part imo. But making the app support the environment from the start isn’t as hard.

          • magic_lobster_party@kbin.run
            link
            fedilink
            arrow-up
            16
            ·
            6 months ago

            Often a simple solution is the most maintainable solution. In my experience, the code that’s most difficult to maintain are often made by devs who tried to plan ahead. The code turns over engineered to allow for stuff that never materialized.

          • Potatos_are_not_friends@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            6 months ago

            If a dev only designs a solution that fits for exactly the current situation but doesn’t allow any changes, it’s not a good dev.

            I don’t think anybody is arguing this. Nobody (in my decade-plus in this industry) actively codes in a way to not allow any changes.

            • floofloof@lemmy.ca
              link
              fedilink
              English
              arrow-up
              4
              ·
              6 months ago

              You evidently haven’t met my colleagues. There are always people who go for the quickest hack despite the trouble it stores up for later, and they’re usually encouraged by management.

      • Potatos_are_not_friends@lemmy.world
        link
        fedilink
        arrow-up
        16
        ·
        6 months ago

        I always lump microservices architecture as premature optimization, one that should be used when you’re maxed out of resources or everything is too spaghetti.

        I love the idea. And I even pitched it for a specific project. But I had to eat humble pie when the devops nerds threw more servers at the problem and it worked better than I expected.

        • lemmyvore@feddit.nl
          link
          fedilink
          English
          arrow-up
          4
          ·
          6 months ago

          Sounds like that thing was already designed to be horizontally scalable. Was your error related to not realizing that? Or what was the problem being solved by microservices?

    • lemmyvore@feddit.nl
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 months ago

      Most software developers have no concept of real world limitations and issues like tolerances, failure, probability, latency, hysteresis, ramp-up etc. because they’re not engineers.

      Normally they’d be expected to at least account for software-specific aspects like ACID or CAP or some vague awareness of the fact that when you’re dealing with multiple systems the data may not always arrive as you expect it, when you expect it. But even that is a crapshoot.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      9
      arrow-down
      2
      ·
      6 months ago

      Networking has little to do with it.

      Microarchitecture needs to be broken up into components. Those components need to send messages to each other. Components sending messages to each other is arguably the core of what object oriented design was trying to do all along. If your devs were bad at classifying components in an object oriented design, then they’ll probably be bad at it in a microarchitecture, too. Worse, the actual system is now likely spread amongst many different version control repositories, and teams stake out ownership of their repositories. Now you get more blockers spread amongst several teams.

      Where the network layer comes into play is to replace something that used to be running in a single CPU core, or sometimes different cores on the same motherboard. Unless you can exploit parallelization for your use case, the kind where you have more threads than the number of CPU threads a single motherboard can handle (which can be several hundred on current systems), this will always be slower.

      • Pacmanlives@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        6 months ago

        Being an older system admin this is how we worked. Would generally have an A and B side and maybe C on our stacks. Most of the time what I supported would be A and B clusters in two data centers and then do either 100% on our primary site or do a mix of traffic between our two sites