Live data from Hacker News

Go + Services = One Goliath Project

engineering.khanacademy.org

241–250 of 449 posts

Re: Go + Services = One Goliath Project

#241

Earlier quoted context omitted.

How does WASM fill this gap? > fast compiles, fast startup and fast runtime ... mainstream C is this but it's harder to write secure/correct C, the standard library is smaller, and there's no canonical toolchain in the same way as Go.

One doesn't just write WASM though.. WASM is like the JVM. You still need to write code in some other language.

Exactly. Hence posing the question (rhetorically, I suppose).

Re: Go + Services = One Goliath Project

#242

Earlier quoted context omitted.

> That said, yeah it's difficult to understand how KA's web server costs aren't already basically zero, and how their endpoints aren't already basically instantaneous. I find that this is the outsider's view of a great many products. Things always seem a lot simpler on the outside. In Khan Academy's case, I think a lot of folks just think of our site as being a collection of more-or-less static pages with videos on t…

Fair, but what percentage of spend is actually on web servers as opposed to database, data transfer, static asset storage, caches, CDN, etc? The features you listed are kind of what I expected, but I still wouldn't expect the web servers to be more than 15% or so of your hosting costs. I know you guys get a ton of traffic, but on most web sites at least 90% of traffic is logged out and doesn't even need to hit the we…

I don't have recent numbers in front of me, but I believe our web servers are more like 40% of our hosting costs today.

Over the past year, we've started leveraging our CDN (Fastly, who have been great) a lot more. That said, for us a lot of logged out traffic still carries the weight of logged in traffic. A logged out user can start doing math exercises and we'll keep track of what they've done. If they then create an account or log in, that activity is associated with their account.

Khan Academy may look like a content site, but in many ways it's more like a "learning app".

Re: Go + Services = One Goliath Project

#243

The article mentions Go's superior compile time, when compared to Kotlin. I have done a lot more Java development than Kotlin, but my recollection is that both of them compiled fairly fast. Is Go really significantly faster to compile for similarly sized projects?

Yes, it’s much faster than these java and jvm based codebases (including all jvm based languages like kotlin, scala etc). Go as a language is just so much simpler.

Although compiling overhead of large JavaScript codebases, that make up most of modern websites, kills any kind of benefit in improving build performance of some backend service.

Re: Go + Services = One Goliath Project

#244
post #128

As much as I personally don’t enjoy writing Go I really can’t fault them. I still find it interesting that for a relatively obvious feature set of fast compiles, fast startup and fast runtime there really isn’t anything mainstream out there to compete with Go. I really hope something like Kotlin, Swift, ReasonML or even AOT JVM/.NET brings something to the table soon. Or perhaps I’ll just have to wait for WASM to rea…

in production is fast startup really such a boon outside of serverless? especially if you're already doing blue/green deployments, doesn't seem like it'll have much impact. (depends what "fast" vs "slow" means - are we talking about milliseconds vs a second or two, or startup times so horrendous they cripple your devs' ability to iterate and tests?)

We essentially run in a serverless environment (App Engine), so fast startup does matter to avoid some unlucky users hitting the cold start.

Re: Go + Services = One Goliath Project

#245

Earlier quoted context omitted.

I don't necessarily disagree that not everything needs to be optimized for performance, but I would just argue that the use cases for Typescript are far more niche than the use cases for C++. There's more to software than just web stuff

Most stuff is web stuff now. And I’m not talking about front end, we do a lot of back end work in TypeScript because node is lighter than the JVM which makes it a better choice for lambdas. I’d say it also has more sophisticated static typing than Java or C++, while also allowing dynamic typing in the few cases where it is convenient. Having the front and back end written in the same language also reduces impedance b…

Most stuff is not web now. There is software in everything everywhere not just web sites.

Niche does not mean "stuff I don't personally use at my job", but that is the only definition under which Typecript is not niche and c++ is. C++ in 2019 had the 4th most job listings according to Indeed. Calling that a niche is absurd especially in comparison to Typescript.

Re: Go + Services = One Goliath Project

#246

Unpopular opinion, writing Go is faster than Python. With the compiler, strong typing, and no versioning hell, I'm much more productive in Go. Whenever I use python I run into problems with versions and dependencies. And the whole community just tells me to use pyenv or virtualenv and it will "fix all my issues". Only it doesn't.

The recommendation should be to use pyenv and virtualenv: pyenv for installing the Python versions you need for different projects and virtualenv for creating an isolated environment for each project. Using this setup, I almost never run into dependency issues.

I don't know much about Go. How does it avoid dependency conflicts?

Re: Go + Services = One Goliath Project

#247

We turned our monolith into a bunch of micro services almost 6 years ago to the day. For a long time I was very happy with the new pattern but over the years the weight of keeping everything updated along with the inevitable corners that fall behind and have...questionable..security due to how long they sit neglected has really left me wondering if I am happy with it after all. I would love hear some thoughts from ot…

I've found there's a happy middleground. You need medium-sized-services that still share code libraries. For many companies, this is often 7 or 8. The key is to combine like business units/features, not necessarily fragmenting at every visible code boundary. A deployed "service" can really just be several HTTP paths and/or gRPC services in one repo. You still get to keep decent separation of work, deployment, versioning, dev focus, etc with these medium sized services without sacrificing the benefits of larger, more centralized/shared reuse.

Re: Go + Services = One Goliath Project

#248

Unpopular opinion, writing Go is faster than Python. With the compiler, strong typing, and no versioning hell, I'm much more productive in Go. Whenever I use python I run into problems with versions and dependencies. And the whole community just tells me to use pyenv or virtualenv and it will "fix all my issues". Only it doesn't.

All these great things that Java fossils like myself have been telling Node and Ruby hipsters about. Of course they won't be caught dead writing in a language their parents use.

Re: Go + Services = One Goliath Project

#249

Earlier quoted context omitted.

Map and filter allow for a very concise and clear indication of the intention of the code, so it is much quicker for the reader to parse what it is doing. Edit: Also, for loops are just a way of implementing a mapping, where you have data A that you want transformed into data A*. The map is the fundamental concept here, not the for loop.

Which is more generic, the 'for' or the 'map'? I think its the 'for' because it has additional capabilities contained in the base concept, which is why I would call it more "fundamental". In fact in many languages much of filter() can be implemented in the for construct rather than its body.

There are two sorts of 'fundamental'. You are correct that the 'for' is just syntactic sugar for 'goto' which is more fundamental than map/filter in the sense that it translates into assembly/machine language, upon which all programs are built. Then you can say the silicon logic gates are even more fundamental, you can do even more things with them, etc.

The map/filter is more fundamental in a mathematical sense. If you turn a list of A turned into a list of A*, the 'mapping' is the fundamental concept, the 'for' loop is just an implementation detail. Maybe the computer did it in parallel, or in random order, or I asked you to turn a pile of towels into a folded stack of towels. The same way if I say 'want to watch a movie' - the movie the fundamental concept, whether it's digital, film, etc. is irrelevant.

Re: Go + Services = One Goliath Project

#250
post #114

Earlier quoted context omitted.

c++ is in narrow niches?!

Java killed it for general purpose use in the 90s. It’s never your first option unless you are in areas like games, graphics, some embedded work, or quantitative trading.

"All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?"
Post reply on HN