How To Build And Structure A Microservice In Golang?!

  Рет қаралды 46,890

Anthony GG

Anthony GG

Жыл бұрын

► Join my Discord community for free education 👉 / discord
► Become a Patreon for exclusive tutorials 👉 / anthonygg_
► Follow me on Twitter 👉 / anthdm
► Follow me on GitHub 👉 github.com/anthdm
In this Golang tutorial, I'm going to show you my approach to building and structuring a microservice in Golang. So you can also start building microservices in Golang.
#golang #microservices

Пікірлер: 75
@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
@Microphunktv-jb3kj
@Microphunktv-jb3kj Жыл бұрын
what does instrumentation mean ?
@danielvega646
@danielvega646 Күн бұрын
Wow, that decorator design pattern on making the logger a wraper and the service the wrapee, was a brilliant move, loved it!
@danielvega646
@danielvega646 23 сағат бұрын
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
@danielvega646
@danielvega646 Күн бұрын
Really professional and clean video!
@eastquack3342
@eastquack3342 Жыл бұрын
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
@anthonygg_
@anthonygg_ Жыл бұрын
Thanks my man!
@typ0_cratz
@typ0_cratz Жыл бұрын
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!
@0zema
@0zema Жыл бұрын
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
@AndreiTheDev
@AndreiTheDev 11 күн бұрын
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_ 10 күн бұрын
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
@bjugdbjk
@bjugdbjk Жыл бұрын
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 !!
@mwnkt
@mwnkt Жыл бұрын
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
@ehiojehenryerabor6960
@ehiojehenryerabor6960 3 ай бұрын
I am awe struck at the level of your delivery. This has been so helpful. Thanks.
@danijelpremus5177
@danijelpremus5177 7 ай бұрын
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.
@petrhanzl8399
@petrhanzl8399 10 ай бұрын
Love the pace! As a Go dev. I look exactly for this kind of videos! Thanks dude
@jondoe79
@jondoe79 Жыл бұрын
The more I keep repeatedly watching the more new things I learn.... superb 👍
@TheFourOnSix
@TheFourOnSix Жыл бұрын
Love the content. Love the attitude around building up yourself and career. Thank you for the inspiration.
@tpotjj2979
@tpotjj2979 Жыл бұрын
Great content as usual! Keep this quality coming🚀
@TechJunc
@TechJunc Жыл бұрын
9:40 till 9:43 "Only 10% of the Go devolopers know this stuff. Now you do also" Great video!
@manfrombritain6816
@manfrombritain6816 4 ай бұрын
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
@ezrahel
@ezrahel 8 ай бұрын
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.
@anthonygg_
@anthonygg_ 8 ай бұрын
Ty
@ezrahel
@ezrahel 8 ай бұрын
@@anthonygg_ what does Ty mean?
@anthonygg_
@anthonygg_ 8 ай бұрын
Thank you @@ezrahel
@tintin537
@tintin537 Жыл бұрын
Greate content I've missed. Thank you
@Ben-ej1xp
@Ben-ej1xp Жыл бұрын
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 👍🏼
@bfkgod
@bfkgod Жыл бұрын
You are legit man! Great channel and content.
@bjugdbjk
@bjugdbjk Жыл бұрын
💪u r a Champ !! u r the best Gopher from Golang KZbin Community !! Amazing Content.Kudos to uu brooo
@anthonygg_
@anthonygg_ Жыл бұрын
Thanks man!
@TheSupahG
@TheSupahG Жыл бұрын
Anthony delivers again!
@suryakantasahoo9935
@suryakantasahoo9935 Жыл бұрын
Man your content is Gold🌟🌟
@anthonygg_
@anthonygg_ Жыл бұрын
Thank you 🙏
@efehanturhan6763
@efehanturhan6763 Жыл бұрын
you are a LEGEND
@themichael8767
@themichael8767 Жыл бұрын
Thank You very much, Sir 🤍
@DillPL
@DillPL Жыл бұрын
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_ Жыл бұрын
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.
@nth-prog8562
@nth-prog8562 Жыл бұрын
Man u are the best. I like your voice)
@jinendrajain7672
@jinendrajain7672 Жыл бұрын
CFBR, Great video , keep it up Anthony
@radimkozl3270
@radimkozl3270 Жыл бұрын
Cool, very nice.
@none_the_less
@none_the_less Жыл бұрын
I've just came from r/golang. Subscribed.
@anthonygg_
@anthonygg_ Жыл бұрын
Thank you!
@jazzindo8545
@jazzindo8545 8 ай бұрын
this is awesome, can you recommend a framework/lib that does this approach as boilerplate?
@poaleell
@poaleell 10 ай бұрын
Спасибо!
@webdevcoursestv
@webdevcoursestv Жыл бұрын
I’m generally down on micro, but I bet golang is perfect for this architecture
@louislane318
@louislane318 Жыл бұрын
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_ Жыл бұрын
Not directly, I will make video about this. But a lot of the decisions I make comes with experience.
@cristianarmandofloresalvar5966
@cristianarmandofloresalvar5966 Жыл бұрын
Is it recommended to use the hexagonal arquitecture for a microservice?
@neilr6038
@neilr6038 Жыл бұрын
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. :-)
@jnchrlsbrq
@jnchrlsbrq 9 ай бұрын
I didn't get how the new files are created on the fly using ":e" ...
@howtodoit7802
@howtodoit7802 11 ай бұрын
Which go framework do you advise a beginner to use
@anthonygg_
@anthonygg_ 11 ай бұрын
Fiber
@howtodoit7802
@howtodoit7802 11 ай бұрын
@@anthonygg_ thank you
@faizulla5838
@faizulla5838 7 ай бұрын
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!
@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 9 ай бұрын
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.
@InvincibleMan99
@InvincibleMan99 9 ай бұрын
Would you mind to share github code ?
@tomjones8293
@tomjones8293 11 ай бұрын
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 👍
@anthonygg_
@anthonygg_ 11 ай бұрын
Link me the timestamp of we wee
@tomjones8293
@tomjones8293 11 ай бұрын
@@anthonygg_ from min 16:20
@Dudarinho
@Dudarinho 2 ай бұрын
hilarious how half of inputs are incorrect and all the time is spent to rewrite written
@MakeAsPro
@MakeAsPro Ай бұрын
If this video wos as "How I Structure New Projects In Golang" , it will soo mutch interesting & useful. This is boring
@anthonygg_
@anthonygg_ Ай бұрын
Yada yada yada
@sunilanthony17
@sunilanthony17 6 ай бұрын
Love your videos but your typing is driving me nuts.
@anthonygg_
@anthonygg_ 6 ай бұрын
Its driving me nuts also. 😓
@sunilanthony17
@sunilanthony17 6 ай бұрын
@@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.
@user-mi1ml8ye3b
@user-mi1ml8ye3b 7 ай бұрын
This isn't a microsservice lol
@bandinopla
@bandinopla 19 күн бұрын
why you make mistakes every single keystroke you type. it is annoying...
@soy7ent
@soy7ent 5 ай бұрын
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_ 5 ай бұрын
I agree. Thats already way better in my lasts videos. I can image its annoying. 😘
@mayurupadhyay3216
@mayurupadhyay3216 11 ай бұрын
Thanks for the detailed explaination -- I am able to write many examples github.com/mayur2011/gokit-microservices
Everything You Need To Know About Pointers In Golang
20:47
Anthony GG
Рет қаралды 27 М.
How To Structure Your Golang (API) Projects!?
20:28
Anthony GG
Рет қаралды 44 М.
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 76 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 114 МЛН
Чистая архитектура проекта на Golang
58:22
Олег Козырев
Рет қаралды 33 М.
All You Need to Know to Structure your Golang Projects
12:23
This Is The BEST Way To Structure Your GO Projects
11:08
Melkey
Рет қаралды 62 М.
Complete Golang and gRPC Microservices (Project Course)
42:02
Rust vs Go : Hands On Comparison
50:40
ThePrimeTime
Рет қаралды 206 М.
The BEST Tool to Structure Golang Projects
7:58
Melkey
Рет қаралды 17 М.
How To Use Goroutines For Aggregating Data In Golang?!
17:15
Anthony GG
Рет қаралды 34 М.
This Will Make Everyone Understand Golang Interfaces
21:03
Anthony GG
Рет қаралды 42 М.
gRPC в Golang: Практическое Введение в Основы
46:16
Олег Козырев
Рет қаралды 24 М.
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 76 МЛН