Hi, channel 👋
You probably know, how to deal with WebSockets in Go, don’t you?
But what if we need to handle millions of them? In the following well-written article an approach is described which could help us to handle up to 3 million online connections 😱
https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/
You probably know, how to deal with WebSockets in Go, don’t you?
But what if we need to handle millions of them? In the following well-written article an approach is described which could help us to handle up to 3 million online connections 😱
https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/
freeCodeCamp.org
A Million WebSockets and Go
By Sergey Kamardin Hi everyone! My name is Sergey Kamardin and I’m a developer at Mail.Ru. This article is about how we developed the high-load WebSocket server with Go. If you are familiar with WebSockets, but know little about Go, I hope you will s...
👍3❤1🔥1👏1
Happy New year for everyone 😀🎉 that's an interesting stuff I've found recently: how Grab deals with event sourcing and stream processing pipelines in Go. Worth to read especially the system design parts. Enjoy 🙌 https://engineering.grab.com/plumbing-at-scale
Grab Tech
Plumbing At Scale
This article details our journey building and deploying an event sourcing platform in Go, building a stream processing framework over it, and then scaling it (reliably and efficiently) to service over 300 billion events a week.
How much do you know about defers in Go?
https://rakyll.org/inlined-defers/
> An optimization in 1.14 and later for simple use cases with defer that removes most of the performance hit for deferred functions, complete with the how and the why.
https://rakyll.org/inlined-defers/
> An optimization in 1.14 and later for simple use cases with defer that removes most of the performance hit for deferred functions, complete with the how and the why.
An overview and first impressions of Go made by an advanced JS engineer
>> As an advanced JavaScript developer, The more I work with JavaScript the more I understand the advantages of a statically typed language.
JavaScript is fascinating but sometimes you want to try something else and broaden your horizon.
This article will be a brain dump of all I’ve learned so far about Google’s Go language (I will update it as I go, pun intended).
I assume you have installed the Go binaries on your computer.
https://itnext.io/googles-go-essentials-for-node-js-javascript-developers-6d71f08d2531
>> As an advanced JavaScript developer, The more I work with JavaScript the more I understand the advantages of a statically typed language.
JavaScript is fascinating but sometimes you want to try something else and broaden your horizon.
This article will be a brain dump of all I’ve learned so far about Google’s Go language (I will update it as I go, pun intended).
I assume you have installed the Go binaries on your computer.
https://itnext.io/googles-go-essentials-for-node-js-javascript-developers-6d71f08d2531
👋 In case you're still not using Go interfaces or you're curious how they could be applied, check this small post out:
https://medium.com/better-programming/a-real-world-example-of-go-interfaces-98e89b2ddb67
(Only 2 mins read)
https://medium.com/better-programming/a-real-world-example-of-go-interfaces-98e89b2ddb67
(Only 2 mins read)
Medium
A Real-World Example of Go Interfaces
How to implement Go interfaces and why they’re awesome
👋 A lot of people are using validator.Validate for struct fields validation in Go. But how about to write your own custom validation rules? Check this article out:
https://medium.com/swlh/custom-struct-field-tags-and-validation-in-golang-9a7aeedcdc5b
https://medium.com/swlh/custom-struct-field-tags-and-validation-in-golang-9a7aeedcdc5b
Medium
Custom struct field tags and validate in Golang
Structs in Golang represent one of the most common variable types and used practically everywhere, from dealing with configuration options…
https://youtu.be/0c-1KJwSMCw
What’s happened to Go since Go 1.12 and what’s coming up for Go 1.14? Francesc Campoy and Maartje Eyskens took 25 minutes at last week’s FOSDEM event to bring us all up to speed.
Slides are here if you're not up for the video 🙂
https://speakerdeck.com/campoy/the-state-of-go-2020
What’s happened to Go since Go 1.12 and what’s coming up for Go 1.14? Francesc Campoy and Maartje Eyskens took 25 minutes at last week’s FOSDEM event to bring us all up to speed.
Slides are here if you're not up for the video 🙂
https://speakerdeck.com/campoy/the-state-of-go-2020
YouTube
State of Go 2020: changes since Go 1.12
Slides: bit.ly/sog-fosdem20
Francesc Campoy (https://twitter.com/francesc) and Maartje Eyskens (https://twitter.com/MaartjeME) come back to FOSDEM to cover the most important changes to the community since the same talk in 2019.
We cover the most important…
Francesc Campoy (https://twitter.com/francesc) and Maartje Eyskens (https://twitter.com/MaartjeME) come back to FOSDEM to cover the most important changes to the community since the same talk in 2019.
We cover the most important…
Good day for everyone 👋 I kinda missed the news for a bit, but no worries, here we are: a new interesting post comes up recently from Go dev team, check it out:
A new Go API for Protocol Buffers
Joe Tsai, Damien Neil, and Herbie Ong
Introduction: We are pleased to announce the release of a major revision of the Go API for protocol buffers, Google's language-neutral data interchange format.
https://blog.golang.org/protobuf-apiv2
A new Go API for Protocol Buffers
Joe Tsai, Damien Neil, and Herbie Ong
Introduction: We are pleased to announce the release of a major revision of the Go API for protocol buffers, Google's language-neutral data interchange format.
https://blog.golang.org/protobuf-apiv2
go.dev
A new Go API for Protocol Buffers - The Go Programming Language
Announcing a major revision of the Go API for protocol buffers.
“How We Created a Realtime Patient Monitoring System With Go and Vue in 3 days”
The risk of handling a Covid-19 ward
The deadly virus can infect you with a very small mistake. As healthcare workers, our frontline has to wander around the isolation wards to check vital signs of a patient from time to time. This task involves disposing of the protective gear after a visit. All just to check some reading on a device.
A request from health authorities reached us to develop a remote monitoring system for isolation wards. There are expensive softwares to remotely monitor them. But Sri Lanka might not be that rich to spend such amount of money.
https://kasvith.me/posts/how-we-created-a-realtime-patient-monitoring-system-with-go-and-vue/
The risk of handling a Covid-19 ward
The deadly virus can infect you with a very small mistake. As healthcare workers, our frontline has to wander around the isolation wards to check vital signs of a patient from time to time. This task involves disposing of the protective gear after a visit. All just to check some reading on a device.
A request from health authorities reached us to develop a remote monitoring system for isolation wards. There are expensive softwares to remotely monitor them. But Sri Lanka might not be that rich to spend such amount of money.
https://kasvith.me/posts/how-we-created-a-realtime-patient-monitoring-system-with-go-and-vue/
Hello, everyone 👋 It’s announcement time 📣
GoWayFest 4.0 - the 4th edition of the conference fully dedicated to Go - will be held online on July 11-12 and will bring together gophers and Go-fans from all over the globe.
This year’s speakers team is full of Go-stars:
◻️ Dave Cheney will share a secret how the names we give to things can affect the maintainability of the software;
◻️ Ellen Körbes will help you to speed up your “from code change to process running” benchmark for Go applications;
◻️ Iskander Sharipov with several topics about implementation an efficient VM in GO;
◻️ Mat Ryer, Andrii Soldatenko and other speakers on the website.
Lineup will be updated - subscribe not to miss the news ➡️ https://goway.io/#speakers
🌐 Check out online perks:
▪️ more great speakers with talks and Q&A in virtual rooms;
▪️ networking with go-programmers from different countries;
▪️ any talk in any track on-demand whenever you want;
▪️ no last row seats;
▪️ much cheaper tickets;
▪️ no borders, no visas, no travel arrangements;
and more cool stuff and opportunities.
Subscribe not to miss the news ➡️ https://goway.io/.
Get your ticket for 70 $ till June 29 - then the price will go up.
Use the promocode GOWAYtoGO and get your ticket with 15% off.
Join us for days full of Go and networking ➡️ https://goway.io/#tickets
GoWayFest 4.0 - the 4th edition of the conference fully dedicated to Go - will be held online on July 11-12 and will bring together gophers and Go-fans from all over the globe.
This year’s speakers team is full of Go-stars:
◻️ Dave Cheney will share a secret how the names we give to things can affect the maintainability of the software;
◻️ Ellen Körbes will help you to speed up your “from code change to process running” benchmark for Go applications;
◻️ Iskander Sharipov with several topics about implementation an efficient VM in GO;
◻️ Mat Ryer, Andrii Soldatenko and other speakers on the website.
Lineup will be updated - subscribe not to miss the news ➡️ https://goway.io/#speakers
🌐 Check out online perks:
▪️ more great speakers with talks and Q&A in virtual rooms;
▪️ networking with go-programmers from different countries;
▪️ any talk in any track on-demand whenever you want;
▪️ no last row seats;
▪️ much cheaper tickets;
▪️ no borders, no visas, no travel arrangements;
and more cool stuff and opportunities.
Subscribe not to miss the news ➡️ https://goway.io/.
Get your ticket for 70 $ till June 29 - then the price will go up.
Use the promocode GOWAYtoGO and get your ticket with 15% off.
Join us for days full of Go and networking ➡️ https://goway.io/#tickets
👍1
Wow, after almost a year of silence a new info about generics in Go comes up officially 👏 the update brings to us:
- a new, updated design draft;
- an experimental tool to try generics from the draft by yourself;
- and a few lines about what’s going to happen next.
Here I’d like to post a quote from the post and then allow you to read the rest by the link below.
>>>
Introduction
It’s been almost a year since we last wrote about the possibility of adding generics to Go. It’s time for an update.
Updated design
We’ve been continuing to refine the generics design draft. We’ve written a type checker for it: a program that can parse Go code that uses generics as described in the design draft and report any type errors. We’ve written example code. And we’ve collected feedback from many, many people—thanks for providing it!
Based on what we’ve learned, we’re releasing an updated design draft. The biggest change is that we are dropping the idea of contracts. The difference between contracts and interface types was confusing, so we’re eliminating that difference. Type parameters are now constrained by interface types. Interface types are now permitted to include type lists, though only when used as constraints; in the previous design draft type lists were a feature of contracts. More complex cases will use a parameterized interface type.
We hope that people will find this design draft simpler and easier to understand.
https://blog.golang.org/generics-next-step
- a new, updated design draft;
- an experimental tool to try generics from the draft by yourself;
- and a few lines about what’s going to happen next.
Here I’d like to post a quote from the post and then allow you to read the rest by the link below.
>>>
Introduction
It’s been almost a year since we last wrote about the possibility of adding generics to Go. It’s time for an update.
Updated design
We’ve been continuing to refine the generics design draft. We’ve written a type checker for it: a program that can parse Go code that uses generics as described in the design draft and report any type errors. We’ve written example code. And we’ve collected feedback from many, many people—thanks for providing it!
Based on what we’ve learned, we’re releasing an updated design draft. The biggest change is that we are dropping the idea of contracts. The difference between contracts and interface types was confusing, so we’re eliminating that difference. Type parameters are now constrained by interface types. Interface types are now permitted to include type lists, though only when used as constraints; in the previous design draft type lists were a feature of contracts. More complex cases will use a parameterized interface type.
We hope that people will find this design draft simpler and easier to understand.
https://blog.golang.org/generics-next-step
go.dev
Why Generics? - The Go Programming Language
Why should we add generics to Go, and what might they look like?
👍1
That’s fantastic! 😀 An example of using Go to build something that works in the browser by way of WebAssembly
https://dstoiko.github.io/posts/go-pong-wasm/
https://dstoiko.github.io/posts/go-pong-wasm/
Making Pong with Go and WebAssembly
Making Pong with Go and WebAssembly :: dstoiko personal blog —
TL;DR For those of you in a hurry: I made a version of the classic Pong game using Go and WebAssembly. I then embedded that game on my website. Warning: it works only on desktop now (no handling of touch). Here is the game, enjoy:
Why WebAssembly WebAssembly…
Why WebAssembly WebAssembly…
Let's build a Full-Text Search engine in Go
Full-Text Search (FTS) is a technique for searching text in a collection of documents. A document can refer to a web page, a newspaper article, an email message, or any structured text.
Today we are going to build our own FTS engine. By the end of this post, we'll be able to search across millions of documents in less than a millisecond. We'll start with simple search queries like "give me all documents that contain the word cat" and we'll extend the engine to support more sophisticated boolean queries.
https://artem.krylysov.com/blog/2020/07/28/lets-build-a-full-text-search-engine/
Full-Text Search (FTS) is a technique for searching text in a collection of documents. A document can refer to a web page, a newspaper article, an email message, or any structured text.
Today we are going to build our own FTS engine. By the end of this post, we'll be able to search across millions of documents in less than a millisecond. We'll start with simple search queries like "give me all documents that contain the word cat" and we'll extend the engine to support more sophisticated boolean queries.
https://artem.krylysov.com/blog/2020/07/28/lets-build-a-full-text-search-engine/
❤1👍1
About the main function
I love how simple Go’s entry point main function is. It is where your code will start when someone runs your program.
However, main is difficult to test, and it’s not clear how we access the environmental dependencies our program has, such as stdin, stdout, the command line args, the environment variables themselves, etc.
https://pace.dev/blog/2020/02/12/why-you-shouldnt-use-func-main-in-golang-by-mat-ryer.html
I love how simple Go’s entry point main function is. It is where your code will start when someone runs your program.
package main
func main() {
// stuff
}
However, main is difficult to test, and it’s not clear how we access the environmental dependencies our program has, such as stdin, stdout, the command line args, the environment variables themselves, etc.
https://pace.dev/blog/2020/02/12/why-you-shouldnt-use-func-main-in-golang-by-mat-ryer.html
Pace Blog
Why you shouldn't use func main in Go by Mat Ryer - PACE.
A simple abstraction for your Go programs can make your code more readable, and much more testable.
👍1👎1
How to build a terminal dashboard in Golang in 300 lines of code using termui.
https://levelup.gitconnected.com/building-a-terminal-dashboard-in-golang-in-300-lines-of-code-3b9f83f363a8
https://levelup.gitconnected.com/building-a-terminal-dashboard-in-golang-in-300-lines-of-code-3b9f83f363a8
🔥1
Microservices
Hello, world!\n 😄
This week I came across my notes and bookmarks and made a list of resources where to start learning about microservices, and I’d like to share it here. Hope it’s gonna be useful.
📒Posts & Articles:
- 35 Microservices Interview Questions You Most Likely Can't Answer: https://dev.to/aershov24/35-microservices-interview-questions-you-most-likely-can-t-answer-2eoc
- Martin Fowler’s microservices, classic: https://martinfowler.com/articles/microservices.html
- Nice intro into Microservices topic from NGINX team: https://www.nginx.com/blog/introduction-to-microservices/
📚A book to read: “Building Microservices: Designing Fine-Grained Systems” - https://www.amazon.com/Building-Microservices-Designing-Fine-Grained-Systems-ebook/dp/B00T3N7XB4
🧑🏫Tutorials
🔴If you’d like to start from practice in a hard mode, feel free to go here:
- “Introduction to Microservices in Go” https://ewanvalentine.io/microservices-in-golang-part-0/ This is a big and somewhat complete series/tutorial of building a service from scratch in Go, including docker, CI configuration, deployment, Kubernetes and much more things.
🟢Easy-going practices are:
- An option with MySQL: “Build a REST API as a Go microservice together with MySQL” -https://dev.to/johanlejdung/a-mini-guide-build-a-rest-api-as-a-go-microservice-together-with-mysql-27m2
- MongoDB-based example: “Microservices: An Example With Docker, Go, and MongoDB” - https://dzone.com/articles/microservices-an-example-with-docker-go-and-mongod
Hello, world!\n 😄
This week I came across my notes and bookmarks and made a list of resources where to start learning about microservices, and I’d like to share it here. Hope it’s gonna be useful.
📒Posts & Articles:
- 35 Microservices Interview Questions You Most Likely Can't Answer: https://dev.to/aershov24/35-microservices-interview-questions-you-most-likely-can-t-answer-2eoc
- Martin Fowler’s microservices, classic: https://martinfowler.com/articles/microservices.html
- Nice intro into Microservices topic from NGINX team: https://www.nginx.com/blog/introduction-to-microservices/
📚A book to read: “Building Microservices: Designing Fine-Grained Systems” - https://www.amazon.com/Building-Microservices-Designing-Fine-Grained-Systems-ebook/dp/B00T3N7XB4
🧑🏫Tutorials
🔴If you’d like to start from practice in a hard mode, feel free to go here:
- “Introduction to Microservices in Go” https://ewanvalentine.io/microservices-in-golang-part-0/ This is a big and somewhat complete series/tutorial of building a service from scratch in Go, including docker, CI configuration, deployment, Kubernetes and much more things.
🟢Easy-going practices are:
- An option with MySQL: “Build a REST API as a Go microservice together with MySQL” -https://dev.to/johanlejdung/a-mini-guide-build-a-rest-api-as-a-go-microservice-together-with-mysql-27m2
- MongoDB-based example: “Microservices: An Example With Docker, Go, and MongoDB” - https://dzone.com/articles/microservices-an-example-with-docker-go-and-mongod
DEV Community
35 Microservices Interview Questions You Most Likely Can't Answer
35 Microservices Interview Questions You Most Likely Can't Answer
👍6❤1
Interesting reading about a tool that examines your Go code and recommends optimal struct field arrangements to help improve memory efficiency:
https://medium.com/orijtech-developers/efficient-struct-packing-guided-pass-for-go-92255872ec72
https://medium.com/orijtech-developers/efficient-struct-packing-guided-pass-for-go-92255872ec72
Medium
Efficient struct packing guided pass for Go
TL;DR: at Orijtech, we’ve developed a static analysis pass called “structslop” that can run through your Go programs and recommend for you…
👏1
Making SQLite faster in Go 🚀
The most popular way of using sqlite in Go happens to also be the slowest when using it in a concurrent application like a web app. Roll your own connection pool to speed things up.
https://turriate.com/articles/making-sqlite-faster-in-go
The most popular way of using sqlite in Go happens to also be the slowest when using it in a concurrent application like a web app. Roll your own connection pool to speed things up.
https://turriate.com/articles/making-sqlite-faster-in-go
Sandro Turriate
Making SQLite faster in Go
Make sqlite faster with a connection pool and prepared statements.
👍1
Discovering and exploring
https://brunocalza.me/discovering-and-exploring-mmap-using-go/
mmap(memory-mapped files) using Go
mmapis a system call for mapping files into memory which can provide a neat abstraction for working with both. Here’s how to use it in Go along with when you shouldn’t.
https://brunocalza.me/discovering-and-exploring-mmap-using-go/
Bruno Calza
Discovering and exploring mmap using Go
Recently I've come to know the concept of memory-mapped files while watching a lecture of the course Intro to Database Systems of Andy Pavlo on database storage. One of the main problems a database storage engine has to solve is how to deal with data in disk…