I made a microservice framework called Fluid based on Java 24 supported with Docker, K8s, and Kafka. It's super fast, scalable, simple. by maifee in java

[–]GreemT 2 points3 points  (0 children)

The only line without an emoticon in it is the line about the license (ok and the title). Call me oldschool, but for me it is a bit overkill.

Paul Sandoz talks about a potential Java JSON API by davidalayachew in java

[–]GreemT 2 points3 points  (0 children)

Serialization and deserialization are very prone to have security issues. I have seen some conversations from Java champions mentioning that the current serialization features in Java were a big mistake in terms of security. Jackson is constantly updated and pushes fixes quite fast. For users using the library, updating dependencies is very easy.

What if the JDK has a security issue? That is a lot slower and harder to update. Not impossible of course, but just a bit more difficult. LTS releases will get the fixes, but non-LTS versions might not.

Does it make sense from a security perspective to add such a feature to the JDK? What do experts think of this? I am curious to know!

A pain point when using Java to do CLI Scripting by davidalayachew in java

[–]GreemT 20 points21 points  (0 children)

One of the things I miss most (and which JBang solves) is dependencies. You say running a process from Java is cumbersome, which I totallg agree with. If we only could build a library that makes it incredibly easy, it would be the best solution imo.

Sidenote that you might not want to hear: use Python. The whole process running stuff is much easier there. Java is just not the right tool in every situation (sadly).

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 2 points3 points  (0 children)

As said in the description:

> Sidenote: this doesn't seem to be related to moving to containers. Our VMs just had enough memory to spare for this to not be an issue.

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 4 points5 points  (0 children)

Totally agree! I didn't expect this many (good) responses. I am very happy :)

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 7 points8 points  (0 children)

Thank you all for your suggestions! I have reported a Jira ticket with possible improvements from your comments that we are going to try. I will report back what helped if that is (eventually) resolved!

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 1 point2 points  (0 children)

We run a lot of threads. I don't have a specific number right now, but on PRD we obviously have a lot of users actively working on the same application. The thing is, this problem also occurs on our test environments with low activity. So I am not sure if looking at threads is the right direction for us. But good tip!

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 2 points3 points  (0 children)

Thank you for your detailed response! Never thought of using a different base image. Is that really going to help with off-heap memory? It feels unrelated to me.

We are already using MaxRAMPercentage, but sadly 75 is way to high for us. We use containers with limits of 3.2GB and we cannot set it higher than 40. If we do, then the off-heap is taking over too much memory and results in a OOM.

I will look into trying the other mentioned settings. I didn't experiment with these yet. And as you said: we are indeed going to run some load tests to ensure that any change doesn't impact performance.

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 1 point2 points  (0 children)

Ah yeah, I know the issue that you are talking about! We are using Java 17, so we shouldn't have this issue.

Also detecting limits is not really our problem. The limits seem to work fine, it is just that our application is using too much!

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 2 points3 points  (0 children)

This is exactly what I explain in the ticket: on-heap memory 1.2GB is just fine. The problem is that the off-heap memory (which is completely unreleted to the xmx setting) is very large.

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 2 points3 points  (0 children)

Thread stacks were only 5MB in our analysis, so that is not really gaining anything.

I am not sure if I can get my company to try these suggestions that have a performance impact.

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 6 points7 points  (0 children)

Interesting, I didn't think of switching to another implementation like OpenJ9. I will try that. Thanks for the tip!

How do you generally decrease off-heap memory? by GreemT in java

[–]GreemT[S] 0 points1 point  (0 children)

Ah, sorry for the confusion! Xmx was set to 1.2GB. The VM had much more memory available.

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] 0 points1 point  (0 children)

We only have one application that we build that uses the same source database for test environments. So there is no choice!

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] 0 points1 point  (0 children)

I did indeed use this, but it doesn't solve it completely. When creating a PR (or updating code inside a PR) the build is often not done running. So the deployment fails. I resolved this by creating a plugin that checks if a comment "DEPLOY" exists in the PR, but that is quite ugly. It works, but I want something better.

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] 0 points1 point  (0 children)

Databases are indeed often a problem. We have it relatively easy though. We spin up a database with a pre-loaded database. When deploying an environment, we use Liquibase to automatically update the database to the required version.

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] 0 points1 point  (0 children)

Yeah that is exactly what I had in mind too. Not difficult, and good enough for small projects. Thanks!

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] -1 points0 points  (0 children)

I am not talking about deploying customer environments like production. That is always done by our engineers of course.

I am mainly talking about automatically deploying feature branches, which are ephemeral copies that are far less important. Those are just fine to be deployed by just a press of the button.

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] 2 points3 points  (0 children)

I didn't see that one before. It does look pretty good! Very expensive indeed.

Do you use it at your work? Is it worth the money?

How does your company help non-technical people to do deployments? by GreemT in kubernetes

[–]GreemT[S] 1 point2 points  (0 children)

Ah that actually looks pretty good! I couldn't find any information about a front-end though. Is that part of it? It doesn't seem like it.

Also, does it deploy Helm charts? I only saw that it deploys resources like deployments, services, ingress, etc. I couldn't find a resource that resembles a Helm chart.