14 ms·
Minor rant: The trouble with all these lovely Apache projects is their dependency on Java. If these things were written in C, Go or Rust then I'd leap at the o
by traceroute66 6y ago
Minor rant: The trouble with all these lovely Apache projects is their dependency on Java.
If these things were written in C, Go or Rust then I'd leap at the opportunity to explore them and maybe use them in production.
But Java dependency just brings so much baggage with it. Its all well and good if you've got a Java pro or two on your team. But if you don't, you usually end up spending hours and days troubleshooting obscure JVM problems or somesuch.
- ktpsns 6y agoI second this so much! I have the feeling that the ASF tries to be so enterprisy with Java. I have no idea. (Note that there are a lot of very high quality Apache java projects.)
- pjmlp 6y agoOne of their best features.
- jaaron 6y agoYou have to go back almost 20 years to understand the relationship between the ASF and the Java community. Java at the time was positioned to be a core web technology (originally as applets, then as as backend tech via J2EE) and Apache was interested in ensuring the web ecosystem as a whole wasn't locked up in proprietary tech. The ASF was rather influential in working with Sun at the time to foster was eventually became a vibrant open source community. I know the ASF isn't as trendy these days, but that's never really bothered those of us who volunteer. The focus has always been about a stable, open source ecosystem, primarily, but not exclusively for the internet and its underlying infrastructure. The goal is measured in decades. It wasn't about being "enterprisey" or anything like that. The ASF as a foundation doesn't really care about the language or tech stack. Being a more mature non-profit, many corporations have found it easier to interface with the ASF than many other open source organizations out there, which does lend itself to seeing a lot of enterprisey donations.
- buryat 6y agojava is very easy to troubleshoot compared to c, go, and rust
- traceroute66 6y ago> java is very easy to troubleshoot compared to c, go, and rust All the worst and most time-consuming troubleshooting experiences of my life have involved Java. Whether staring at pages of obscure stacktraces that the JVM decided to vomit all over my screen, or hours on end with Oracle tech support troubleshooting why Java decided to throw a tantrum (followed by editing obscure Java XML config files). These days I just stay well away from Java.
- nisa 6y agowell yes... it's a learning curve and it takes a while but if you are familiar with the jvm and xml and to some degree spring-framework and reflection it's usally pretty easy to find a root-cause - you also have great tooling like async-profiler or just sending `kill -3 <pid>` to get a stacktrace. At least you've got a hill to climb upon instead of an empty field.
- threeseed 6y agoYou know that none of that has to do with Java itself. It's the app whose stack traces you are looking at. And the app that decided to use XML config files.
- johnisgood 6y agoThank you for pointing this out. I read the title and it sounded nice, but if Java is anywhere near close to it, then no thanks. Thank you, you saved me from wasting time. :)
- chuckSu 6y agoWhile agree that some of the Apache projects would be better written in something other than Java but the comment about spending hours debugging obscure Jvm issues is huge exaggeration
- kinow 6y agoYou can check if there is a project like that in the incubator, or suggest one if you have an idea or some code to donate. Most new projects are related to existing ASF projects, or use ASF libraries, or are created by someone already in the ASF that maybe use/prefer Java. But there is no requirement on a project being Java. See Airflow, Arrow, Log4net, httpd... it's just a question of people creating the proposals that must show a possible community of users/devs to use/support it.
- geodel 6y agoWell Apache and Java are like GUI and JS. I'd be shocked if most of collaboration, productivity, editing tools etc is not JS/Electron today. Not saying that either is good, but it is just fact of life.
- raz32dust 6y agoWhat baggage is specific to Java? You'd want some experts for the language your critical services are written in, regardless of it being java or C or Rust or whatever. Likewise, a java shop wouldn't want to use a critical service written in C.
- klodolph 6y agoFor Java you need people in operations who are good at things like JVM tuning working. Just a fact of life, speaking from experience working on teams that do that. Languages like C and Rust do not have any equivalent to JVM tuning.
- pjmlp 6y agoApparently you haven't read the compiler man pages for optimization flags.
- iameli 6y agoBut that's all compile-time. Someone else very smart can do that and give me an optimized binary. JVM tuning needs to be performed by the end user.
- shock 6y agoWell, it's a trade-off. If someone compiled the C++ app for your architecture, sure – if not, you need to figure out how to compile it and depending on the compiler and set of headers you have installed, it's not always easy. When I say, not always easy I'm being generous, there have been cases when the function signature was different between the sets of headers the author had and what I had... In Java's case if you have all the class files, all you need is the JVM for your architecture. You don't need the program's author to compile it for your architecture. And finally, JVM tuning does not need to be performed by the user, but can be performed by the user. The most frequent tuning needed to be done by the user was the maximum memory that the JVM could allocate, but that hasn't been needed for a long time (since Java 8, I think). Now the JVM, by default, has the sensible behavior to allocate as much memory as the OS will let it, when asked by the application.
- shock 6y agoIt would be useful to you to recognize that you are letting an emotional reaction stopping you from using useful technology. I understand that Java makes you uncomfortable, but it is a powerful and stable language and you're missing out by avoiding it. It would take much more time to implement a similar project in C, and it would likely have lower stability. Yes, implementing it in C would use a lot less memory and if that's what you're optimizing for going with something else than Java is a wise choice most of the time. Most technology is useful, depending on what you're optimizing for. I urge you not to optimize for being comfortable.
- breakfastduck 6y agoIt's not an emotional reaction they were expressing at all - they even explicitly stated it's because of the need to bring in someone savvy with Java and the JVM to be able to support it. Sometimes there aren't the resources.
- shock 6y agoSomeone not having an emotional reaction would not use expressions like "All the worst and most time-consuming troubleshooting experiences of my life have involved Java" and "the JVM decided to vomit all over my screen". See sibling comment: https://news.ycombinator.com/item?id=24899595 https://news.ycombinator.com/item?id=24899595
- breakfastduck 6y ago"All the worst and most time-consuming troubleshooting experiences of my life have involved Java" is simply a statement. All the worst and most time-consuming troubleshooting experiences of my life have involved dealing with a legacy VB6 app with a truly terrible MSSQL database structure - that's not an emotional statement, it's a fact.
- shock 6y ago> All the worst and most time-consuming troubleshooting experiences of my life have involved dealing with a legacy VB6 app with a truly terrible MSSQL database structure Do you feel any powerful emotion when you think about that experience? Would you be indifferent if you would need to do it again?
- jayd16 6y agoI don't think Java adds any more things you must tune so much as it adds a lot of things you can tune. You can just treat these appliances as a black box if you can't be bothered to learn the tooling.
- Out_of_Characte 6y agoUntill its not, Then I have a problem because I dont understand java
- shock 6y agoYou have a problem with whatever you don't understand. These days, you also have a problem if you don't understand the germ theory of disease :)
- UMetaGOMS 6y agoCannot upvote this enough. I'm sure a frequent Java user will come along to tell me how easy it is - but at this point I'm not interested in delving into their world. If a new application I'm looking at is a single binary I can drop on my system (a la Go/Rust) then great - otherwise it has to be something I really need for me to not just resort to "whatever is in the package manager, or find a different solution".
- francislavoie 6y agoI avoid ElasticSearch for that reason.
- deleted 6y ago[deleted]
- avinassh 6y agoWhich alternative you use/prefer instead?
- francislavoie 6y agoI'm still trying to figure that out honestly, but https://www.meilisearch.com/ https://www.meilisearch.com/ is pretty sweet. Doesn't cover everything ES can do obviously, but it covers a big one.
- a_imho 6y agoIf you use Docker or similar for deployment you can have ~static executables ootb.
- pjmlp 6y agoThat exactly what I like from Apache projects, one step at a time to make C less relevant.
- StreamBright 6y agoThis is not the most serious problem, by far.
- rodgerd 6y agoIf JVM optimization is "too hard" then you're going to have a bad time trying to run a distributed computing system.
- x87678r 6y agoTrue but if it was written in C it never be completed and would likely crash all the time. :) Just be thankful they're not Python.
- zmmmmm 6y agoFunny how I'm the complete opposite. For me, seeing it is written in Java is a big plus. As soon as I see Java I know it's going to have a whole set of properties that will make it highly manageable to deploy and run. And when they go wrong I have a lot of hooks and tools to understand and resolve the issue that are completely unavailable to me with native applications. You apply the pejorative "baggage" to these as if they are valueless but sometimes you just have to develop enough experience before the utility of things becomes apparent. (Writing an application in Java however ... I would go straight for a JVM language like Kotlin/Groovy/Scala)
- vips7L 6y agoPersonally I never want to touch Scala again. Implicit and operator overloading hell. Let alone the shit show that is sbt and c++ compile times from scalac.
- zmmmmm 6y agoYes, I've been bitten by that too! Ironically it pushed me back towards Groovy because I found I was constantly hitting unexpected performance bottlenecks by implicit conversions that unexpectedly jumped in and executed things I didn't even realise were happening. Groovy was completely unelegant but pragmatic option that actually did what I expected most of the time.
- vips7L 6y agoI'm more of a Java man myself. I like groovy though, it feels like a more functional python. I could see myself using it just for scripts.
- ebruchez 6y agoNot sure what to say to that, except that it might have been a long time ago, or with some very specific libraries or teams? If it was years ago, then I can say that things have changed a lot since the last time you touched Scala, and in the right direction. Most of the criticisms from, say, 5 years ago, are being addressed. For example, if by "operator overloading" you mean "symbolic method names", then those have largely fallen out of fashion. sbt has seen huge improvements (some people dislike it, some people like it, but it's one of the most powerful build tools out there). Compilation times also have improved. As far as I am concerned, it is my favorite language, and there is so much going for it: great tooling, the upcoming 3 version, binary compatibility improvements, rock-solid JavaScript compilation, native compilation under development, and, of course, all the benefits from a language with one of the most powerful types systems around.
- chrisjc 6y agoOne of the most important and valuable (at least to me) things about the Java and the JVM is its ecosystem. And Apache is a part of that ecosystem. BTW a lot of the Apache projects aren't even Java or depend on the JVM. > If these things were written in C, Go or Rust... Do these languages have similar ecosystems?
- francislavoie 6y agoGo and Rust have very good package management (Go's kinda sucked but go modules is helping a lot), so yes. They both work much nicer than the occasions I've used maven etc.
- chrisjc 6y agoI think that package management is very different from an ecosystem. I'm somewhat aware of rust and gos' package managers, but I'm really curious about if they have ecosystems similar to Apache. I wouldn't be too surprise if the Apache ecosystem embraces more and more go and rust projects as time goes on...
- jwr 6y agoUnless you are happily using a JVM-hosted language of course (Clojure in my case), in which case it is a huge advantage. I can use this immediately and easily in production.
- jjtheblunt 6y agoI wonder if folks are more averse to Maven than Java
- shock 6y agoI don't see a reason for users to be aware of Maven, similarly when you get a C, Go, app, you are not aware of the build tool that was used to create it.
- lmm 6y agoJava is pretty much the only language I'd want to see low-level libraries written in. Go libraries can only be used from Go, Rust libraries can only be used from Rust, and any nontrivial C library contains an arbitrary code execution vulnerability when built with a newer compiler. Java is a lowest-common-denominator language but it's memory-safe, cross-platform (in a way that C# isn't really yet), and there's a decent range of languages that you can run on the JVM and use Java libraries from.
- francislavoie 6y ago> Go libraries can only be used from Go https://github.com/draffensperger/go-interlang https://github.com/draffensperger/go-interlang > Rust libraries can only be used from Rust https://rust-embedded.github.io/book/interoperability/rust-with-c.html https://rust-embedded.github.io/book/interoperability/rust-w... And any language that supports an FFI interface can call rust code. For example you can write a rust lib and call it from PHP using it's recently released FFI https://www.php.net/manual/en/book.ffi.php https://www.php.net/manual/en/book.ffi.php, e.g. https://dev.to/verkkokauppacom/introduction-to-php-ffi-po3 https://dev.to/verkkokauppacom/introduction-to-php-ffi-po3
- lmm 6y agoIf a Go or Rust library takes the time to offer a C-compatible interface (most don't), or you add one yourself, then you can invoke it via the anaemic, unsafe C ABI - no first-class objects, functions, or sum types, raw pointers everywhere. At that point it might as well be a C library, because any program that uses it is still inherently memory-unsafe.
- FridgeSeal 6y agoI agree completely. I love using things written in Rust, because if nothing else I know it's going to be resource efficient and the deployment will be nice and easy. Java applications: I hope there's enough spare memory, I hope the setup instructions aren't littered with "set this obscure JVM config in some obscure way, that isn't the application config, but we won't tell you how/where, you've just got to figure that one out"
- shmerl 6y agoI also wonder why are they using Java? Filesystems should be written in something like Rust. Using languages like Java for systems programming always looked bizarre to me.
- ir123 6y agoCurious, what obscure JVM problems have you encountered? My experience with Java has been that it is easy to get started and work with a codebase.
- lutoma 6y agoAlso, every single Java application I've ever used has used an entirely unreasonable amount of memory for the job it's supposed to do. I'm sure you can write things in Java that are lightweight on resources, but I've never seen it.