Live data from Hacker News

How Netflix uses Java

infoq.com

181–190 of 205 posts

Re: How Netflix uses Java

#181
post #57

I heard Clojure is fairly popular at Netflix as well.

Not true. Clojure use is very rare.

Good to know, thanks. I don't have insider knowledge but at least from various posts it looks like there's some healthy usage at scale, e.g. https://news.ycombinator.com/item?id=18345341, https://news.ycombinator.com/item?id=18348295

Things may have changed in the last 5 years, though.

Re: How Netflix uses Java

#182

It's too bad they are using Gradle and Intellij, used both before, went back to Maven and Eclipse. Personal preference I guess.

IntelliJ is far and away above any other IDE and is well worth the paid license imho. It's a professional tool written by and for professionals. VSCode and Eclipse have some inertia in very particular workflows/tools and a few different (valid) ways of operating, but nothing is as polished and cohesive as the JetBrains. Gradle, however, is a dumpster-fire of footguns and obtuse and non-debug-able DSLs.

gradle lets you get something custom working quickly, because it's basically a script with code you want to execute.

For small projects, it works fine, as long as the complexity doesn't grow beyond a certain point for the small project (aka, doesn't grow to a big project), and is maintained by the same person.

For a large project, i do not like gradle at all. Maven is a much better build tool, since standardization is the best thing since sliced bread.

Re: How Netflix uses Java

#183
post #159

Earlier quoted context omitted.

Absolutely! I love how fast it is and how easy it is to write stuff real fast. Not a lot of footguns, except the pointer-for-loop thing afaik. It does feel clunky and quite manual sometimes!

The whole language is a footgun..

Casual Go user here, could you elaborate?

Re: How Netflix uses Java

#184
post #105

Earlier quoted context omitted.

I assume they mean problems with dependency injection. If that's what they mean, I agree. I've seen dependency injection frameworks used in a bunch of different companies, and there are always people who consider it an essential lifesaver, like they just can't imagine working without it, and it always baffles me, because I've worked on equally large codebases that didn't use it, and it was occasionally a significant…

> "...it was occasionally a significant annoyance to pass dependencies by hand..." Your comments are confusing on whether you eschew a dependency injection framework, or eschew dependency injection as a pattern in general. If it's the former, then you are certainly free to roll your own DI rather than leveraging a library such as Spring, Quarkus, Micronaut, Guice, Dagger, or any of the others out there. I strongly do…

I think this is an example of what GP was talking about. DI is a way to manage the programming style, very common in Java, which relies on a huge amount of global mutable state. This makes testing and reasoning about code really hard. The alternative is a style which doesn't use so many global mutable variables. Whether you think of this as "not doing dependency injection" or as "doing dependency injection manually" probably depends on your personal programming journey.

Re: How Netflix uses Java

#185
post #168
post #161

Earlier quoted context omitted.

For some reason whenever I'm on my work's VPN, Apple Music lets me play 1 album and then the next time I try to start a song it will tell me I'm not logged in and I'll have to force quit and relaunch (frequently a few times) before it will let me play another album. Apple Music is the only app that has this problem.

Apple uses certificate pinning for some of its domains, which doesn't play nicely with corporate firewalls. https://support.apple.com/en-us/HT210060

Either a company block traffic or allows it.

Inconspicuously inspecting traffic to spy on people, even employees, is just bad.

I work at a company that once turned it on for GitHub.com.

All builds that pulled stuff from GitHub started to fail because all those Docker containers don't have the company's root CA trusted.

Re: How Netflix uses Java

#186
post #163

Earlier quoted context omitted.

> Another reminder that acronyms are pretty terrible for communication. Every time I onboard with a new org there’s a whole new set of acronyms to learn that’s barely faster than typing out the unabbreviated version My (cynical) take on the matter is that software engineers want to prove how smart they are to other software engineers, and they think using obscure jargon and abbreviations is a good way to do it.

I’m sure that’s some part of it. I think another part, kind of similar, is acronyms being used as a form of in-group/out-group behavior. “I know the lingo so I’m in the club. You don’t so you aren’t”

You’re saying the same thing really - the only way other software engineers will “think you’re smart” is if they get it too, thus in group out group.

Re: How Netflix uses Java

#187
post #62

Earlier quoted context omitted.

I've never used any other webstack (and I've used several, in several languages) where it was so hard to figure out why different tests pollute each other, causing subtle failures depending on the order of test execution. Sure, you could say that it's all a matter of learning the right way, but there are just a terrible amount of footguns. Debugging why something doesn't work in Spring can also be a nightmare. And th…

> "...failures depending on the order of test execution." Every time I've seen issues where the order of test execution matters, it's either been: (1) someone one writing integration tests and calling them unit tests, or (2) transaction management issues with H2 or some other embedded test database. For #1, you're going to have a bad time with any stack. For #2, transaction management with Spring Data JPA is admitted…

h2 dev here. What transaction management issues did you have?

Re: How Netflix uses Java

#188
post #115

Early on (15+ years ago) I spent a few weeks there on contract and I noticed they used Java EVERYWHERE, and not always well. They had a CS app named after a key Star Wars character that was in all likelihood a breach of the Geneva Convention. A code atrocity with the performance of a sloth on its 8th bong rip with a UX from hell.

Netflix should make a documentary about this.

Re: How Netflix uses Java

#189
post #166
post #17

Spring Boot and Spring cloud for backend & graphql for the win. ;-)

I am a big fan of Spring Boot, its one of the few frameworks that just works and let me focus 100% on solving business problems. I've tried Micronaut, Quarkus, Dropwizard, but they slow me down too much compared to just using Spring Boot. For me delivering business value is the most important metric when I am comparing frameworks. Spring Boot wins every time.

May I recommend Symfony? You get the advantages of Spring but also the nicer things of PHP :-)

Re: How Netflix uses Java

#190

Earlier quoted context omitted.

No, just no. Performance and debugging are just plain horrible. The spring team loves to force you into their automagic shit and this bean stuff is so annoying. You almost got no compile time safety in this stack. It's the bane of my existence. I'd like to know that a compiled program will run. That seems virtually impossible with java/spring boot.

What do you propose as an alternative? Something like Micronaut trades more compile time for stricter checks and faster runtime. Do you use something like that?

I really like http4k.

http4k[0] is a lightweight but fully-featured HTTP toolkit written in pure Kotlin that enables the serving and consuming of HTTP services in a functional and consistent way.

http4k consists of a lightweight core library, http4k-core, providing a base HTTP implementation and Server/Client implementations based on the JDK classes. Further servers, clients, serverless, templating, websockets capabilities are then implemented in add-on modules. http4k apps can be simply mounted into a running Server, Serverless platform, or compiled to GraalVM and run as a super-lightweight binary.

Apart the from Kotlin StdLib, http4k-core module has ZERO dependencies and weighs in at ~1mb. Add-on modules only have dependencies required for specific implementation.

[0] https://www.http4k.org/documentation/

Post reply on HN