News for hackers. Stuff that matters.
Re:Building a Streaming Platform in Go for Postgres by steno132 on Monday November 06, 2023 @05:22PM (#38169943)
Hot take: There is no good use case for Go.

For infrastructure projects like PeerDB: Use Rust. It's significantly more performant out of the box, and allows you to use low level primitives like SIMD to make your project even more performant, which isn't possible in Go.

For applications, use Java or Python. The dev productivity is much higher versus a verbose language like Go. That matters more than the higher raw performance you might get from Go (for this use case).

Re:Building a Streaming Platform in Go for Postgres by Thaxll on Monday November 06, 2023 @05:42PM (#38170180)
SIMD is possible in Go, see: https://github.com/bytedance/sonic

Between Go and Rust for infra, let's say that Go is the #1, Rust if far far behind. Most recent infra tools are built in Go, Kubernetes, Docker, Prometheus, Grafana, Terraform etc ...

Re:Building a Streaming Platform in Go for Postgres by steno132 on Monday November 06, 2023 @05:45PM (#38170210)
Yes, SIMD is possible. But what about the other more obscure hardware features there's no nice library for? It's much easier to use those in Rust than Go.
Re:Building a Streaming Platform in Go for Postgres by rastignack on Monday November 06, 2023 @05:39PM (#38170137)
> For applications, use Java or Python.

What’s the deployment story like ? Here’s a hot take of mine: we should treat our users as master and make their lives easier, not ours.

Re:Building a Streaming Platform in Go for Postgres by steno132 on Monday November 06, 2023 @05:41PM (#38170169)
Agreed. We should make life easier for our users. That's why a language like Python or Java, with a faster development time, where we can fix bugs faster and ship features faster, is vastly preferable.
Re:Building a Streaming Platform in Go for Postgres by rastignack on Monday November 06, 2023 @05:51PM (#38170303)
How do you deliver your python package ? How does the end user fetch dependencies ? A proxy ? Pip ? Jfrog ? System packages ? Is he root ? Or behind a corporate proxy / firewall ?

That’s a hot mess to manage.

Re:Building a Streaming Platform in Go for Postgres by JyB on Monday November 06, 2023 @06:04PM (#38170471)
The parent probably doesn't understand what you're talking about. Case in point.
Re:Building a Streaming Platform in Go for Postgres by bashtoni on Monday November 06, 2023 @05:33PM (#38170060)
I strongly disagree with this view for applications, and mildly disagree for infrastructure projects.

There is one thing I believe Go is by far and away the leader at: keeping codebases maintainable over time.

Go is designed very clearly with this goal and it's excellent at it. The verbosity you complain about makes it much, much clearer what something is doing. That coupled with some of the baked in opinions means it is significantly more straightforward to pick up code that you or someone else wrote a few years ago and modify it.

Re:Building a Streaming Platform in Go for Postgres by steno132 on Monday November 06, 2023 @05:43PM (#38170191)
See, this is a problem I see many junior engineers struggle with: Excessive desire to make one's own life easier at the cost of customers.

Yes, your codebase is nice and elegant and maintainable. But you haven't shipped as many features as the Python or Java developer, haven't delivered as much value to customers. Ultimately, the users suffer. It's a form of selfishness.

Re:Building a Streaming Platform in Go for Postgres by JyB on Monday November 06, 2023 @06:02PM (#38170433)
I've never seen teams as efficient at shipping stuff as when they switched to Go. At multiple companies. Complete fallacy on your part.
Re:Building a Streaming Platform in Go for Postgres by bashtoni on Monday November 06, 2023 @06:12PM (#38170550)
To follow your logic: if I pump out a lot of features but others find my code difficult to maintain I'm not being selfish.

If I write code more slowly that others find easier to maintain, that is selfish?

Re:Building a Streaming Platform in Go for Postgres by mplewis on Tuesday November 07, 2023 @12:07AM (#38173490)
I’ve observed the exact opposite. Python teams are much slower to ship features than Go teams once the codebase grows to a nontrivial size.
Re:Building a Streaming Platform in Go for Postgres by athreyac8 on Tuesday November 07, 2023 @03:39AM (#38174573)
Never saw a Java developer ship things fast.
Re:Building a Streaming Platform in Go for Postgres by the_gipsy on Monday November 06, 2023 @05:32PM (#38170058)
Java more productive than go?
Re:Building a Streaming Platform in Go for Postgres by bashtoni on Monday November 06, 2023 @05:36PM (#38170098)
If you judge productivity by lines of code, absolutely.

https://github.com/Hello-World-EE/Java-Hello-World-Enterpris... is an excellent demonstration of this.

Re:Building a Streaming Platform in Go for Postgres by steno132 on Monday November 06, 2023 @05:46PM (#38170232)
Java developers tend to produce more value since they can write the code in a more concise way using Lambdas, functional interfaces, record classes, etc. Overengineering like in your example above can be done in any language, but shouldn't.
Re:Building a Streaming Platform in Go for Postgres by fsaintjacques on Monday November 06, 2023 @07:21PM (#38171305)
If only go had lambdas, functional interfaces and record classes...
Re:Building a Streaming Platform in Go for Postgres by cauchyk on Monday November 06, 2023 @05:49PM (#38170268)
Author of the blog here: I'm a huge proponent of Rust, but in this project while interfacing with BigQuery and Snowflake go proved to be the right choice. There weren't official drivers for these in Rust and also generally onboarding new devs in Go was easier. I also personally think async in rust has a few more releases to go before I would consider it stable.
Re:Building a Streaming Platform in Go for Postgres by _bohm on Monday November 06, 2023 @06:42PM (#38170923)
I have extensive experience with Go, Python, Java, and Scala. I write Scala and Java at my day job, and find I am far more productive in Go than either of these.

Your framing of the issue in terms of infrastructure projects vs. applications seems bizarre and simplistic. For example, one of the areas where Go shines is in highly concurrent, io-bound, networked services. Many examples of good use cases for Go in the wild: Kubernetes, CockroachDB, TiDB, etc.

https://www.cockroachlabs.com/blog/why-go-was-the-right-choi...