17 ms·
How Netflix uses Java
- gamaralf 3y agoIt seems that this article should be titled "How Netflix uses JVM" (not "Java"). The article is superficial, mentions Java but seems that Groovy had a more important role there. But in the end, it really talks about JVM. It reads like a PR piece from a Oracle and Netflix partnership to promote Java. Oracle have done that before.
- madaxe_again 3y agoAh, the way they break out artwork calls explains the weird behaviour I see with my U.K. Netflix account in Portugal - English titles, Portuguese posters, regardless of language preferences.
- yurishimo 3y agoYes because you’re being served the Portugal catalog. English is simply a localization setting that can be applied to any region.
- definitelyauser 3y agoYet you tend to lose english subtitles when travelling in certain regions.
- dewey 3y agoThen this must be an edge case with UK, as within the EU you would get your "home catalog": https://europa.eu/youreurope/citizens/consumers/internet-telecoms/access-online-content-abroad/index_en.htm https://europa.eu/youreurope/citizens/consumers/internet-tel...
- dewey 3y agoHow does the artwork explain that? Wouldn't they just need to call the artwork service with your current language preference instead of the default language of your current geolocation?
- giraffe_lady 3y agoInternationalization vs localization in the wild.
- jarym 3y agoInteresting the article jumps straight from REST to GraphQL and forgets Falcor[0] - Netflix's alternative vision for federated services. For a while it looked like it might be a contender to GraphQL but it never really seemed to take off despite being simpler to adopt. [0] https://netflix.github.io/falcor/ https://netflix.github.io/falcor/
- lfkdev 3y ago`Sad Prime noises`
- dustingetz 3y agoiirc falcor predated graphql
- ppseafield 3y agoI was at the React Rally conference where Falcon was publcly announced in August of 2015. I recall that Facebook gave a GraphQL presentation right before. It seems GraphQL was first announced publicly in February 2015.
- parthdesai 3y agoNetflix themselves have moved off falcor though https://netflixtechblog.com/migrating-netflix-to-graphql-safely-8e1e4d4f1e72 https://netflixtechblog.com/migrating-netflix-to-graphql-saf...
- deleted 3y ago[deleted]
- paulbakker 3y agoFalcor is actually part of the "old" architecture described in the talk. Because it's mostly unknown and no longer used I didn't go into the details of it. Falcor was developed at the time Facebook was developing GraphQL in-house. It has similar concepts, but never took off the way GraphQL did.
- baby 3y agoProbably because most people don't want to work with Java
- ValtteriL 3y ago>Netflix observed a 20% increase of CPU usage on JDK 17 compared to JDK 8. This was mostly due to the improvements in the G1 garbage collector. Help me here, why do GC improvements cause CPU increase?
- radomir_cernoch 3y agoAlso interested! We saw basically the exact opposite. :-)
- tpm 3y agoI read it as a good thing: GC improvements -> more available memory -> more work done by the CPU. But still would be interested in more detail.
- pyeri 3y agoIt's like hiring more workers to accomplish the exact same output as before. "See, I achieved 20% growth in my targets!", some recruiter will say!
- groestl 3y agoNo, it's like improving a form to minimize the need for follow-up questions to the customer, and now seeing your workers (the same you had before) processing 20% more forms instead of waiting for responses.
- blackoil 3y agoI think this is a 20% improved utilization of CPU, earlier app was memory-bound or/and GC was consuming CPU. Now app has 20% more CPU available. It should be doing correspondingly more work. This could definitely be written clearly.
- moffkalast 3y ago> Bakker provided a retrospective of their JDK 17 upgrade that provided performance benefits, especially since they were running JDK 8 as recently as this year. Netflix observed a 20% increase of CPU usage Seems like it's exactly that, OP cropped out the relevant bit where they list it having an overall performance benefit for that extra CPU time. Otherwise it could be assumed that it just hogs more CPU to get the same result.
- dewey 3y agoIn case you are wondering what LOLOMO stands for, it's "List of List of Movies".
- oldnet 3y ago[flagged]
- stanac 3y agoHow is java being used on server side affecting your client?
- oldnet 3y agoIt's constantly sending requests from BE to FE - checking IP, checking watch time etc.
- Cthulhu_ 3y agoThat shouldn't take that much CPU tbh, but if it does, it sounds like they have some optimization to do. I wonder if it's like DRM in video games, causing a lot of overhead.
- HeckFeck 3y agoMakes sense. The most gifted coders wouldn't work in DRM and telemetry. At least I hope that's what is happening.
- oldnet 3y agoMaybe. I watch streams on youtube, twitch etc and everything is fine. However whole CPU is flying to the moon if I will watch something on netflix. Btw Chrome was pure a nightmare for CPU but Brave is better.
- robertlagrant 3y agoThat is nothing to do with Java.
- williamdclt 3y agoThat’s entirely unrelated to the backend language (and mostly unrelated to CPU usage for that matter).
- inparen 3y agoSpring Boot and Spring cloud for backend & graphql for the win. ;-)
- Cthulhu_ 3y agoSpring is a safe and reliable choice I'd say; not the most exciting, but neither code nor frameworks should be exciting, they're used to solve a problem, they shouldn't become the problem itself. GraphQL is interesting to me, I thought the clients were pretty similar across all platforms, meaning their API usage should also be similar enough to not need the flexible nature of GraphQL. But then, it allows for a lot more flexibility and decoupling - if a client needs an extra field, the API contract does not need to be updated, and not all clients need to be updated at once. Not all clients will be updated either, they will need to support 5-10+ year old clients that haven't updated yet for whichever reason.
- robertlagrant 3y agoWell, if the field is not available then new backend code will need to be written, resolvers, integrations, etc. But it does allow UIs to take less info over the wire, and eitherfewer joins need to be done or fewer performance-oriented APIs need building, as you say.
- m_0x 3y ago> not the most exciting It was exciting when J2EE was dominating.
- RamblingCTO 3y agoNo, 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.
- didntcheck 3y ago
- deleted 3y ago[deleted]
- agilob 3y agoIs this the talk? Looks like this is it https://www.youtube.com/watch?v=5dpLVvRpPPs https://www.youtube.com/watch?v=5dpLVvRpPPs
- edpichler 3y agoApparently, it is.
- paulbakker 3y agoThe an older version of the same talk. Things have moved a bit since, Java 21 and such, but mostly the same.
- yayitswei 3y agoI heard Clojure is fairly popular at Netflix as well.
- jvican 3y agoNot true. Clojure use is very rare.
- technion 3y agoI think this should be assumed for any "x company uses y uncommon language heavily" argument that you read online.
- yayitswei 3y agoGood 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=18345341, https://news.ycombinator.com/item?id=18348295 https://news.ycombinator.com/item?id=18348295 Things may have changed in the last 5 years, though.
- smrtinsert 3y agoNot surprised about Rx. Rx is great at the UI layer imho, or anything with streams. For microservices, I don't see how it would have ever fit, since microservices should be as simple as possible doing just one thing.
- yCombLinks 3y agoNetflix created RXjava
- smrtinsert 3y agocreated or ported? I thought it was created elsewhere.
- krooj 3y agoThe concepts are ported from other actor-based systems, like Akka.
- leosanchez 3y agoRX.Net was the original I think for .NET ? I might be wrong
- yCombLinks 3y agoRight, RX was first created by Microsoft. Netflix implemented it in java.
- edejong 3y agoInteresting, no mention of Scala at all. Did Netflix say goodbye to Scala altogether?
- paulbakker 3y agoWe never really used it, aside from some niche use cases. It’s always been Java primarily.
- phendrenad2 3y agoInteresting. At one point it was fairly well "known" that Netflix used Scala. They presented at Scala conferences and had lots of open roles mentioning Scala. And Scala fans used Netflix as an example, claiming that they used Scala for recommendations, APIs, etc. But maybe it was all a psyop.
- rickette 3y agoYou're probably confusing twitter with netflix, the former is/was a scala shop.
- geodel 3y agoThis seems entirely unsurprising/standard Java setup. Perhaps it is proximity to Hollywood that some glamor is rubbed off on bog standard enterprise tech stack of Netflix.
- yafetn 3y agoNetflix’s DGS framework for GraphQL is nice to work with but we’ve been frustrated with some prioritization choices by the team. For instance, if you’re using Kotlin, it’s impossible to define and pass scalars to the latest version of the client. There’s a year-old issue highlighting this problem that’s been ignored it seems. https://github.com/Netflix/dgs-codegen/issues/455 https://github.com/Netflix/dgs-codegen/issues/455
- coding123 3y agoEvery company that went down the grpc route will be doing hacks for the next 10 years until they eventually get rid of it.
- kuratkull 3y agoPlease provide a comprehensive substantiation for you comment.
- dlhavema 3y agoMost of the postings for backend positions at Netflix I've seen call out nodejs. Can I assume they do both? Is one legacy and the other newer stuff, or are they more complimentary? Anyone on in the inside know?
- nameless912 3y agoThings are certainly more of a blend now than what's presented in this presentation, but the presenter is a big Java platform guy here. I would say ~70% of the services I interact with on a day to day basis are Java, another 20% in Node, and then the last 10% is a hodgepodge of Python, Go, and more esoteric stuff. It varies from team to team; the "Studio" organization that supports creating Netflix content does lots of nodeJS due to the perception that it's faster to iterate on a UI and API together if they're both in the same language. On my team, we're very close to 50/50 due to managing a bunch of backend, business process type systems (Java), and a very complex UI (with a NodeJS backing service to provide a graphql query layer). Regardless, the tooling is really quite good, so interacting with a Node service is roughly identical to interacting with a Java service is roughly identical to interacting with anything else. We lean into code generation for clients pretty heavily, so graphQL is a good fit, but gRPC and Swagger are still used pretty frequently.
- dlhavema 3y agoThanks for responding. That's good insight
- deleted 3y ago[deleted]
- talent_deprived 3y agoWhen they say "applications" do they mean stuff with more meat than microservices? If they're mostly microservices, 2800 seems low to me for someone with the recognition factor of Netflix.
- talent_deprived 3y agoIt's too bad they are using Gradle and Intellij, used both before, went back to Maven and Eclipse. Personal preference I guess.
- ryanianian 3y agoIntelliJ 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.
- chii 3y agogradle 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.
- zeruch 3y agoEarly 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.
- dt3ft 3y agoNetflix should make a documentary about this.
- Tim25659 3y agoHa..Ha.Ha
- Arrath 3y agoEvocative description there, bravo
- civilitty 3y agoIt's so evocative that I don't even care about Netflix or Java anymore. I just want to know where I can buy a bong ripping sloth [1] and whether they're legal in California. [1] https://imgur.com/a/S3NVS16 https://imgur.com/a/S3NVS16
- sillywalk 3y ago"A code atrocity with the performance of a sloth on its 8th bong rip with a UX from hell." Sounds like Apple Music.