How To Build And Structure A Microservice In Golang?!

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 80

  • @anthonygg_
    @anthonygg_  Рік тому

    ► Join my Discord community for free education 👉 discord.com/invite/bDy8t4b3Rz
    ► Become a Patreon for exclusive tutorials 👉 www.patreon.com/anthonygg_
    Thanks for watching

  • @eastquack3342
    @eastquack3342 Рік тому +26

    I saw some other vids and at first I cringed at the "high value software engineer" stuff but the more vids I watch the more I realise he has a point; also, as far as I can tell, he is a seasoned gopher to say the least; this stuff is pure gold, so glad I stumbled upon this

  • @0zema
    @0zema Рік тому +19

    its not just about the bigger lesson in the video, your tips and hints - such as the defer trick with named returns - are valuable beyond reason!
    I'll say it again, I came for copper and I found gold!

    • @anthonygg_
      @anthonygg_  Рік тому

      ❤️

    • @larrasket
      @larrasket Рік тому

      IMO he really gives useful tips even for progophers

  • @danielvega646
    @danielvega646 4 місяці тому +2

    Wow, that decorator design pattern on making the logger a wraper and the service the wrapee, was a brilliant move, loved it!

    • @danielvega646
      @danielvega646 4 місяці тому +1

      And on this example, you could repeat this pattern on the API, right? Implement the Start method and wrap it with the logger, so you can add a nice Listening on port :yourport

  • @azekawa
    @azekawa 18 днів тому

    Hey Anthony, I am starting out with golang and I just want to thank you ! Your videos are a good starting point for a beginner like me, and they make me want to build some of my ideas in go ! :)

  • @typ0_cratz
    @typ0_cratz Рік тому +8

    I love how straight to the point this video was. I just landed a go job, and I am looking for content that gets me up to speed with real-life examples like this. Thank you for making great content!

  • @ehiojehenryerabor6960
    @ehiojehenryerabor6960 8 місяців тому

    I am awe struck at the level of your delivery. This has been so helpful. Thanks.

  • @ezrahel
    @ezrahel Рік тому +2

    You got a subscriber man! I love how simple and straightforward this is. No drama whatsoever.
    But I have a request, please make a video on making microservices whilst working with frontend.

  • @bjugdbjk
    @bjugdbjk Рік тому +7

    Ur channel differs from others in terms of " How you bring up real prod scenario's to explain the concepts" This s too good man !!
    Extremely helpful !!

  • @danijelpremus5177
    @danijelpremus5177 11 місяців тому +1

    I think that most value of your tutorial is that you show how to think on another way (you simply made chain of services). Changing way of thinking is most difficult for us who are coming from another programming languages.
    Great work, Anthony.

  • @manfrombritain6816
    @manfrombritain6816 8 місяців тому

    THISSS is the programming content I've been looking for. real-world application, project structure, higher level ans more abstract. other channels only blag on about algorithms and syntax which is only step 1

  • @AndreiTheDev
    @AndreiTheDev 4 місяці тому +1

    Doing some research for Golang with microservices and stumbled upon this video and I have 2 things to say about it:
    1. Great video, fast and on the subject
    2. Didn't know Zizou does programming in his spare time:)

    • @anthonygg_
      @anthonygg_  4 місяці тому +1

      Haha. The first time someone called my Zizou. Most of the time its GSP, Arjan Robben or Johnny Sins. Anyhow, I take Zizou each time of the day. Viva La France

  • @danielvega646
    @danielvega646 4 місяці тому +1

    Really professional and clean video!

  • @jondoe79
    @jondoe79 Рік тому +1

    The more I keep repeatedly watching the more new things I learn.... superb 👍

  • @Ben-ej1xp
    @Ben-ej1xp Рік тому +4

    I’ve been using node since 2011 and have defaulted to it literally for every backend. Prior to that I was objective C and C. I’ve just started with Go again - hate TS and node has got so bloated as an ecosystem. Go feels immediately comfortable and I see some similarities with my old iOS days. Your videos are very helpful 👍🏼

  • @petrhanzl8399
    @petrhanzl8399 Рік тому +1

    Love the pace! As a Go dev. I look exactly for this kind of videos! Thanks dude

  • @TechJunc
    @TechJunc Рік тому +4

    9:40 till 9:43 "Only 10% of the Go devolopers know this stuff. Now you do also" Great video!

  • @mwnkt
    @mwnkt Рік тому +2

    been watching your videos for months, and they are always informative, i'd really love to see you made a full where you write a full micro service, with microservices, caching and everything neccessary

  • @bjugdbjk
    @bjugdbjk Рік тому +1

    💪u r a Champ !! u r the best Gopher from Golang UA-cam Community !! Amazing Content.Kudos to uu brooo

  • @tpotjj2979
    @tpotjj2979 Рік тому +2

    Great content as usual! Keep this quality coming🚀

  • @TheSupahG
    @TheSupahG Рік тому +1

    Anthony delivers again!

  • @bfkgod
    @bfkgod Рік тому +1

    You are legit man! Great channel and content.

  • @TheFourOnSix
    @TheFourOnSix Рік тому +2

    Love the content. Love the attitude around building up yourself and career. Thank you for the inspiration.

  • @DillPL
    @DillPL Рік тому +4

    Very useful trick with defer :D
    The only issue I can see here is that interface Service (abstraction) uses struct CatFact at 2:15, which has annotation used by serialization tool.
    IMO when it is a part of Service API, it should not be coupled to specific network representation :p
    It breaks separation of concerns you mentioned at the beginning

    • @anthonygg_
      @anthonygg_  Рік тому +6

      Hey! Very good point. I think the Service should just return a (string, error) so it is not coupled with the CatFact struct, which is actually part of the JSON transport layer. Thanks for reminding me! Very good catch.

  • @amardeep6088
    @amardeep6088 4 місяці тому

    It was awesome. I am new to go and learned a lot of stuffs.

  • @efehanturhan6763
    @efehanturhan6763 Рік тому +4

    you are a LEGEND

  • @tintin537
    @tintin537 Рік тому +1

    Greate content I've missed. Thank you

  • @suryakantasahoo9935
    @suryakantasahoo9935 Рік тому +1

    Man your content is Gold🌟🌟

  • @themichael8767
    @themichael8767 Рік тому +1

    Thank You very much, Sir 🤍

  • @nth-prog8562
    @nth-prog8562 Рік тому +2

    Man u are the best. I like your voice)

  • @bjojosimpson
    @bjojosimpson Рік тому +2

    I've just came from r/golang.
    Subscribed.

  • @jinendrajain7672
    @jinendrajain7672 Рік тому +2

    CFBR, Great video , keep it up Anthony

  • @webdevcoursestv
    @webdevcoursestv Рік тому +1

    I’m generally down on micro, but I bet golang is perfect for this architecture

  • @jazzindo8545
    @jazzindo8545 Рік тому

    this is awesome, can you recommend a framework/lib that does this approach as boilerplate?

  • @anfigenos
    @anfigenos Місяць тому

    Buen video 👍🏿

  • @louislane318
    @louislane318 Рік тому +1

    Hi Anthony, I am new to go and sometimes wonder why you are using the design patterns (the use of structs, interfaces, and code pattern in general). Do you have a recommended resource that covers these patterns?

    • @anthonygg_
      @anthonygg_  Рік тому +1

      Not directly, I will make video about this. But a lot of the decisions I make comes with experience.

  • @faizulla5838
    @faizulla5838 Рік тому

    Everything looks beautiful and good, of course, BUT!
    What if I have 3-5 entities and each one needs a microservice?
    For example
    1 Authorization
    2User
    3 Supplier
    4Admin
    and everyone has a different entrance????
    Thank's Broo!

  • @radimkozl3270
    @radimkozl3270 Рік тому

    Cool, very nice.

  • @cristianarmandofloresalvar5966

    Is it recommended to use the hexagonal arquitecture for a microservice?

  • @neilr99
    @neilr99 Рік тому

    Is the code for this project on your GitHub? I like that it's a to-the-point example of a complete microservice that doesn't use gRPC. :-)

  • @alexobzor
    @alexobzor Рік тому

    i am new to golang, so i can't understand this concept on 9:14 with deferred lambda function in func(s *LoggingService) GetCatFact. I don't understand, how we get variables "fact", "err" in the lambda. I understand, that firstly we have execution of s.next.GetCatFact, but where do this lambda take this variables from.. Could you help me? 👉👈

    • @TinyTeaKettle
      @TinyTeaKettle Рік тому +2

      He has declared named return types. Those act like variable declarations within your functions body. You're able to access variables of the outer scope of the lambda within the lambda itself (like you can in Java; in C++ you'd do that through capturing). The defer puts the function call on the stack that is "consumed" when the GetCatFact functions scope ends. So after the return statement. The statement of the return itself though yields the values for fact and err which are then consumed by the function on the defer stack.

  • @jnchrlsbrq
    @jnchrlsbrq Рік тому +1

    I didn't get how the new files are created on the fly using ":e" ...

  • @howtodoit7802
    @howtodoit7802 Рік тому +1

    Which go framework do you advise a beginner to use

  • @poaleell
    @poaleell Рік тому

    Спасибо!

  • @tomjones8293
    @tomjones8293 Рік тому +1

    Why do you always say w wee ? is that Golang jargon ? Wee means little or an act of urinating in English just curious ..top content otherwise Anthony 👍

  • @InvincibleMan99
    @InvincibleMan99 Рік тому

    Would you mind to share github code ?

  • @Dudarinho
    @Dudarinho 7 місяців тому

    hilarious how half of inputs are incorrect and all the time is spent to rewrite written

  • @sunilanthony17
    @sunilanthony17 11 місяців тому +1

    Love your videos but your typing is driving me nuts.

    • @anthonygg_
      @anthonygg_  11 місяців тому

      Its driving me nuts also. 😓

    • @sunilanthony17
      @sunilanthony17 11 місяців тому

      @@anthonygg_ We need to buy you a mechanical keyboard. :-) Thanks for all the GO videos, I came from C, C#, and Java but GO is my new favorite.

  • @bandinopla
    @bandinopla 5 місяців тому

    why you make mistakes every single keystroke you type. it is annoying...

    • @DaveOzoalor
      @DaveOzoalor 14 днів тому

      Try do yours without mistakes.

    • @bandinopla
      @bandinopla 14 днів тому

      @@DaveOzoalor I will, thank you for the suggestion to help me improve myself.

  • @soy7ent
    @soy7ent 9 місяців тому +1

    Holy shit is it annyoing to watch. You type everything at least 2-3 times, your cursor jumps around 5x for each action... Doesn't mean your content is not good, it really is, but that lowers the quality so much for me as it's just stressful to watch.

    • @anthonygg_
      @anthonygg_  9 місяців тому

      I agree. Thats already way better in my lasts videos. I can image its annoying. 😘

  • @BrunoRobertoReisAlves
    @BrunoRobertoReisAlves 11 місяців тому

    This isn't a microsservice lol

  • @MakeAsPro
    @MakeAsPro 6 місяців тому +1

    If this video wos as "How I Structure New Projects In Golang" , it will soo mutch interesting & useful. This is boring

  • @mayurupadhyay3216
    @mayurupadhyay3216 Рік тому

    Thanks for the detailed explaination -- I am able to write many examples github.com/mayur2011/gokit-microservices