• fubo@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    1 year ago

    Microservices are great if you have enough traffic that you can get an efficiency gain by independently scaling all those services. But if you aren’t deploying onto thousands of servers just to handle traffic volume, you probably don’t need 'em.

    Your startup that has no users yet does not need the kind of architecture that Google uses, because your startup doesn’t have the scaling problems that Google has.

    • lysdexic@programming.dev
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 year ago

      Microservices are great if you have enough traffic that you can get an efficiency gain by independently scaling all those services. But if you aren’t deploying onto thousands of servers just to handle traffic volume, you probably don’t need 'em.

      I don’t think that’s a valid take. Microservices have nothing to do with scaling or performance, at least for 99% of the cases out there. Microservices are a project- and team-management strategy. It’s a way to peel out specific areas of responsibility from a large project, put together a team that is dedicated to that specific area of responsibility, and allow it to fully own and be accountable for the whole development life cycle, specially operations.

      Being able to horizontally scale a service is far lower in the priority queue, and is only required once you exhaust the ability to scale vertically.

    • MsPenguinette@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      In defense of those startups, I’m sure most of are doing it because theyve got organizational PTSD from beeing places be too fucked to be able to update their architecture rather than just overeagerness.

      • fubo@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        1 year ago

        Well yeah, but you don’t solve that by layering more complexity on top of it. If you can’t yet release your code onto five servers without breaking the world for all users, you’re not yet into a place where you need fifteen microservices. Google didn’t have Kubernetes or Borg when they started out either; they had servers held together with Lego blocks because that’s what they happened to have.

  • Olap@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    1 year ago

    Microservices are a reflection of Conway’s law. You can bend it with multiple services masquerading as a monolith. But you can’t break it and when you need to decouple deployments, data releases, and development across a fairly large org: they’re hard to beat. Of course OP is right, just call them services too. One per team is about as much as you want to break out, don’t go micro

  • Elise@beehaw.org
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    1 year ago

    As a game dev updating my ancient backend knowledge I really was confused about this specific topic.

    And I feel the same way about the many new languages. Why not just upgrade the existing ones.

    • TheOneCurly@lemmy.theonecurly.page
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 year ago

      If you’ve ever followed the C++ committee discussions you’ll see they put a lot of time and effort into considering legacy code when introducing language changes. For better or worse existing languages are on a trajectory set from their inception that can’t always be easily redirected. New languages are free of this baggage and can wildly experiment.

      • TehPers@beehaw.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        I wish languages were more willing to release breaking versions, like a C++ v2 or such. That’s not to say languages don’t already have breaking changes between versions (Python comes to mind), but it would allow people to start fresh and clean up obsolete designs and libraries.

        • magic_lobster_party@kbin.social
          link
          fedilink
          arrow-up
          5
          ·
          1 year ago

          You know the cleaning up probably won’t happen. If some dependency doesn’t work anymore because Python introduced a breaking change, then you stick with the old Python version.

    • kSPvhmTOlwvMd7Y7E@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Your last question is equivalent to : why there so many math theories? Can’t we just reuse the old ones?

      New language appear as a natural product from research in type theory for ex

  • Lmaydev@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    There is no standard tooling for microservices-based development - there is no common framework

    DAPR gets you most of the way there.

  • Moc@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Someone in the thread mentioned that to get the benefits of micro services in a monolith, you can use a linting rule to prevent dependencies across modules

    Share data, not state.

    In Rust this is a pretty good use-case for channels, which can be used to send messages across threads.

    • lysdexic@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

      Someone in the thread mentioned that to get the benefits of micro services in a monolith, you can use a linting rule to prevent dependencies across modules

      I don’t think that makes any sense. The main benefit of microservices is organizational, more specifically how a single team gets to own all aspects of developing, managing, and operating a service.

      Lower in priority, there’s enabling regional deployments and improved reliability.

      How are linting rules even expected to pull that off?

      • Moc@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Should have explained my viewpoint. Most startups should not do micro services.

        Using linting to prevent coupling between modules can give you some of the benefits of micro services without going all in.

  • macniel@feddit.de
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    orchestrating units is a very joyful experience though. Doesn’t matter if those are actual (micro-)services on dedicated servers or just pure functions.

    And if you write pure functions (stateless, no sideeffects, work only on the data you get via parameters), the step to make it scalable is super tiny.