5 ms·
Something simple as that should not require tons of RAM and CPU because of Java. Writing it in natively compiled language would produce a lean product - Rust, G
by xvilka 3y ago
Something simple as that should not require tons of RAM and CPU because of Java. Writing it in natively compiled language would produce a lean product - Rust, Go, etc.
- RhodesianHunter 3y agoJava frequently outperforms Go and Rust. It has a far more mature GC than Go and libraries that have no parallel in either (netty, caffeine). Almost every company doing real time/stream processing at the scale of TB/hour or greater is doing so by relying on Apache Kafka, written in Java and Scala. I've personally been a member of a team that wrote several services (network collectors, observability processing) in Go/Rust/JVM (we preferred Kotlin) in parallel for performance comparisons and found the JVM services to show much better throughput. Your perspective seems quite outdated. Possibly from before Go or Rust even existed?
- xvilka 3y agoRegarding Kafka (and other Apache Java tools, e.g. Hadoop) - they are often slower[1] than standard Unix tools. [1] https://adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html https://adamdrake.com/command-line-tools-can-be-235x-faster-...
- xmcqdpt2 3y ago1. Kafka is not really related to Hadoop in any way? Standard unix tools are also way faster than postgres, but we don't use databases or Kafka because of their batch processing performance. 2. Hadoop is used for batch processing and it can be kind of slow, that's true. However the whole point of Hadoop is that you can operate on actually big data, not the 2GB database in the blog post. If it fits on one HDD then you don't need Hadoop and it will just slow you down!
- manigandham 3y agoThat has nothing to do with Kafka, or Java as a language. Distributed big data processing systems need big data to actually be useful. Small data that fits on a single machine can also be processed on a single machine, which will always be faster than using a cluster with orchestration, distribution and network overhead.
- RhodesianHunter 3y agoI don't think you know what Apache is.
- Capricorn2481 3y agoNot a Rust user, but I would like a citation on any context in which Java outperforms Rust
- RhodesianHunter 3y agoAny long lived process with constant allocation of many small or medium sized objects where your primary performance concern is throughput (such as stream processing).
- kitd 3y agoWriting it in natively compiled language would produce a lean product - Rust, Go, etc. ... Java? You can natively compile Java these days.
- xvilka 3y agoI tried with non-trivial program, e.g. Ghidra (without the GUI part, obviously), but it turned out to be impossible due to many changes necessary in the codebase. Thus, it's not entirely true.
- pjmlp 3y agoIt is a matter of tooling, https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc https://www.aicas.com/wp/products-services/jamaicavm/ https://www.aicas.com/wp/products-services/jamaicavm/ https://www.eclipse.org/openj9/docs/xaot/ https://www.eclipse.org/openj9/docs/xaot/ https://source.android.com/docs/core/runtime/jit-compiler https://source.android.com/docs/core/runtime/jit-compiler
- pjmlp 3y agoWe can since around 2000, the big difference these days is that is now free beer, instead of commercial JDKs like Excelsior JET.
- agilob 3y agoHere's an alternative written in Go. It can't even handle biannual time changes correctly, so I had to rewrite microservice project to Java with Quartz :) https://github.com/jasonlvhit/gocron/issues/44 https://github.com/jasonlvhit/gocron/issues/44