Software Architecture in Golang: Orchestrator Pattern

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024

Комментарии • 36

  • @Alexyslozada
    @Alexyslozada 2 года назад +7

    Hi Mario, thanks for the video. It seems the total is returning 9 and that is wrong. Or I missed something?

    • @MarioCarrion
      @MarioCarrion  2 года назад +6

      Hey Alexys, you're totally right. I forgot one really important bit, here's the fix: github.com/MarioCarrion/videos/blob/main/2022/06/10/main.go#L29
      This happens because in the goroutine we were referring to always the same "svc" therefore it gives us some random value; however if a new variable is created the scope changes and it refers to each value as expected. It's a common gotcha when dealing with goroutines and loops.

    • @Alexyslozada
      @Alexyslozada 2 года назад

      @@MarioCarrion ah yeah! The variable is always the last one. Cool thanks

    • @TheSurvivor1963
      @TheSurvivor1963 Год назад

      @@Alexyslozada The for-loop spins around faster than the Go-routines are spawned and will always call the last function which returns 3. The fix is to introduce a local variable in the body of the for-loop which is assigned for every iteration.

  • @GabrielPozo
    @GabrielPozo 9 месяцев назад

    Simple but effective example! Thanks for sharing!

  • @0zema
    @0zema 2 года назад +1

    I really appreciate the effort that goes into these videos, many thanks!

  • @xabcyabc5467
    @xabcyabc5467 2 года назад +1

    Ohh errGroup!!! I didn't know that this exist in golang😮, btw thanks marrio sir this video was so informative for me❤️

  • @LucidGR
    @LucidGR 2 года назад

    Great videos, this channel deserves more subscribers.

    • @MarioCarrion
      @MarioCarrion  2 года назад +1

      I appreciate that Vasilis, stay safe.

  • @farzadmf
    @farzadmf 2 года назад

    Thank you, nice video! And thank you for fixing your vim/neovim's signcolumn to prevent the text (code) from jumping around as you were typing

    • @MarioCarrion
      @MarioCarrion  2 года назад +1

      Thanks Farzard, I think after the migration to LUA some things got fixed as a side effect. Best!

  • @pietart3596
    @pietart3596 Год назад

    Thanks for the video, I saw a direct example of synchronous calls. Since most api calls are asynchronous, is the orchestrator the synchronizing only other service calls?

    • @MarioCarrion
      @MarioCarrion  Год назад

      Thanks for watching. The calls in the example code are asynchronous using goroutines, what the orchestrator is doing in this case is synchronizing the results to add them all.

  • @JamsMendez
    @JamsMendez Год назад

    😎👌

  • @simajacob7416
    @simajacob7416 2 года назад

    Love your content. Can you please make a full course? just a single course on Udemy or even a personal website. Full courses on go and microservices. and others go topic. We need one full course for each great topic. here it seems like there are many of information but not properly ordered. Please we need a full course for each great topic.

    • @MarioCarrion
      @MarioCarrion  2 года назад +1

      I'm working on a course, it's taking me a bit but hopefully this year. Thanks for the support. Take care.

    • @simajacob7416
      @simajacob7416 2 года назад

      @@MarioCarrion Please We can't wait for it. Wish you all the great energy to get it done before the end of the year.

  • @Marlem80
    @Marlem80 Год назад

    hi Mario! Could you please share your vim setup? it looks so cool!

    • @MarioCarrion
      @MarioCarrion  Год назад +1

      Hello! Yes, I recently recorded a video that covers my new setup: ruclips.net/video/LbsILONOaiE/видео.html the code is here: github.com/MarioCarrion/videos/tree/269956e913b76e6bb4ed790e4b5d25255cb1db4f/2023/01/nvim

    • @Marlem80
      @Marlem80 Год назад

      @@MarioCarrion great!! :)

  • @jackn
    @jackn 2 года назад

    Great video! Really curious what LSP plugins you are using in your vim config. I use CoC right now but it doesn't look as fancy with your type definitions and icons. Do you have a vimrc or init.vim you could share?

    • @MarioCarrion
      @MarioCarrion  2 года назад +1

      Hey Jack, yes I do: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f
      For the fancy type definitions and icon I had to migrate from vimconfig to LUA, I have a blog post covering more specifics: mariocarrion.com/2022/03/26/neovim-lua-init.html
      I'm planning to create a new video covering/describing that configuration in the near future.
      Cheers!

  • @abcoflife6420
    @abcoflife6420 2 года назад

    Hi, great lesson, thank you so much, one question about the vi Editor, the Go syntax checker is very great I like it, can you please share the link for it please :))

    • @MarioCarrion
      @MarioCarrion  2 года назад

      Hello! I'm using neovim, the syntax checker comes from gopls+vim-go, here's my init.lua: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f

  • @ophirraj356
    @ophirraj356 2 года назад

    Hi. Totally off topic. VIM colorscheme looks lit. Can I know the name?

    • @MarioCarrion
      @MarioCarrion  2 года назад

      Hello! I'm using "PaperColor", here's the LUA config if you're interested: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f
      Cheers!

  • @Kindafkglad
    @Kindafkglad 2 года назад

    Hi Mario thanks for sharing you knowledge, we really appreciate the effort, keep it up man.
    I was wondering if you can list opensource projects (small or medium projects) that can be used as example regarding the golang software architecture and best practices? thanks in advance

    • @MarioCarrion
      @MarioCarrion  2 года назад +1

      Hello! Thanks for the comment, I appreciate it.
      My biased recommendation would be my own repo 😀 github.com/MarioCarrion/todo-api-microservice-example, heh, other than I think the closest thing to a *real life* example is github.com/google/exposure-notifications-server
      I hope that helps, cheers.

  • @anton_cheg
    @anton_cheg 2 года назад

    thanks