G
Gopher Academy Blog
blog.gopheracademy.com · Group blog · on HN since 2013
Gopher Academy publishes community articles about the Go language, covering servers, parsers, dependency management, and garbage collection.
What HN saysHN links it for guides like exposing Go directly to the internet, which its author says is somewhat dated, and a Go versus Rails piece.
94HN people shared it
30linked it in comments
175stories submitted
1.6Kstory points
6 months agolast shared
2013people per year2026
Most-shared posts
- 1So you want to expose Go on the Internet4 people · 433 points · first shared 2016 · 140 comments on HN
- 2The Case Against Third Party Libraries (2014)4 people · 46 points · first shared 2014 · 28 comments on HN
- 3Handwritten Parsers and Lexers in Go4 people · 12 points · first shared 2014 · discussion on HN
- 4Building with Rails and Go Microservices4 people · 11 points · first shared 2014 · discussion on HN
- 5Go 1.104 people · 9 points · first shared 2017 · discussion on HN
- 6Splitting Data with Content-Defined Chunking4 people · 6 points · first shared 2018 · discussion on HN
- 7Avoiding high GC overhead with large heaps4 people · 5 points · first shared 2018 · discussion on HN
- 8The Saga of Go Dependency Management4 people · 3 points · first shared 2016 · discussion on HN
- 9Cron as a filesystem3 people · 68 points · first shared 2015 · 17 comments on HN
- 10Automi: Stream Processing Over Go Channels3 people · 6 points · first shared 2015 · discussion on HN
- 11Property Based Testing GopherAcademy3 people · 3 points · first shared 2017 · discussion on HN
- 12Probabilistic Data Structures for Go2 people · 18 points · first shared 2014 · discussion on HN
- 13Minimal Perfect Hash Functions in Go2 people · 16 points · first shared 2017 · 1 comments on HN
- 14Testing distributed systems in Go2 people · 11 points · first shared 2016 · discussion on HN
- 15Composable pipelines in Go, Flow based style, without framework2 people · 9 points · first shared 2015 · discussion on HN
What HN people wrote when they linked it
bketelsen · 2016-02-23
I use caddy for everything I serve on the web now, and have been for roughly a year. It's an amazingly stable server -- fast and easy to configure. The team has continuously updated Caddy, and been extremely responsive to any feature requests and support questions. https://www.gophercon.com and https://blog.gopheracademy.com are both served (with Let's Encrypt!) from Caddy.
FiloSottile · 2019-02-26
crypto/tls is designed and developed to be fit to be exposed directly to the Internet. The advice I wrote here is mostly dated (I really need to write a follow-up), but it's still indicative: https://blog.gopheracademy.com/advent-2016/exposing-go-on-the-internet…
[Updated to add] TLS 1.3 is opt-in because despite years of improvements, it can still hit compatibility issues with broken or legacy peers. (Search for "TLS 1.3" on the Go issue tracker if you are curious.)
0-RTT is blocked on figuring out good, safe APIs for it. I feel like I am 80% of the way there for servers (just have to figure out how to make it opt-in per http.Handler instead of opt-out), while for clients I have no idea how to fit resending in io.Writer.
zalmoxes · 2016-12-13
Relevant: Russ Cox, the blog author is one of the core members of the Go team.
Russ gave a great talk on challenges with code refactoring at GothamGo last month:
- writeup https://talks.golang.org/2016/refactor.article
- video https://www.youtube.com/watch?v=h6Cw9iCDVcU
A group of community members have been working on a proposal for a package manager for Go. Sam Boyer also wrote an article about their progress here:
https://blog.gopheracademy.com/advent-2016/saga-go-dependency-manageme…
mbucc · 2015-08-24
This tutorial is a good intro: http://blog.gopheracademy.com/cron-filesystem/
The Plan 9 web pages are really good (if dense).
If you write in Go, check out github.com/rminnich/go9p.
For a deep dive, "A Cached WORM File System" is a good read [http://doc.cat-v.org/plan_9/misc/cw/].
jweir · 2015-04-23
I like Go, and I am replacing aspects of Rails apps with Go, but for a lot of web app uses, Rails is really, really good.
Hashicorp, who has a very high Go competence, migrated away from Go to Rails for their web service.
http://blog.gopheracademy.com/advent-2014/atlas/
> Once we decided to evaluate other technologies for our web service, we had a few choices. Based on having Rails experience and the maturity of that tooling we saw it as the most pragmatic option. As we began our initial port, we realized that over two weeks worth of work in Go had been replaced in just a few hours in Rails. We were sold.
agwa · 2026-04-29
Go's embedded HTTP server can handle it just fine: https://blog.gopheracademy.com/advent-2016/exposing-go-on-the-internet…
otoolep · 2025-01-24
Related, but not exactly the same: https://blog.gopheracademy.com/advent-2014/case-against-3pl/
yencabulator · 2025-01-19
Plot twist: Gogs was never viable.
> In my point of view, as long as no deadlock..data race is unavoidable.
https://github.com/gogs/gogs/issues/613
> The payload comes from request somehow is not always in a clean format, so we have to preform a clean operation to remove unless characters:
func cleanCommand(cmd string) string { i := strings.Index(cmd, "git") if i == -1 { return cmd } return cmd[i:] } https://blog.gopheracademy.com/advent-2015/ssh-server-in-go/
https://github.com/gogs/gogs/issues/7777
goncaloo · 2022-06-19
If anyone else wants to see how property testing works in Go, this article has some nice examples: https://blog.gopheracademy.com/advent-2017/property-based-testing/
nokamok · 2022-01-23
I think you’re on to something. Just reread this article: https://blog.gopheracademy.com/advent-2018/interfaces-and-reflect/
And there’s definitely an overhead associated with the interface type due to run-time reflection.
I guess generics does away with this.
krenel · 2020-02-28
Well, the parameter of a Timer is of type Duration:
A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
Which is not really good because we have to calculate the time between now() and Saturday. If "wall time" changes, the scheduler will not be triggered when expected.
In that case I would not rely on Timer to use it in a cron-like fashion, or trigger a Ticker every second, check the _current_ wall time, and decide if anything needs to be done.
You can read more about Timers, Tickers and Sleeps in this (pretty interesting) article[1]
[1] https://blog.gopheracademy.com/advent-2016/go-timers/
ssoroka · 2020-02-04
Check out this post, that describes exactly that process. https://blog.gopheracademy.com/advent-2018/avoid-gc-overhead-large-hea…
kristianp · 2019-03-14
Reading this led me to wonder if Go is available on Arm Plan 9. There's a way to cross-compile it [1], it requires a shell script to simulate git [2] (which isn't available on Plan 9) using http calls to github!
[1] https://github.com/golang/go/wiki/Plan9
[2] https://blog.gopheracademy.com/advent-2014/wrapping-git/
twotwotwo · 2018-12-26
Re: showing bottlenecks, the Go latency tracer may be a neat reference point; it doesn't find serial parts automatically, but it shows the execution timeline so that you can see them. Besides serial bottlenecks, it can be useful for seeing where you blocked waiting on I/O and so on:
https://blog.gopheracademy.com/advent-2017/go-execution-tracer/
There might already be similar tools for Rust; I know less about what's available there.
(Go folks also added some tools for tracing across RPCs, which is less relevant to what you said but just kinda independently neat: https://medium.com/observability/debugging-latency-in-go-1-11-9f97a791…
sbinet · 2018-12-19
wrt n-dim arrays: yes, it's a pain point.
we (Gonum devs) tried to push for an "n-dim slice" type a couple of years ago.
it didn't pan out.
generics may help in that department.
in the meantime, there's Apache Arrow:
- https://blog.gopheracademy.com/advent-2018/go-arrow/
Marat_Dukhan · 2017-04-24
PeachPy, an x86-64 assembler in Python, is often used to target Golang assembler without dealing with its weird syntax. PeachPy uses Intel assembly syntax, but can generate assembly listing for Golang toolchain as its output. Damian Gryski wrote a tutorial about using PeachPy for Golang assembly: https://blog.gopheracademy.com/advent-2016/peachpy/
Disclosure: I'm the author of PeachPy
thegeekpirate · 2017-01-11
stablemap · 2017-01-10
There is a committee working on it. Here's a detailed update from last month:
https://blog.gopheracademy.com/advent-2016/saga-go-dependency-manageme…
christophberger · 2017-01-08
If you want to contribute to the Go project itself, this article is a good start: https://blog.gopheracademy.com/advent-2016/contributing-to-the-go-proj…
For all other Go projects, check the project documentation or ask the maintainer(s) if and how you can contribute. This should not be different from any other (i.e., non-Go) open source project.
abglassman · 2016-12-24
Then you are absolutely going to hate the article I recently contributed to Gopher Academy's advent series, https://blog.gopheracademy.com/advent-2016/go-syntax-for-dsls/ , about using Go to create terse, declarative DSLs for things like, say, building a webapp.
shadowmint · 2016-12-24
https://blog.gopheracademy.com/advent-2016/exposing-go-on-the-internet… covers a number of issues that should be considered.
weitzj · 2016-12-07
I also enjoy the Go Advent Calendar: https://blog.gopheracademy.com/series/advent-2016/
samuell · 2015-12-23
Btw, I should also give a shoutout to Vladimir Vivien's Automi library, also posted on the GopherAcademy blog some days ago: https://blog.gopheracademy.com/advent-2015/automi-stream-processing-ov…
It takes an interesting, slightly different approach, in my view especially for slightly lower-level operations compared to the "scipipe" pattern above. For example, it looks like something I'd use for implementing the internals of components in my pattern.
chx · 2015-06-21
There's a golang http://blog.gopheracademy.com/gophers-slack-community/ Slack channel. Not 100 000s for sure but there are a lot of people using Go.
thibaut_barrere · 2015-04-23
You can do that in Go, yet like pointed out in [1], it tends to take more effort (well, this has been my experience at least).
But well: do what works for you, really :-) I'm not commenting to persuade you, I'm just sharing one data point.
[1] http://blog.gopheracademy.com/advent-2014/atlas/
shurcooL · 2015-02-01
I remember writing a blog post [1] (for another publication) about my project and the day it was published, I realized there was not a single link to my project (it had screenshots and all).
I immediately made a PR to fix it, but it was a funny and glaring omission. I just didn't realize the link was missing because I wrote it in Markdown and never looked at the rendered version.
[1] http://blog.gopheracademy.com/updating-your-go-packages-with-go-packag…
farslan · 2015-01-22
I'm one of the Core authors of the Kite library (library for writing micro services). I wrote an extensive introduction here on GopherAcademy: http://blog.gopheracademy.com/birthday-bash-2014/kite-microservice-lib…
I think Gotalk and Kite have a lot of common (for example we have also kite.js, to talk with browsers). The mission of the Kite library is the same as with Gotalk, mainly to communicate two pieces of software in an easy way. However in order to achieve this Kite also has an inbuilt service discovery mechanism. I think this is really important because with time you are app number will increase and service discovery is a must have. There are many differences too, for example protocol (we use JSON).
Congrats on shipping this, I'm really looking forward to see how it evolves and how you solve upcoming problems (such as poor network conditions where Websocket badly fails).
mikebabineau · 2014-04-17
See also SkyDNS, another service discovery system: http://blog.gopheracademy.com/skydns
In common with Consul:
* DNS interface
* Operates as a distributed cluster
* Uses Raft for consensus
jonnybgood · 2014-01-28
Here are some examples just off the top of my head.
Go:
http://blog.gopheracademy.com/moving-to-go
http://blog.iron.io/2013/03/how-we-went-from-30-servers-to-2-go.html
http://blog.gopheracademy.com/day-03-building-a-twelve-factor-app-in-g…
Clojure:
http://blog.getprismatic.com/blog/2013/1/14/bringing-functional-to-the…
http://www.infoq.com/presentations/Why-Prismatic-Goes-Faster-With-Cloj…
derhuerst · 2022-08-30
There is a project called Peermaps that is building a full P2P stack for OSM-based maps:
They convert Planet OSM and Natural Earth OSM dumps into the storage format used by their geospatial DB [1] and then distribute them using P2P file storage tools like IPFS [3] or hyperdrive [4].
Because those storage tools make use of content addressing [5] and clever chunking [6], you can download only changes to the (converted) OSM dump.
Because those tools are inherently P2P-focused and come with pluggable transports, the data representing the changes in the (converted) OSM dump don't have to be sent via the internet. For example, Mapeo [7] allows syncing "local" changes to OSM via USB sticks [8].
[1] https://github.com/peermaps/eyros
[2] https://github.com/peermaps/data
[3] https://ipfs.io/#why
[4] https://hypercore-protocol.org/guides/modules/hyperdrive/
[5] https://docs.ipfs.tech/concepts/how-ipfs-works/#content-addressing
[6] https://blog.gopheracademy.com/advent-2018/split-data-with-cdc/
[7] https://www.digital-democracy.org/mapeo/
[8] https://docs.mapeo.app/complete-reference-guide/mapeo-desktop-use/usin…