Simple and complete explanation about goroutines and concurrency in GoLang. Graphs, interactive visualizations are available 😉
https://divan.github.io/posts/go_concurrency_visualize/
https://divan.github.io/posts/go_concurrency_visualize/
One of the most featured articles on the Medium from CEO smsjunk.com and Chief Architect Officer at KnowBe4. He designed a new backend for handling 1 million JSON POST RPM and saving them into Amazon S3. Of course, he used goroutines, channels, parallel computing and other GoLang features. Enjoy reading!
https://medium.com/smsjunk/handling-1-million-requests-per-minute-with-golang-f70ac505fcaa
https://medium.com/smsjunk/handling-1-million-requests-per-minute-with-golang-f70ac505fcaa
Medium
Handling 1 Million Requests per Minute with Golang
I have been working in the anti-spam, anti-virus and anti-malware industry for over 15 years at a few different companies, and now I know…
Must-read official article about arrays, slices and strings in GoLang
https://blog.golang.org/slices
https://blog.golang.org/slices
Go best practices, six years in; article by Peter Bourgon
This article was originally a talk at QCon London 2016; If you want to save your time you can just look through these points:
1. Put $GOPATH/bin in your $PATH, so installed binaries are easily accessible.
2. Put library code under a pkg/ subdirectory. Put binaries under a cmd/ subdirectory.
3. Always use fully-qualified import paths. Never use relative imports.
4. Defer to Andrew Gerrand’s naming conventions.(https://talks.golang.org/2014/names.slide)
5. Only func main has the right to decide which flags are available to the user.
6. Use struct literal initialization to avoid invalid intermediate state. Inline struct declarations where possible.
7. Avoid nil checks via default no-op implementations.
8. Make the zero value useful, especially in config objects.
9. Make dependencies explicit!
10. Loggers are dependencies, just like references to other components, database handles, commandline flags, etc.
11. Use many small interfaces to model dependencies.
12. Tests only need to test the thing being tested.
13. Use a top tool to vendor dependencies for your binary.
14. Libraries should never vendor their dependencies.
15. Prefer go install to go build.
See more details and examples:
https://peter.bourgon.org/go-best-practices-2016/
This article was originally a talk at QCon London 2016; If you want to save your time you can just look through these points:
1. Put $GOPATH/bin in your $PATH, so installed binaries are easily accessible.
2. Put library code under a pkg/ subdirectory. Put binaries under a cmd/ subdirectory.
3. Always use fully-qualified import paths. Never use relative imports.
4. Defer to Andrew Gerrand’s naming conventions.(https://talks.golang.org/2014/names.slide)
5. Only func main has the right to decide which flags are available to the user.
6. Use struct literal initialization to avoid invalid intermediate state. Inline struct declarations where possible.
7. Avoid nil checks via default no-op implementations.
8. Make the zero value useful, especially in config objects.
9. Make dependencies explicit!
10. Loggers are dependencies, just like references to other components, database handles, commandline flags, etc.
11. Use many small interfaces to model dependencies.
12. Tests only need to test the thing being tested.
13. Use a top tool to vendor dependencies for your binary.
14. Libraries should never vendor their dependencies.
15. Prefer go install to go build.
See more details and examples:
https://peter.bourgon.org/go-best-practices-2016/
peter.bourgon.org
Peter Bourgon · Go best practices, six years in
Generally good things to do when writing Go code, in 2016 and beyond.
Go + microservices + docker containers - good article about building and understanding the infrastructure of GoLang services on the Rest API.
Main points of the manual:
- Build Go Restful API with echo framework;
- Build Go binary on golang base image with Docker;
- Build lightweight image (Alpine) holding Go binaries;
- Create containers with Docker
https://hackernoon.com/golang-docker-microservices-for-enterprise-model-5c79addfa811
Main points of the manual:
- Build Go Restful API with echo framework;
- Build Go binary on golang base image with Docker;
- Build lightweight image (Alpine) holding Go binaries;
- Create containers with Docker
https://hackernoon.com/golang-docker-microservices-for-enterprise-model-5c79addfa811
Hackernoon
Golang & Docker — Microservices (RESTful API) for Enterprise Model
“Golang” the language created by Google that provides impeccable performance over application that demands concurrency has grabbed a separate spot in the tech community, few well known Inc’s that adopted the language include Facebook, Netflix , Dropbox etc.…
Errors handling experience, their context, panic and comparison to other languages in the following note:
https://opencredo.com/why-i-dont-like-error-handling-in-go/
https://opencredo.com/why-i-dont-like-error-handling-in-go/
OpenCredo
What I Don't Like About Error Handling in Go, and How to Work Around It - OpenCredo
More often than not, people who write Go have some sort of opinion on it's error handling model. Depending on your experience with other languages, you may
Do you want to read something about GoLang? Here is a list of GoLang books for everyone from beginners to advanced levels
https://github.com/dariubs/GoBooks
https://github.com/dariubs/GoBooks
Joey Clover tells about problems of microservices development and management. Key-points in his article are:
- What are the microservices?
- Why are they hard?
- Is it true that you can use any language for microservices development?
- How should services communicate each other?
- Reasons for the migrating from monolithic application to microservice architecture
https://hackernoon.com/microservices-are-hard-an-invaluable-guide-to-microservices-2d06bd7bcf5d?source=linkShare-b636419a57de-1516468517
- What are the microservices?
- Why are they hard?
- Is it true that you can use any language for microservices development?
- How should services communicate each other?
- Reasons for the migrating from monolithic application to microservice architecture
https://hackernoon.com/microservices-are-hard-an-invaluable-guide-to-microservices-2d06bd7bcf5d?source=linkShare-b636419a57de-1516468517
Hackernoon
Microservices are hard — an invaluable guide to microservices. | HackerNoon
If you’re looking to move to Microservices, I have some extremely helpful advice for you that we have learned during our migration from a monolith to a scalable, maintainable microservice <a href="https://hackernoon.com/tagged/architecture" target="_blan…
Up-to-date article about data-stream processing: Apache Kafka, microservices, JVM to GoLang migrations, ES & Cassandra. What they did when they got 6x traffic increasing in 6 month
#design #cases #microservices #scalability
https://medium.com/@magicpineng/in-depth-look-at-a-scalable-robust-data-stream-processing-pipeline-using-golang-processing-500k-9e68310a0675
#design #cases #microservices #scalability
https://medium.com/@magicpineng/in-depth-look-at-a-scalable-robust-data-stream-processing-pipeline-using-golang-processing-500k-9e68310a0675
Medium
In-depth look at a Scalable & Robust Data Stream Processing pipeline using Golang
Over the last 6 months we have seen tremendous growth at magicpin. We have grown 6x in both users and merchants and the average session…
Do you think about gRPC usage? Here is a great post about step-by-step guide to gRPC framework development. You’ll find here code examples, theory introductions and useful tips. Enjoy learning! 🙂
#manual #development #microservices #examples
https://medium.com/@shijuvar/building-high-performance-apis-in-go-using-grpc-and-protocol-buffers-2eda5b80771b?source=linkShare-b636419a57de-1516656055
#manual #development #microservices #examples
https://medium.com/@shijuvar/building-high-performance-apis-in-go-using-grpc-and-protocol-buffers-2eda5b80771b?source=linkShare-b636419a57de-1516656055
Medium
Building High Performance APIs In Go Using gRPC And Protocol Buffers
APIs are backbone of modern applications. APIs are powering the backend for web client and mobile client applications, and also used for…
❤1👍1
Today the Twitch company is introducing the new gRPC GoLang framework Twirp. It has already announced on the GitHub https://github.com/twitchtv/twirp
#development #frameworks #news
See more by link https://blog.twitch.tv/twirp-a-sweet-new-rpc-framework-for-go-5f2febbf35f
#development #frameworks #news
See more by link https://blog.twitch.tv/twirp-a-sweet-new-rpc-framework-for-go-5f2febbf35f
GitHub
GitHub - twitchtv/twirp: A simple RPC framework with protobuf service definitions
A simple RPC framework with protobuf service definitions - twitchtv/twirp
How to write and use benchmarks? I hope we understand their importance so let’s see couple of thoughts about benchmarks in GoLang:
#development #testing #profiling
https://medium.com/@hackintoshrao/daily-code-optimization-using-benchmarks-and-profiling-in-golang-gophercon-india-2016-talk-874c8b4dc3c5?source=linkShare-b636419a57de-1516810002
#development #testing #profiling
https://medium.com/@hackintoshrao/daily-code-optimization-using-benchmarks-and-profiling-in-golang-gophercon-india-2016-talk-874c8b4dc3c5?source=linkShare-b636419a57de-1516810002
Medium
Daily code optimization using benchmarks and profiling in Golang - Gophercon India 2016 talk
Need some help with analyzing whether algorithm A performs faster than B? Or can I know whether method A performs better than method B? Or…
Tips, tricks and good advices about a memory management in GoLang in the “Allocation Efficiency in High-Performance Go Services” article by the Segment company. You’ll know:
- best way to use pointers in code;
- memory allocation complexity in heap and stack;
- Slice memory-optimisation tricks;
- and more 😉
https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
- best way to use pointers in code;
- memory allocation complexity in heap and stack;
- Slice memory-optimisation tricks;
- and more 😉
https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Twilio
Developers
Explore technical topics, solutions, and resources for building with Twilio – and beyond.
Are you a beginner in GoLang? Then it requires your attention 🙂.
Good and simple for understanding article about microservice-based API development; just simple and work solution with code examples and couple of advices
#development #microservices #architecture #practice
https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3?source=linkShare-b636419a57de-1516910445
Good and simple for understanding article about microservice-based API development; just simple and work solution with code examples and couple of advices
#development #microservices #architecture #practice
https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3?source=linkShare-b636419a57de-1516910445
GoLang 1.10 Release notes has been added!
Go 1.10 is not yet released. These are work-in-progress release notes. Go 1.10 is expected to be released in February 2018.
This release:
- caching of built packages;
- adds caching of successful test results;
- runs vet automatically during tests;
- permits passing string values directly between Go and C using cgo.
#golang #news #releases
See more:
https://tip.golang.org/doc/go1.10
Go 1.10 is not yet released. These are work-in-progress release notes. Go 1.10 is expected to be released in February 2018.
This release:
- caching of built packages;
- adds caching of successful test results;
- runs vet automatically during tests;
- permits passing string values directly between Go and C using cgo.
#golang #news #releases
See more:
https://tip.golang.org/doc/go1.10
Top-featured manual about kubernates-services step-by-step development. Code examples, service design, test coverage
#development #microservices #architecture
https://blog.gopheracademy.com/advent-2017/kubernetes-ready-service/
#development #microservices #architecture
https://blog.gopheracademy.com/advent-2017/kubernetes-ready-service/
Gopheracademy
Write a Kubernetes-ready service from zero step-by-step
If you have ever tried Go, you probably know that writing services with Go is an easy thing. Yes, we really need only few lines to be able to run http service.
In the GoLang we use interfaces everywhere. But we also should understand the rules and idioms how GoLang interfaces works. Let’s read about them 😉; part one:
#development #basics
https://medium.com/golangspec/interfaces-in-go-part-i-4ae53a97479c
#development #basics
https://medium.com/golangspec/interfaces-in-go-part-i-4ae53a97479c
Medium
Interfaces in Go (part I)
Interfaces make the code more flexible, scalable and it’s a way to achieve polymorphism in Golang. Instead of requiring a particular type…
Everybody use dependencies and third-party packages but what is the best way to use it? GopherAcademy helps to understand best practice for the vendor folder organization. Of course, code examples and theory points are included 🙂
#development #basics #manual
https://blog.gopheracademy.com/advent-2015/vendor-folder/
#development #basics #manual
https://blog.gopheracademy.com/advent-2015/vendor-folder/
Gopheracademy
Understanding and using the vendor folder
With the release of Go 1.5, there is a new way the go tool can discover go packages. This method is off by default and the surrounding tools, such as goimports, do not understand that folder layout.
Interesting step-by-step guide about design and development API with Docker containers, Swarm cluster and Traefik (HTTP reverse proxy and load balancer).
In this article you’ll know how to configure the Traefik in the Docker environment with 3 following nodes: one manager and two workers
#architecture #configuration #docker #microservices
https://hackernoon.com/architecting-a-highly-scalable-golang-api-with-docker-swarm-traefik-875d1871cc1f?source=linkShare-b636419a57de-1517171008
In this article you’ll know how to configure the Traefik in the Docker environment with 3 following nodes: one manager and two workers
#architecture #configuration #docker #microservices
https://hackernoon.com/architecting-a-highly-scalable-golang-api-with-docker-swarm-traefik-875d1871cc1f?source=linkShare-b636419a57de-1517171008
Hackernoon
Architecting a Highly Scalable Golang API with Docker Swarm & Traefik | HackerNoon
This post will show you how to setup a <strong>Swarm Cluster</strong>, deploy a couple of microservices, and create a Reverse Proxy Service (with <a href="https://traefik.io/" target="_blank"><strong>Traefik</strong></a>) in charge of routing requests on…
A presentation by Russ Cox in the MIT University: Go’s memory model
#development #memory_management
https://nil.csail.mit.edu/6.824/2016/notes/gomem.pdf
#development #memory_management
https://nil.csail.mit.edu/6.824/2016/notes/gomem.pdf