SlideShare a Scribd company logo
Monolith vs Microservices with
Golang at Practice
Ivan Kutuzov, SoftServe, #GolangUA
Agenda:
- Quick introduction to GO
- How to create monolith app
- How to create microservice
- What a difference
Go pros
● Fast compilation
● Simplicity
● Memory safe
● Efficiency
● Concurrency
● Network oriented
Guiding principles
● Simplicity
● Readability
● Productivity
Monolith
Maintainability
● Changes in one area of an application should affect
as few other places as possible
● Adding features should not require large code-base
changes
● Adding new ways to interact with the application
should require as few changes as possible
● Debugging should require as few work-arounds and
"just this once" hacks as possible
● Testing should be relatively easy
https://dave.cheney.net/practical-go/presentations/qcon-china.html
Hexagonal Architecture/ Clean Architecture / Port and Adapters
● Entity
● Value Object
● Domain Event
● Aggregate
● Service
● Repository
Where read more
● Kat Zien: How Do You Structure Your Go Apps
● Peter Bourgon: Go for Industrial Programming
● Ben Johnson: Standard Package Layout
● Marcus Olsson: gh: marcusolsson/goddd
Existing frameworks & tools
https://github.com/speedwheel/awesome-go-web-frameworks/blob/master/README.md
Existing frameworks & tools
● Router: Named Path Parameters & Wildcard, Regex,
Grouping, Custom HTTP Errors, Auto Docs
● Middleware ecosystem
● Server: Automatic HTTPS, Gracefully Shutdown,
Multi listeners, Sessions, Websockets, Files
● View Engines
● Renderer, Caching
● Security, Authentication
● Logging, Metrics
Microservice
Microservices design principles
● Single purpose
● Loose coupling
● High cohesion
● Is not a service in small number of lines of code
● Is not a service that is built with new technology
● Is not a service that has to be built from scratch
Microservices design principles
https://medium.engineering/microservice-architecture-at-medium-9c33805eb74f
Go microservice toolkits statistics rating
● The most popular project is go-kit/kit
● The newest project is NYTimes/gizmo
● The project with more commits is koding/kite
● The project with biggest average contribution period is rsms/gotalk
● The project with more tags is micro/go-micro
● The project made by most notable top contributors is koding/kite
● The project with best errors resolving rate is micro/go-micro
● The project with more commits by day is koding/kite
● The project with the most active number of forkers is NYTimes/gizmo
● The project with biggest number of returning contributors is go-kit/kit
https://docs.google.com/spreadsheets/d/1d0WcI5ahmJdysyyHeZB9CVlolXF027UlY1fTPbyiFCE/edit?usp=sharing
Go microservice toolkits features
● Service Discovery
● Load Balancing
● Message Encoding
● Request / Response
● Async Messaging
● Pluggable Interfaces
https://github.com/micro/go-micro#features
Go microservice toolkits plugins
● Broker: PubSub messaging; NATS, NSQ, RabbitMQ, Kafka
● Client/Server: RPC Clients; gRPC, HTTP
● Codec: Message Encoding; BSON, Mercury
● Redistry: Service Discovery; Etcd, Gossip, NATS
● Selector: Load balancing; Label, Cache, Static
● Transport: Bidirectional Streaming; NATS, RabbitMQ
● Wrappers: Middleware; Circuit Breakers, Rate Limiting,
Tracing, Monitoring
https://github.com/micro/go-micro#features
Difference
Handler at monolith
func main() {
srv := http.Server{Addr: ":8080", Handler: homeHandler}
srv.ListenAndServe()
}
func homeHandler(w http.ResponseWriter, r *http.Request) {
l := hlog.FromRequest(r)
products := ListProducts()
// …
}
Handler at monolith
func main() {
srv :=grpc.NewServer(grpc.StatsHandler(&ocgrpc.ServerHandler{}))
svc := &productCatalog{}
pb.RegisterProductCatalogServiceServer(srv, svc)
srv.Serve(l)
}
func (p *productCatalog) GetProduct(ctx context.Context, req
*pb.GetProductRequest) (*pb.Product, error) {
Questions?
Links
● https://medium.com/seek-blog/microservices-in-go-2fc1570f6800
● https://speakerdeck.com/fedir/building-a-go-microservice-from-0-to-hero
● https://speakerdeck.com/fedir/comparison-of-10-go-web-frameworks
● https://intelligentbee.com/2017/08/14/golang-guide-list-top-golang-frameworks
-ides-tools/
Thank you!
Ivan Kutuzov, SoftServe, #GolangUA, @arbrix, ikut@softserveinc.com

More Related Content

What's hot

Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
Prayoch Rujira
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
AddWeb Solution Pvt. Ltd.
 
Rapid Prototyping & Axure RP
Rapid Prototyping & Axure RPRapid Prototyping & Axure RP
Rapid Prototyping & Axure RPISsoft
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
Taisuke Inoue
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
William Chong
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
Valentin Buryakov
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Roland Emmanuel Salunga
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
Sourabh Sahu
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
Chuu Htet Naing
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
Kaunas Java User Group
 
Bitbucket and Git
Bitbucket and GitBitbucket and Git
Bitbucket and Git
Mohit Shukla
 
Github 으로 학교 팀 프로젝트 하기
Github 으로 학교 팀 프로젝트 하기Github 으로 학교 팀 프로젝트 하기
Github 으로 학교 팀 프로젝트 하기
nexusz99
 
Git101
Git101Git101
Git101
Jason Noble
 
From Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security EnhancementsFrom Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security Enhancements
Ana-Maria Mihalceanu
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
ColCh
 
Gitlab CI : Integration et Déploiement Continue
Gitlab CI : Integration et Déploiement ContinueGitlab CI : Integration et Déploiement Continue
Gitlab CI : Integration et Déploiement Continue
Vincent Composieux
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
Yash
 
Github
GithubGithub
Github
Nikhil Baby
 

What's hot (20)

Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
 
Rapid Prototyping & Axure RP
Rapid Prototyping & Axure RPRapid Prototyping & Axure RP
Rapid Prototyping & Axure RP
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
xUnit
xUnitxUnit
xUnit
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Bitbucket and Git
Bitbucket and GitBitbucket and Git
Bitbucket and Git
 
Github 으로 학교 팀 프로젝트 하기
Github 으로 학교 팀 프로젝트 하기Github 으로 학교 팀 프로젝트 하기
Github 으로 학교 팀 프로젝트 하기
 
Git101
Git101Git101
Git101
 
From Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security EnhancementsFrom Java 17 to 21- A Showcase of JDK Security Enhancements
From Java 17 to 21- A Showcase of JDK Security Enhancements
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
Gitlab CI : Integration et Déploiement Continue
Gitlab CI : Integration et Déploiement ContinueGitlab CI : Integration et Déploiement Continue
Gitlab CI : Integration et Déploiement Continue
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
 
Github
GithubGithub
Github
 

Similar to Monolith vs Microservices with Golang at practice - Ivan Kutuzov

Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
VMware Tanzu
 
Cloud-Native Progressive Delivery
Cloud-Native Progressive DeliveryCloud-Native Progressive Delivery
Cloud-Native Progressive Delivery
Matt Turner
 
202104 technical challenging and our solutions - golang taipei
202104   technical challenging and our solutions - golang taipei202104   technical challenging and our solutions - golang taipei
202104 technical challenging and our solutions - golang taipei
Ronald Hsu
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
Alex Ross
 
Google Cloud Platform Solutions for DevOps Engineers
Google Cloud Platform Solutions  for DevOps EngineersGoogle Cloud Platform Solutions  for DevOps Engineers
Google Cloud Platform Solutions for DevOps Engineers
Márton Kodok
 
CI/CD: Lessons from LinkedIn and Mockito
CI/CD: Lessons from LinkedIn and MockitoCI/CD: Lessons from LinkedIn and Mockito
CI/CD: Lessons from LinkedIn and Mockito
C4Media
 
Design and Monitoring Performance of Digital Properties
Design and Monitoring Performance of Digital PropertiesDesign and Monitoring Performance of Digital Properties
Design and Monitoring Performance of Digital Properties
IRJET Journal
 
Resume_Arindom_Updated
Resume_Arindom_UpdatedResume_Arindom_Updated
Resume_Arindom_UpdatedArindom Biswas
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
Suresh Patidar
 
Front end microservices: architectures and solution
Front end microservices: architectures and solutionFront end microservices: architectures and solution
Front end microservices: architectures and solution
Mikhail Kuznetcov
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
David Amend
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web Frameworks
IRJET Journal
 
Abhinav Nigam
Abhinav NigamAbhinav Nigam
Abhinav Nigam
Abhinav Nigam
 
Introduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OKIntroduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OK
Kriangkrai Chaonithi
 
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and MockitoQCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
Szczepan Faber
 
Node js vs golang -which one is better ?
Node js vs golang -which one is better ?Node js vs golang -which one is better ?
Node js vs golang -which one is better ?
ForceBolt
 
Multiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersMultiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for Publishers
Jon Peck
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneursRodrigo Gil
 
Microservice
MicroserviceMicroservice
Microservice
Viney Shih
 
Why we should consider Open Hybrid Cloud.pdf
Why we should  consider Open Hybrid Cloud.pdfWhy we should  consider Open Hybrid Cloud.pdf
Why we should consider Open Hybrid Cloud.pdf
Masahiko Umeno
 

Similar to Monolith vs Microservices with Golang at practice - Ivan Kutuzov (20)

Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
 
Cloud-Native Progressive Delivery
Cloud-Native Progressive DeliveryCloud-Native Progressive Delivery
Cloud-Native Progressive Delivery
 
202104 technical challenging and our solutions - golang taipei
202104   technical challenging and our solutions - golang taipei202104   technical challenging and our solutions - golang taipei
202104 technical challenging and our solutions - golang taipei
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
Google Cloud Platform Solutions for DevOps Engineers
Google Cloud Platform Solutions  for DevOps EngineersGoogle Cloud Platform Solutions  for DevOps Engineers
Google Cloud Platform Solutions for DevOps Engineers
 
CI/CD: Lessons from LinkedIn and Mockito
CI/CD: Lessons from LinkedIn and MockitoCI/CD: Lessons from LinkedIn and Mockito
CI/CD: Lessons from LinkedIn and Mockito
 
Design and Monitoring Performance of Digital Properties
Design and Monitoring Performance of Digital PropertiesDesign and Monitoring Performance of Digital Properties
Design and Monitoring Performance of Digital Properties
 
Resume_Arindom_Updated
Resume_Arindom_UpdatedResume_Arindom_Updated
Resume_Arindom_Updated
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
 
Front end microservices: architectures and solution
Front end microservices: architectures and solutionFront end microservices: architectures and solution
Front end microservices: architectures and solution
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web Frameworks
 
Abhinav Nigam
Abhinav NigamAbhinav Nigam
Abhinav Nigam
 
Introduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OKIntroduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OK
 
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and MockitoQCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
 
Node js vs golang -which one is better ?
Node js vs golang -which one is better ?Node js vs golang -which one is better ?
Node js vs golang -which one is better ?
 
Multiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersMultiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for Publishers
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
Microservice
MicroserviceMicroservice
Microservice
 
Why we should consider Open Hybrid Cloud.pdf
Why we should  consider Open Hybrid Cloud.pdfWhy we should  consider Open Hybrid Cloud.pdf
Why we should consider Open Hybrid Cloud.pdf
 

More from Kuberton

Using Sentry for error collection and analysis in a distributed system - Yevg...
Using Sentry for error collection and analysis in a distributed system - Yevg...Using Sentry for error collection and analysis in a distributed system - Yevg...
Using Sentry for error collection and analysis in a distributed system - Yevg...
Kuberton
 
Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin  Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin
Kuberton
 
How to grant permission to your Kubernetes cluster for another users. - Stan...
 How to grant permission to your Kubernetes cluster for another users. - Stan... How to grant permission to your Kubernetes cluster for another users. - Stan...
How to grant permission to your Kubernetes cluster for another users. - Stan...
Kuberton
 
Security threats with Kubernetes - Igor Khoroshchenko
 Security threats with Kubernetes - Igor Khoroshchenko Security threats with Kubernetes - Igor Khoroshchenko
Security threats with Kubernetes - Igor Khoroshchenko
Kuberton
 
Chaos Testing of Microservices - Shalamov Maksym
 Chaos Testing of Microservices  - Shalamov Maksym Chaos Testing of Microservices  - Shalamov Maksym
Chaos Testing of Microservices - Shalamov Maksym
Kuberton
 
Cloud-native applications with Java and Kubernetes - Yehor Volkov
 Cloud-native applications with Java and Kubernetes - Yehor Volkov Cloud-native applications with Java and Kubernetes - Yehor Volkov
Cloud-native applications with Java and Kubernetes - Yehor Volkov
Kuberton
 
Kubernetes in Modern Application Architecture - Orkhan Gasimov
Kubernetes in Modern Application Architecture - Orkhan GasimovKubernetes in Modern Application Architecture - Orkhan Gasimov
Kubernetes in Modern Application Architecture - Orkhan Gasimov
Kuberton
 

More from Kuberton (7)

Using Sentry for error collection and analysis in a distributed system - Yevg...
Using Sentry for error collection and analysis in a distributed system - Yevg...Using Sentry for error collection and analysis in a distributed system - Yevg...
Using Sentry for error collection and analysis in a distributed system - Yevg...
 
Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin  Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin
 
How to grant permission to your Kubernetes cluster for another users. - Stan...
 How to grant permission to your Kubernetes cluster for another users. - Stan... How to grant permission to your Kubernetes cluster for another users. - Stan...
How to grant permission to your Kubernetes cluster for another users. - Stan...
 
Security threats with Kubernetes - Igor Khoroshchenko
 Security threats with Kubernetes - Igor Khoroshchenko Security threats with Kubernetes - Igor Khoroshchenko
Security threats with Kubernetes - Igor Khoroshchenko
 
Chaos Testing of Microservices - Shalamov Maksym
 Chaos Testing of Microservices  - Shalamov Maksym Chaos Testing of Microservices  - Shalamov Maksym
Chaos Testing of Microservices - Shalamov Maksym
 
Cloud-native applications with Java and Kubernetes - Yehor Volkov
 Cloud-native applications with Java and Kubernetes - Yehor Volkov Cloud-native applications with Java and Kubernetes - Yehor Volkov
Cloud-native applications with Java and Kubernetes - Yehor Volkov
 
Kubernetes in Modern Application Architecture - Orkhan Gasimov
Kubernetes in Modern Application Architecture - Orkhan GasimovKubernetes in Modern Application Architecture - Orkhan Gasimov
Kubernetes in Modern Application Architecture - Orkhan Gasimov
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Monolith vs Microservices with Golang at practice - Ivan Kutuzov

  • 1. Monolith vs Microservices with Golang at Practice Ivan Kutuzov, SoftServe, #GolangUA
  • 2. Agenda: - Quick introduction to GO - How to create monolith app - How to create microservice - What a difference
  • 3. Go pros ● Fast compilation ● Simplicity ● Memory safe ● Efficiency ● Concurrency ● Network oriented
  • 4. Guiding principles ● Simplicity ● Readability ● Productivity
  • 6. Maintainability ● Changes in one area of an application should affect as few other places as possible ● Adding features should not require large code-base changes ● Adding new ways to interact with the application should require as few changes as possible ● Debugging should require as few work-arounds and "just this once" hacks as possible ● Testing should be relatively easy https://dave.cheney.net/practical-go/presentations/qcon-china.html
  • 7. Hexagonal Architecture/ Clean Architecture / Port and Adapters ● Entity ● Value Object ● Domain Event ● Aggregate ● Service ● Repository
  • 8. Where read more ● Kat Zien: How Do You Structure Your Go Apps ● Peter Bourgon: Go for Industrial Programming ● Ben Johnson: Standard Package Layout ● Marcus Olsson: gh: marcusolsson/goddd
  • 9. Existing frameworks & tools https://github.com/speedwheel/awesome-go-web-frameworks/blob/master/README.md
  • 10. Existing frameworks & tools ● Router: Named Path Parameters & Wildcard, Regex, Grouping, Custom HTTP Errors, Auto Docs ● Middleware ecosystem ● Server: Automatic HTTPS, Gracefully Shutdown, Multi listeners, Sessions, Websockets, Files ● View Engines ● Renderer, Caching ● Security, Authentication ● Logging, Metrics
  • 12. Microservices design principles ● Single purpose ● Loose coupling ● High cohesion ● Is not a service in small number of lines of code ● Is not a service that is built with new technology ● Is not a service that has to be built from scratch
  • 14. Go microservice toolkits statistics rating ● The most popular project is go-kit/kit ● The newest project is NYTimes/gizmo ● The project with more commits is koding/kite ● The project with biggest average contribution period is rsms/gotalk ● The project with more tags is micro/go-micro ● The project made by most notable top contributors is koding/kite ● The project with best errors resolving rate is micro/go-micro ● The project with more commits by day is koding/kite ● The project with the most active number of forkers is NYTimes/gizmo ● The project with biggest number of returning contributors is go-kit/kit https://docs.google.com/spreadsheets/d/1d0WcI5ahmJdysyyHeZB9CVlolXF027UlY1fTPbyiFCE/edit?usp=sharing
  • 15. Go microservice toolkits features ● Service Discovery ● Load Balancing ● Message Encoding ● Request / Response ● Async Messaging ● Pluggable Interfaces https://github.com/micro/go-micro#features
  • 16. Go microservice toolkits plugins ● Broker: PubSub messaging; NATS, NSQ, RabbitMQ, Kafka ● Client/Server: RPC Clients; gRPC, HTTP ● Codec: Message Encoding; BSON, Mercury ● Redistry: Service Discovery; Etcd, Gossip, NATS ● Selector: Load balancing; Label, Cache, Static ● Transport: Bidirectional Streaming; NATS, RabbitMQ ● Wrappers: Middleware; Circuit Breakers, Rate Limiting, Tracing, Monitoring https://github.com/micro/go-micro#features
  • 18. Handler at monolith func main() { srv := http.Server{Addr: ":8080", Handler: homeHandler} srv.ListenAndServe() } func homeHandler(w http.ResponseWriter, r *http.Request) { l := hlog.FromRequest(r) products := ListProducts() // … }
  • 19. Handler at monolith func main() { srv :=grpc.NewServer(grpc.StatsHandler(&ocgrpc.ServerHandler{})) svc := &productCatalog{} pb.RegisterProductCatalogServiceServer(srv, svc) srv.Serve(l) } func (p *productCatalog) GetProduct(ctx context.Context, req *pb.GetProductRequest) (*pb.Product, error) {
  • 21. Links ● https://medium.com/seek-blog/microservices-in-go-2fc1570f6800 ● https://speakerdeck.com/fedir/building-a-go-microservice-from-0-to-hero ● https://speakerdeck.com/fedir/comparison-of-10-go-web-frameworks ● https://intelligentbee.com/2017/08/14/golang-guide-list-top-golang-frameworks -ides-tools/
  • 22. Thank you! Ivan Kutuzov, SoftServe, #GolangUA, @arbrix, ikut@softserveinc.com