SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
GO FROM PHP ENGINEER’S
PERSPECTIVE
SOBIT AKHMEDOV
GO FROM PHP ENGINEER’S PERSPECTIVE
PHP FRAMEWORKS
▸ Symfony
▸ Laravel
▸ Zend Framework
GO FROM PHP ENGINEER’S PERSPECTIVE
PHP TOOLS AND COMMUNITY
▸ Composer
▸ Monolog
▸ PHP-FIG
GO FROM PHP ENGINEER’S PERSPECTIVE
THEY STARTED WITH PHP
▸ Facebook
▸ Yahoo!
▸ Wikipedia
▸ Wordpress
▸ Tumblr
GO FROM PHP ENGINEER’S PERSPECTIVE
PHP AND MICROSERVICES
▸ Good response time on single application only ✓
▸ Good for WEB development ✓
▸ Bad for microservices architectures: ✗
▸ Timeout handling ✗
▸ Metrics collection ✗
▸ Bulkheads ✗
▸ Circuit breakers ✗
MEET GO
GO (OFTEN REFERRED TO AS GOLANG) IS AN OPEN SOURCE
PROGRAMMING LANGUAGE DEVELOPED AT GOOGLE IN 2007 BY ROBERT
GRIESEMER, ROB PIKE, AND KEN THOMPSON. DESIGNED PRIMARILY FOR
SYSTEMS PROGRAMMING, IT IS A COMPILED, STATICALLY TYPED
LANGUAGE IN THE TRADITION OF C AND C++, WITH GARBAGE
COLLECTION, VARIOUS SAFETY FEATURES AND CSP-STYLE
CONCURRENT PROGRAMMING FEATURES ADDED.
Wikipedia
GO FROM PHP ENGINEER’S PERSPECTIVE
GO FROM PHP ENGINEER’S PERSPECTIVE
MEET GO
▸ Developed at Google in 2007
▸ Due to the frustration of dealing with the complexity
▸ Announced in November 2009
▸ Special feature: extreme simplicity
▸ Go: 25 keywords
▸ PHP: 67 keywords
GO FROM PHP ENGINEER’S PERSPECTIVE
BUILT WITH GO
▸ Docker
▸ Kubernetes
▸ etcd
▸ InfluxDb
GO FROM PHP ENGINEER’S PERSPECTIVE
GO AND MICROSERVICES
▸ Fast compilation
▸ Parallel execution
▸ Transport protocols
▸ JSON over HTTP, gRPC, Protocol Buffers, Thrift
▸ Request tracing in Zipkin
▸ Metrics exporting to statsd, Prometheus, etc.
▸ Rate limiters
▸ … others
MORE ABOUT GO
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ Strictly typed
▸ Type inference
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ Multiple return types
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ Multiple return types
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ No foreach, no while, no do-while
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ No foreach, no while, no do-while
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ No foreach, no while, no do-while
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ No foreach, no while, no do-while
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ No classes, only structs
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ No classes, only structs
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ Goroutine — a function executing concurrently with other
goroutines in the same address space
▸ Exits silently on completion
GO FROM PHP ENGINEER’S PERSPECTIVE
LANGUAGE
▸ Goroutine are “fire-and-forget”
▸ Channels - if we need the result
GO FROM PHP ENGINEER’S PERSPECTIVE
TOOLS
▸ go fmt
▸ go doc
▸ go vet
▸ go test
▸ go get github.com/hoisie/redis
▸ … others
GO FROM PHP ENGINEER’S PERSPECTIVE
DEPLOYING PHP APPLICATION (BASIC)
▸ Checkout the latest code on the target server into a new
release folder
▸ Copy cached dependencies and install updated ones
▸ Copy environment-specific configuration files
▸ Run all the scripts to warm the application up
▸ Point the current release symlink into the new release folder
▸ Restart PHP-FPM
GO FROM PHP ENGINEER’S PERSPECTIVE
DEPLOYING PHP APPLICATION (ADVANCED)
▸ Checkout the latest code on the build server
▸ “Build” it (install dependencies, warm the caches up, etc.)
▸ Create a distributable “artifact” (an archived tar.gz file)
▸ Transfer the artifact to the target server
▸ Unarchive into a new release folder
▸ Point the current release symlink into the new release folder
▸ Restart PHP-FPM
GO FROM PHP ENGINEER’S PERSPECTIVE
DEPLOYING GO APPLICATION
▸ Checkout the latest code on the build server
▸ Build it (note the absence of quotes)
▸ Transfer the artifact (again no quotes) to the target server
▸ Restart the running application
GO FROM PHP ENGINEER’S PERSPECTIVE
DEPLOYING GO APPLICATION
▸ No need to install Go on target servers
▸ Builds for different OS and architectures
▸ From single machine
▸ Even for Windows!
CONCLUSION
GO FROM PHP ENGINEER’S PERSPECTIVE
CONCLUSION
▸ Premature decomposition = failure
▸ PHP fits monolithic application strategy
▸ Building microservices with PHP is painful
▸ Consider Go
▸ Easier than Java or Scala
▸ Performance is not far behind C
GO FROM PHP ENGINEER’S PERSPECTIVE
HOW CAN I CONTINUE?
▸ Learn: https://golang.org/doc/#learning
▸ Learn more: https://github.com/golang/go/wiki/Learn
▸ IDEs: https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins
▸ https://github.com/go-lang-plugin-org/go-lang-idea-plugin
▸ Go kit: https://github.com/go-kit/kit
▸ Client-side Go: http://www.gopherjs.org/
▸ Go for mobile apps: https://github.com/golang/go/wiki/Mobile
QUESTIONS?
GO FROM PHP ENGINEER’S PERSPECTIVE
THANKS!
Sobit Akhmedov

Contenu connexe

Tendances

Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of GolangKartik Sura
 
Golang Channels use cases
Golang Channels use casesGolang Channels use cases
Golang Channels use casesErhan Yakut
 
kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs sangam biradar
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golangRamit Surana
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?sangam biradar
 
用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務Bo-Yi Wu
 
Docker introduction in Hardware Company
Docker introduction in Hardware CompanyDocker introduction in Hardware Company
Docker introduction in Hardware CompanyEvan Lin
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in osGenchiLu1
 
Come With Golang
Come With GolangCome With Golang
Come With Golang尚文 曾
 
13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applicationsKarthik Gaekwad
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlinphpfriendsclub
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаphpfriendsclub
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golangBo-Yi Wu
 
Useful Vim Plugins
Useful Vim PluginsUseful Vim Plugins
Useful Vim Pluginsanveo
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki MizunoNexus FrontierTech
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCIThiago Paes
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)Aaron Schlesinger
 

Tendances (20)

Golang
GolangGolang
Golang
 
Optimizing and Profiling Golang Rest Api
Optimizing and Profiling Golang Rest ApiOptimizing and Profiling Golang Rest Api
Optimizing and Profiling Golang Rest Api
 
Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of Golang
 
Golang online course
Golang online courseGolang online course
Golang online course
 
Golang Channels use cases
Golang Channels use casesGolang Channels use cases
Golang Channels use cases
 
kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
 
用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務
 
Docker introduction in Hardware Company
Docker introduction in Hardware CompanyDocker introduction in Hardware Company
Docker introduction in Hardware Company
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
Come With Golang
Come With GolangCome With Golang
Come With Golang
 
13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlin
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробника
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
Useful Vim Plugins
Useful Vim PluginsUseful Vim Plugins
Useful Vim Plugins
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)
 

Similaire à Go from PHP engineer's perspective

Building and Deploying PHP Applications, PHPTour 2016
Building and Deploying PHP Applications, PHPTour 2016Building and Deploying PHP Applications, PHPTour 2016
Building and Deploying PHP Applications, PHPTour 2016Martins Sipenko
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerEric D. Schabell
 
The Best Feature of Go – A 5 Year Retrospective
The Best Feature of Go – A 5 Year RetrospectiveThe Best Feature of Go – A 5 Year Retrospective
The Best Feature of Go – A 5 Year RetrospectiveTahir Hashmi
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerEric D. Schabell
 
"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ..."The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...Fwdays
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)Eric D. Schabell
 
Containerized IDEs.pdf
Containerized IDEs.pdfContainerized IDEs.pdf
Containerized IDEs.pdfLibbySchulze
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsGrgur Grisogono
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2Derek Jacoby
 
Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Derek Jacoby
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Bastian Feder
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...AgileNCR2013
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13DanWooster1
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 

Similaire à Go from PHP engineer's perspective (20)

Building and Deploying PHP Applications, PHPTour 2016
Building and Deploying PHP Applications, PHPTour 2016Building and Deploying PHP Applications, PHPTour 2016
Building and Deploying PHP Applications, PHPTour 2016
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift Primer
 
Automated deployment
Automated deploymentAutomated deployment
Automated deployment
 
The Best Feature of Go – A 5 Year Retrospective
The Best Feature of Go – A 5 Year RetrospectiveThe Best Feature of Go – A 5 Year Retrospective
The Best Feature of Go – A 5 Year Retrospective
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift Primer
 
Drone CI
Drone CIDrone CI
Drone CI
 
"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ..."The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
 
The road to php 7.1
The road to php 7.1The road to php 7.1
The road to php 7.1
 
Containerized IDEs.pdf
Containerized IDEs.pdfContainerized IDEs.pdf
Containerized IDEs.pdf
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Untangling fall2017 week2_try2
Untangling fall2017 week2_try2
 
PHP Development Tools
PHP  Development ToolsPHP  Development Tools
PHP Development Tools
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Evolution of deploy.sh
Evolution of deploy.shEvolution of deploy.sh
Evolution of deploy.sh
 
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 

Dernier

%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 

Dernier (20)

%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 

Go from PHP engineer's perspective

  • 1. GO FROM PHP ENGINEER’S PERSPECTIVE SOBIT AKHMEDOV
  • 2. GO FROM PHP ENGINEER’S PERSPECTIVE PHP FRAMEWORKS ▸ Symfony ▸ Laravel ▸ Zend Framework
  • 3. GO FROM PHP ENGINEER’S PERSPECTIVE PHP TOOLS AND COMMUNITY ▸ Composer ▸ Monolog ▸ PHP-FIG
  • 4. GO FROM PHP ENGINEER’S PERSPECTIVE THEY STARTED WITH PHP ▸ Facebook ▸ Yahoo! ▸ Wikipedia ▸ Wordpress ▸ Tumblr
  • 5. GO FROM PHP ENGINEER’S PERSPECTIVE PHP AND MICROSERVICES ▸ Good response time on single application only ✓ ▸ Good for WEB development ✓ ▸ Bad for microservices architectures: ✗ ▸ Timeout handling ✗ ▸ Metrics collection ✗ ▸ Bulkheads ✗ ▸ Circuit breakers ✗
  • 7. GO (OFTEN REFERRED TO AS GOLANG) IS AN OPEN SOURCE PROGRAMMING LANGUAGE DEVELOPED AT GOOGLE IN 2007 BY ROBERT GRIESEMER, ROB PIKE, AND KEN THOMPSON. DESIGNED PRIMARILY FOR SYSTEMS PROGRAMMING, IT IS A COMPILED, STATICALLY TYPED LANGUAGE IN THE TRADITION OF C AND C++, WITH GARBAGE COLLECTION, VARIOUS SAFETY FEATURES AND CSP-STYLE CONCURRENT PROGRAMMING FEATURES ADDED. Wikipedia GO FROM PHP ENGINEER’S PERSPECTIVE
  • 8. GO FROM PHP ENGINEER’S PERSPECTIVE MEET GO ▸ Developed at Google in 2007 ▸ Due to the frustration of dealing with the complexity ▸ Announced in November 2009 ▸ Special feature: extreme simplicity ▸ Go: 25 keywords ▸ PHP: 67 keywords
  • 9. GO FROM PHP ENGINEER’S PERSPECTIVE BUILT WITH GO ▸ Docker ▸ Kubernetes ▸ etcd ▸ InfluxDb
  • 10.
  • 11. GO FROM PHP ENGINEER’S PERSPECTIVE GO AND MICROSERVICES ▸ Fast compilation ▸ Parallel execution ▸ Transport protocols ▸ JSON over HTTP, gRPC, Protocol Buffers, Thrift ▸ Request tracing in Zipkin ▸ Metrics exporting to statsd, Prometheus, etc. ▸ Rate limiters ▸ … others
  • 13. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ Strictly typed ▸ Type inference
  • 14. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ Multiple return types
  • 15. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ Multiple return types
  • 16. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ No foreach, no while, no do-while
  • 17. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ No foreach, no while, no do-while
  • 18. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ No foreach, no while, no do-while
  • 19. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ No foreach, no while, no do-while
  • 20. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ No classes, only structs
  • 21. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ No classes, only structs
  • 22. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ Goroutine — a function executing concurrently with other goroutines in the same address space ▸ Exits silently on completion
  • 23. GO FROM PHP ENGINEER’S PERSPECTIVE LANGUAGE ▸ Goroutine are “fire-and-forget” ▸ Channels - if we need the result
  • 24. GO FROM PHP ENGINEER’S PERSPECTIVE TOOLS ▸ go fmt ▸ go doc ▸ go vet ▸ go test ▸ go get github.com/hoisie/redis ▸ … others
  • 25. GO FROM PHP ENGINEER’S PERSPECTIVE DEPLOYING PHP APPLICATION (BASIC) ▸ Checkout the latest code on the target server into a new release folder ▸ Copy cached dependencies and install updated ones ▸ Copy environment-specific configuration files ▸ Run all the scripts to warm the application up ▸ Point the current release symlink into the new release folder ▸ Restart PHP-FPM
  • 26. GO FROM PHP ENGINEER’S PERSPECTIVE DEPLOYING PHP APPLICATION (ADVANCED) ▸ Checkout the latest code on the build server ▸ “Build” it (install dependencies, warm the caches up, etc.) ▸ Create a distributable “artifact” (an archived tar.gz file) ▸ Transfer the artifact to the target server ▸ Unarchive into a new release folder ▸ Point the current release symlink into the new release folder ▸ Restart PHP-FPM
  • 27. GO FROM PHP ENGINEER’S PERSPECTIVE DEPLOYING GO APPLICATION ▸ Checkout the latest code on the build server ▸ Build it (note the absence of quotes) ▸ Transfer the artifact (again no quotes) to the target server ▸ Restart the running application
  • 28. GO FROM PHP ENGINEER’S PERSPECTIVE DEPLOYING GO APPLICATION ▸ No need to install Go on target servers ▸ Builds for different OS and architectures ▸ From single machine ▸ Even for Windows!
  • 30. GO FROM PHP ENGINEER’S PERSPECTIVE CONCLUSION ▸ Premature decomposition = failure ▸ PHP fits monolithic application strategy ▸ Building microservices with PHP is painful ▸ Consider Go ▸ Easier than Java or Scala ▸ Performance is not far behind C
  • 31. GO FROM PHP ENGINEER’S PERSPECTIVE HOW CAN I CONTINUE? ▸ Learn: https://golang.org/doc/#learning ▸ Learn more: https://github.com/golang/go/wiki/Learn ▸ IDEs: https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins ▸ https://github.com/go-lang-plugin-org/go-lang-idea-plugin ▸ Go kit: https://github.com/go-kit/kit ▸ Client-side Go: http://www.gopherjs.org/ ▸ Go for mobile apps: https://github.com/golang/go/wiki/Mobile
  • 32. QUESTIONS? GO FROM PHP ENGINEER’S PERSPECTIVE