Earlier quoted context omitted.
My Java is rusty, does Java provide things like placement new that make using arenas ergonomic?
no, you cannot control allocation via regular means. What i meant is that you make pooling in java, and that effectively makes it work like an arena allocator (in that you end up setting a bit/boolean flag to allocate/deallocate an object). But the pooling can be constrained to just one portion of your app - the hot loop or the bit that needs the low latency. The remaining code - loading resources at startup for exam…
Don’t call it a comeback: Java is still champ
551–557 of 557 posts
Re: Don’t call it a comeback: Java is still champ
#552Trouble with java is that it does not scale up or down in terms of ram. Minimum RAM for a sever doing something normal over tcp is measured in gigabytes. Big servers > 16gb get difficult to manage at runtime. You have to scale with more VMs. You can write useful C servers that are very small, especially if you compile with musl. And run the same code for 1000kcc (not a typo) When you have big arrays of memory storing…
> Trouble with java is that it does not scale up or down in terms of ram. > When you have big arrays of memory storing everything as Objects/pointers gets messy and inefficient. But any big heap is hard to manage and keep response times consistently low. Java can handle very large, TB-sized heaps (under normal circunstances, about 52TB). But when you're dealing with TB-sized heaps, anything is slow - including progra…
While a .class file will technically run on any jvm. A java application is usually more complicated and Uber jars don't work if you have stuff in meta-inf e.g. Spring.
I am primarily a java dev and I have no tools or own code that run with java -jar some.jar.
Re: Don’t call it a comeback: Java is still champ
#553Earlier quoted context omitted.
> Trouble with java is that it does not scale up or down in terms of ram. > When you have big arrays of memory storing everything as Objects/pointers gets messy and inefficient. But any big heap is hard to manage and keep response times consistently low. Java can handle very large, TB-sized heaps (under normal circunstances, about 52TB). But when you're dealing with TB-sized heaps, anything is slow - including progra…
When I say move across systems, I mean from vm to vm not from lin to win. While a .class file will technically run on any jvm. A java application is usually more complicated and Uber jars don't work if you have stuff in meta-inf e.g. Spring. I am primarily a java dev and I have no tools or own code that run with java -jar some.jar.
Not really, JDK 11 and further finally started removing deprecated implementation details, so you can't really run any class on any JVM - you ideally lockstep development and production JDK versions.
> A java application is usually more complicated and Uber jars don't work if you have stuff in meta-inf e.g. Spring.
This is more about the java application being complicated, and messing up with JAR metadata, not about stuff "not working"; in my experience, uber-jars built by Spring Boot "just work".
> I am primarily a java dev and I have no tools or own code that run with java -jar some.jar.
Most of my deployments were fleets of Spring Boot based services deployed with Containers with `RUN java -jar /app/my-project-name-1.0-RELEASE.jar`
Re: Don’t call it a comeback: Java is still champ
#554Earlier quoted context omitted.
You will also find Clojure just as refreshing / enlightening. My company uses Elixir but I’ve also done a lot of Clojure, give it a shot if you haven’t.
Seconded. Clojure was a real turning point for me but be warned - once you have the veil lifted re OOP you'll not want to work with Java/C# ever again.
Sadly I don't see any chance that I'm going to use it for real job in the future. The market is too narrow for this language. Hard fact that If I don't use it for the job, I cannot reach to its full potential. Guess it should stay as my hobby language for now.
Re: Don’t call it a comeback: Java is still champ
#555Java was actually not bad for me in class when learning software design and data structures, but soul-crushing to work with in the real world. Mindless, unnecessary use of getters/setters, interfaces, and AbstractFactoryImpls. Hiding almost every piece of functionality behind 10+ layers of indirection. Dependency Injection with Spring. They all make it feel like Java draws folks who actually __enjoy__ writing bloated…
I don't think this is an issue with Java, it's an issue with Spring. I'm baffled by the popularity of Spring.
Re: Don’t call it a comeback: Java is still champ
#556Earlier quoted context omitted.
How do you share data between machines without something like redis?
well, trivially - really. Machines can communicate via TCP and UDP, pretty much the same way you communicate with a web server - but more efficiently (than http). There are tons of protocols/frameworks for replicated and distributed maps which are significantly more effective than redis, esp when hitting the local one. Writing one such yourself, is sort of, rite of passage. While redis is well understood and (relativ…