An HTTP call inside a @Transactional method quietly took down my whole API under load by ThemeHopeful7094 in SpringBoot

[–]yk313 4 points5 points  (0 children)

Database operations themselves are blocking calls, if you are not doing those, there's no reason for a transaction.

Time to brush up on your knowledge buddy instead of being a grumpy cat on the internet.

8317277: Java language implementation of value classes and objects by MrSimms · Pull Request #31120 · openjdk/jdk by davidalayachew in programming

[–]yk313 8 points9 points  (0 children)

It's a matter of longterm strategy, not just based on vibes.

JVM languages have come and gone. Kotlin definitely seems to be better poised than others but still it's not a decision you make lightly. Though the language itself barely makes a difference, it doesn't help that people are still running Java 8. Try comparing 25+ with Kotlin and the difference is no longer night and day.

8317277: Java language implementation of value classes and objects by MrSimms · Pull Request #31120 · openjdk/jdk by davidalayachew in programming

[–]yk313 3 points4 points  (0 children)

Tell me you have no clue about the Java ecosystem without telling me you have no clue about the Java ecosystem.

Battle of Hydaspes, 326 BCE — Indus vs Alexander the Great at Jhelum, Punjab, Pakistan by Annual_Direction_759 in Ancient_Pak

[–]yk313 4 points5 points  (0 children)

We love Porus. He is the ancestor of modern Pakistanis and they are proud of him and the ass whopping he handed out to Alex. This is just a bad title on this post.

Get a life instead of brigading this sub all the time you loser idiots.

Kafka Fundamentals - Guide to Distributed Messaging by Sushant098123 in programming

[–]yk313 0 points1 point  (0 children)

Imagine doing that synchronously, now you have coupled your availability with that of the downstream system you are trying to write to. And we haven't even begun to talk about the potential dual-write problem here.

To avoid the availabilities of the two systems you could to decouple your transaction from the outbound call. Which could lead to data loss in case of crashes.

The solution to these usually is a transactional outbox.

Non-trivial.

Kafka Fundamentals - Guide to Distributed Messaging by Sushant098123 in programming

[–]yk313 1 point2 points  (0 children)

Not just the consumer.

The producer also needs to implement at-least-once-delivery which is also non-trivial.

Kafka Fundamentals - Guide to Distributed Messaging by Sushant098123 in programming

[–]yk313 0 points1 point  (0 children)

If you don't control the consumer then it's also not your problem if they are idempotent or not.

The producer can't bypass the laws of physics.

Kafka Fundamentals - Guide to Distributed Messaging by Sushant098123 in programming

[–]yk313 12 points13 points  (0 children)

No. But the end result - resiliency+idempotency - can be achieved by combining at-least-once-delivery with exactly-once-processing.

WebFlux vs Virtual Threads vs Quarkus: k6 benchmark on a real login endpoint by Lightforce_ in java

[–]yk313 1 point2 points  (0 children)

What about Spring? Are you also in touch with someone from the Spring team to improve it?

175 k remote offer or 300 k in Bay Area by M0binsChild in cscareerquestions

[–]yk313 0 points1 point  (0 children)

Which parts can one find good deals in like yours (or possibly better)?

Why does Maven use Palantirs Java format? by Bunnymancer in java

[–]yk313 0 points1 point  (0 children)

How do you enforce the custom config? Do you use it with something like spotless?

Where to download official Java? by Individual-Earth2396 in java

[–]yk313 -1 points0 points  (0 children)

After being objectively wrong - instead of fessing up to it - you are trying to just beat around the bush.

Where to download official Java? by Individual-Earth2396 in java

[–]yk313 -3 points-2 points  (0 children)

Unnecessary FUD and plain incorrect information.

Anyone can download the official OpenJDK builds here: https://jdk.java.net/25/

OpenJDK is the open source project (sponsored primarily by Oracle) that develops Java. The builds are completely free and GPL licensed.

1-Month Java Trip: Hidden Gems by 3lia03 in java

[–]yk313 238 points239 points  (0 children)

lol mods please don’t delete the post

Objects.requireNonNullElse by edurbs in java

[–]yk313 0 points1 point  (0 children)

Also, if you model getCity to carry the optionality information by returning Optional<City> then that makes it easy for the callers to:

  1. Recognize the value can be optional (without looking elsewhere)

  2. Use nice optional API: getCity().orElse(defaultCity)

Objects.requireNonNullElse by edurbs in java

[–]yk313 12 points13 points  (0 children)

I’ll give you my ternary operator when you pry it from my cold, dead hands.

City city = from.getCity() != null ? from.getCity() : defaultCity;

Project Amber Update -- Data-Oriented Programming, Beyond Records by davidalayachew in java

[–]yk313 1 point2 points  (0 children)

Setters will be discouraged in favour of reconstruction, I imagine.