Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Eldred
Feb 19, 2004
Weight gain is impossible.

Michaellaneous posted:

so its really more for java? alright thar explain it


doesnt explain the fact why does idiots are using java for their microservices deployed in kubernetes. why not go or python or literakky anything else

Are they using Micronaut? I haven't delved under the hood too much but it looks near identical to Python/Node in terms of time to get a service off the ground

Adbot
ADBOT LOVES YOU

ulmont
Sep 15, 2010

IF I EVER MISS VOTING IN AN ELECTION (EVEN AMERICAN IDOL) ,OR HAVE UNPAID PARKING TICKETS, PLEASE TAKE AWAY MY FRANCHISE

raminasi posted:

what’s wrong with java

Many things, but most of them are just remnants of it being 25 years old. It’s got warts and really C# does most of the things Java does better.

On the other hand, many less footguns than C or JS.

Michaellaneous
Oct 30, 2013

Twerk from Home posted:

Whats your ratio of AWS spending to developer salaries?

Java (well, more like Kotlin), C#, Go strike a nice balance of human-usable languages that still are performant enough to handle pretty heavy load on a reasonable amount of compute. Python performance is still comparatively bad, and there's some situations where that matters.

If you're at the absolute biggest of load, you get poo poo like my friend who is part of a 20+ engineer team at Amazon who just rewrites perfectly good, working Java code in C++ in order to save money on buying RAM.

we actually dont use AWS because of financial data or some poo poo. i have the questionable pleasure of operating a Kaas on our VMWare servers across 3 datacenters.

if you want to know the ration of hardware/licensing cost to developer tho, then it doesnt look too good


Eldred posted:

Are they using Micronaut? I haven't delved under the hood too much but it looks near identical to Python/Node in terms of time to get a service off the ground


no they are absolute trash at what they are doing. its all just hacked together and barebones java with technology stack after technology stack thrown on top.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

mystes posted:

The Something Awful Forums > Discussion > Serious Hardware / Software Crap > YOSPOS: just people with different definitions talking at each other without actually communicating

Jerry Bindle
May 16, 2003
the main problem with java is a generation of programmers being taught car extends vehicle, the language is very good and has a manual written by language semantics experts that tell you what the language will do.

Michaellaneous
Oct 30, 2013

:iiaca:

raminasi
Jan 25, 2005

a last drink with no ice

ulmont posted:

Many things, but most of them are just remnants of it being 25 years old. It’s got warts and really C# does most of the things Java does better.

On the other hand, many less footguns than C or JS.

what’s wrong with java that python or go does better

MononcQc
May 29, 2007

raminasi posted:

what’s wrong with java that python or go does better

ability to get votes on hn for one

elcannon
Jun 24, 2009
Is running java in a container environment still something that sucks? I was on a team doing a big microservices docker mess a few years ago and I remember the lead saying they chose node.js over java because "the JVM is too big and runs slow inside of containers" or something like that. I know I've run elasticsearch inside of containers recently and it fell over a few times but I dont know if it was an issue with the JVM or if it was just elasticsearch.

Share Bear
Apr 27, 2004

raminasi posted:

what’s wrong with java that python or go does better

its easier to poo poo something out without tooling/ide in python than java for one

most good java developers i know lean on intellij very hard , its really good for putting together a java project and debugging

theres just something clunky about java on its own which feels bad to write. verboseness?

Share Bear
Apr 27, 2004

elcannon posted:

Is running java in a container environment still something that sucks? I was on a team doing a big microservices docker mess a few years ago and I remember the lead saying they chose node.js over java because "the JVM is too big and runs slow inside of containers" or something like that. I know I've run elasticsearch inside of containers recently and it fell over a few times but I dont know if it was an issue with the JVM or if it was just elasticsearch.

they fixed this in 11, the jvm is now more container aware

ah, not 11, 10: https://www.docker.com/blog/improved-docker-container-integration-with-java-10/

Share Bear fucked around with this message at 19:11 on Aug 6, 2020

Share Bear
Apr 27, 2004

also oracle recently changed the jvm license for anything after 8 so you gotta get an openjdk based jvm if you dont wanna get sued for licensing fees

https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244

Share Bear fucked around with this message at 19:13 on Aug 6, 2020

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Share Bear posted:

its easier to poo poo something out without tooling/ide in python than java for one

most good java developers i know lean on intellij very hard , its really good for putting together a java project and debugging

theres just something clunky about java on its own which feels bad to write. verboseness?

python has the best footgun of all tho: the ability to ruin your os

Progressive JPEG
Feb 19, 2003

do not touch oracle jre, use openjdk or derivatives


the issue with jdk 8 is that it doesn't honor cpu/memory cgroups ("container aware" as share bear said), so for example you could have a machine with 128 gigs of ram where your container has been allocated 2 gigs, and the jdk/gc will behave as if it has 128 gigs instead of 2 gigs. similar effect with cpu but with fewer consequences for getting it wrong. BUT the workaround on jdk 8 is to enable container awareness via the "-XX:+UnlockExperimentalVMOptions" flag. meanwhile on jdk 11 it's enabled by default

but outside of that i'm not aware of any particular performance issues of using java in a container, since from the kernel's perspective the container is just a pid that's also had some roadblocks set up for it. but it is theoretically wasteful since you've got a jvm sandbox wrapped in a container sandbox, and each container has some duplicated jvm overhead (but not enough to matter for most people tbh)

Progressive JPEG
Feb 19, 2003

the only feasible way to consistently distribute python code is via a docker image

Sapozhnik
Jan 2, 2005

Nap Ghost
You really have to go out of your way to deploy Oracle JDK on your servers you know. It's not really something that you can just end up doing by accident.

I think they don't even let you download the Oracle JDK any more unless you register an account?

Progressive JPEG
Feb 19, 2003

speaking of java, i've gotten intellij in some state where the java project view shows all the java files and test files in combined per-package lists rather than under separate directories

no idea what i pressed to get it to do that but it's actually pretty convenient now that i've gotten accustomed to it

Share Bear
Apr 27, 2004

Boiled Water posted:

python has the best footgun of all tho: the ability to ruin your os

this is true in fedora i am not sure about other oses though

everyone's using docker and/or conda images if they're trying to approach anything close to reproducible apps these days

i still prefer python but it's because i have a better mental model of it

also who cares about what shits out these business case excel files/json :justship:

Gaukler
Oct 9, 2012


Share Bear posted:

this is true in fedora i am not sure about other oses though

everyone's using docker and/or conda images if they're trying to approach anything close to reproducible apps these days

i still prefer python but it's because i have a better mental model of it

also who cares about what shits out these business case excel files/json :justship:

I love that, as an industry, we decided reproducibility is so hard that we better just schlep around entire filesystems

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Sapozhnik posted:

You really have to go out of your way to deploy Oracle JDK on your servers you know. It's not really something that you can just end up doing by accident.

I think they don't even let you download the Oracle JDK any more unless you register an account?

why do you need the jdk on your servers

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


fart simpson posted:

why do you need the jdk on your servers

it's the same for JRE, you need a license for it too

and IIRC it's still called OpenJDK even for the runtime

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

fart simpson posted:

why do you need the jdk on your servers

they stopped distributing just jres a while back. you’re supposed to bundle a minimal version of the jre with your application.

there’s a jpackage tool included now that builds all the way to deb, rpm, msi, or dmg

but really, who’s deploying with anything but docker

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Michaellaneous posted:

threads

e: jvm also eats resources and is poo poo in a microservice enviornment

ee: but mainly threads

what do you mean threads?

reactive web/grpc/whatever has been a thing for ages now.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
ah you prefer a single-threaded environment? or at least one blocked by a global mutex perhaps

Sapozhnik
Jan 2, 2005

Nap Ghost
I prefer async/await





who needs useful stack traces anyway

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
if only they were available on the jvm somehow

abraham linksys
Sep 6, 2010

:darksouls:
love to use kotlin coroutines with the wide array of libraries that support them, such as, uhhhhhhhhhhhhhhhhhhhhhh

(i guess there's got to at least be android stuff that uses them right??)

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

abraham linksys posted:

love to use kotlin coroutines with the wide array of libraries that support them, such as, uhhhhhhhhhhhhhhhhhhhhhh

(i guess there's got to at least be android stuff that uses them right??)

you can use any reactive stream (reactor, rxjava) or completablefuture in coroutines, and convert both ways.

the reactive stuff even propagates the reactor/rxjava context across coroutines.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
its literally as easy as

code:

suspend fun reactorExample() {
  val x = someReactiveFunction()
    .map { it.toString }
    .await() // <- this is a suspending extension function

  if (x == "yospos") {
    print("gently caress you")
  }
}

suspend fun completableFutureExample() {
  val z = someCompletableFuture()
    .await() // <- this is a suspending extension function

  if (x == "yospos") {
    print("bitch")
  }
}

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
you can even do it the other way, using the .future() function to create completable futures and .mono {} to create reactor stuff etc.

it's exactly how the entire spring ecosystem does all their reactive stuff on both plain java and kotlin, but adding all sorts of kotlin extensions like a reactive DSL for rest endpoints etc

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
they even work using quarkus+graalvm where you can do compile time configuration and bytecode recording (so complex graphs of objects can be created during the compile instead of startup) then compile to native code and not even need the jvm.

FlapYoJacks
Feb 12, 2009

fart simpson posted:

i would simply download the precompiled binary

Not really an option for a lot of architectures in a cross-compiled environment.

Phobeste posted:

why do you need the jdk cross compiled (as opposed to the jre)

Whoops! Yeah, the JRE ALSO requires those dependencies!

Just look at all those beautiful dependencies. :allears:

https://gitlab.com/buildroot.org/buildroot/-/blob/master/package/openjdk/openjdk.mk

quote:


OPENJDK_DEPENDENCIES = \
host-gawk \
host-openjdk-bin \
host-pkgconf \
host-zip \
host-zlib \
alsa-lib \
cups \
fontconfig \
giflib \
jpeg \
lcms2 \
libpng \
libusb \
xlib_libXrandr \
xlib_libXrender \
xlib_libXt \
xlib_libXtst \
zlib

And yes, OpenJDK also requires OpenJDK to cross-compile.

What's also awful is that the need for alsa, cups, and x11 was ADDED for OpenJDK 11. Before 11, they were optional. This means for my testing build, which used RiseV2G, I have to have a post-build script that disables all the cups services.

A minimum build with OpenJDK is around 150~MB, a minimum build with Python3 is less than 30. :v:

FlapYoJacks fucked around with this message at 18:21 on Aug 7, 2020

abraham linksys
Sep 6, 2010

:darksouls:

CRIP EATIN BREAD posted:

its literally as easy as

hm... appears that i've been owned

CRIP EATIN BREAD posted:

it's exactly how the entire spring ecosystem does all their reactive stuff on both plain java and kotlin, but adding all sorts of kotlin extensions like a reactive DSL for rest endpoints etc

is there a quick docs page you can point me to on what that kotlin reactive DSL looks like? i'm using a small framework called javalin since i got scared away from spring boot by the spring docs (which are extremely the kind of docs that assume you already are familiar with this ecosystem and are just trying to learn some specific new thing in it, instead of having any good overview of "what the gently caress is spring, and spring boot, and webflux, and here's the kotlin extensions for all of these things")

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
you also need gcc to cross compile gcc

mystes
May 31, 2006

What happened to the whole plan to modularize the JDK? You can't just build it without x support now or anything?

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

abraham linksys posted:

hm... appears that i've been owned


is there a quick docs page you can point me to on what that kotlin reactive DSL looks like? i'm using a small framework called javalin since i got scared away from spring boot by the spring docs (which are extremely the kind of docs that assume you already are familiar with this ecosystem and are just trying to learn some specific new thing in it, instead of having any good overview of "what the gently caress is spring, and spring boot, and webflux, and here's the kotlin extensions for all of these things")

https://spring.io/blog/2017/08/01/spring-framework-5-kotlin-apis-the-functional-way

this is old but shows you before and after

FlapYoJacks
Feb 12, 2009

mystes posted:

What happened to the whole plan to modularize the JDK? You can't just build it without x support now or anything?

You can build it without X support! There's a config option "--enable-headless-only", but X is still required to build the drat thing! Even with the option! lmao.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
also your response handlers can be suspend functions too, which is just as easy as putting "suspend" in front

mystes
May 31, 2006

ratbert90 posted:

You can build it without X support! There's a config option "--enable-headless-only", but X is still required to build the drat thing! Even with the option! lmao.
Huh, that's pretty dumb.

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

mystes posted:

Huh, that's pretty dumb.

Yeah, there's a reason why embedded devices that use Java will use OpenJDK 8 forever.

Edit:

I just compiled two minimal AARCH64 builds, one with Python 3.8.5, the other with OpenJDK 11.0.8+10 built as just the JRE.
Binaries stripped, glibc toolchain, all locales except C and en_US purged:

Python3 filesystem size: 28M
OpenJDK: 141M


OpenJDK is 5x larger. A fat stupid loving resource hog.

FlapYoJacks fucked around with this message at 19:44 on Aug 7, 2020

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply